diff options
author | Christoph Gysin <christoph.gysin@gmail.com> | 2015-12-01 21:46:10 +0200 |
---|---|---|
committer | Christoph Gysin <christoph.gysin@gmail.com> | 2015-12-01 22:03:09 +0200 |
commit | f7ec3d00a08f0d44ae0c8fd756c24f12d68cee9b (patch) | |
tree | 2100f5d1fbb070b0d8620b43937116989f04ac93 | |
parent | cmake: style consistency (diff) | |
download | sway-f7ec3d00a08f0d44ae0c8fd756c24f12d68cee9b.tar.gz sway-f7ec3d00a08f0d44ae0c8fd756c24f12d68cee9b.tar.zst sway-f7ec3d00a08f0d44ae0c8fd756c24f12d68cee9b.zip |
cmake: use tabs instead of spaces
-rw-r--r-- | CMakeLists.txt | 132 | ||||
-rw-r--r-- | swaybar/CMakeLists.txt | 44 | ||||
-rw-r--r-- | swaybg/CMakeLists.txt | 44 | ||||
-rw-r--r-- | swaygrab/CMakeLists.txt | 14 | ||||
-rw-r--r-- | swaymsg/CMakeLists.txt | 12 |
5 files changed, 123 insertions, 123 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 09cc4091..8d8c3c6a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt | |||
@@ -13,21 +13,21 @@ set(CMAKE_CURRENT_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/bin") | |||
13 | set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}") | 13 | set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}") |
14 | add_definitions("-Wall -Wextra -Wno-unused-parameter -D_GNU_SOURCE") | 14 | add_definitions("-Wall -Wextra -Wno-unused-parameter -D_GNU_SOURCE") |
15 | list(INSERT CMAKE_MODULE_PATH 0 | 15 | list(INSERT CMAKE_MODULE_PATH 0 |
16 | "${CMAKE_CURRENT_SOURCE_DIR}/CMake" | 16 | "${CMAKE_CURRENT_SOURCE_DIR}/CMake" |
17 | ) | 17 | ) |
18 | if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git") | 18 | if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git") |
19 | execute_process( | 19 | execute_process( |
20 | COMMAND git describe --always | 20 | COMMAND git describe --always |
21 | OUTPUT_VARIABLE GIT_COMMIT_HASH | 21 | OUTPUT_VARIABLE GIT_COMMIT_HASH |
22 | OUTPUT_STRIP_TRAILING_WHITESPACE | 22 | OUTPUT_STRIP_TRAILING_WHITESPACE |
23 | WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" | 23 | WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" |
24 | ) | 24 | ) |
25 | execute_process( | 25 | execute_process( |
26 | COMMAND git rev-parse --abbrev-ref HEAD | 26 | COMMAND git rev-parse --abbrev-ref HEAD |
27 | OUTPUT_VARIABLE GIT_BRANCH | 27 | OUTPUT_VARIABLE GIT_BRANCH |
28 | OUTPUT_STRIP_TRAILING_WHITESPACE | 28 | OUTPUT_STRIP_TRAILING_WHITESPACE |
29 | WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" | 29 | WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" |
30 | ) | 30 | ) |
31 | endif(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git") | 31 | endif(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git") |
32 | 32 | ||
33 | add_definitions("-DSWAY_GIT_VERSION=\"g${GIT_COMMIT_HASH}\"") | 33 | add_definitions("-DSWAY_GIT_VERSION=\"g${GIT_COMMIT_HASH}\"") |
@@ -55,72 +55,72 @@ file(GLOB common ${PROJECT_SOURCE_DIR}/common/*.c) | |||
55 | 55 | ||
56 | include(Wayland) | 56 | include(Wayland) |
57 | WAYLAND_ADD_PROTOCOL_SERVER(proto-desktop-shell | 57 | WAYLAND_ADD_PROTOCOL_SERVER(proto-desktop-shell |
58 | "${PROJECT_SOURCE_DIR}/protocols/desktop-shell.xml" | 58 | "${PROJECT_SOURCE_DIR}/protocols/desktop-shell.xml" |
59 | desktop-shell | 59 | desktop-shell |
60 | ) | 60 | ) |
61 | 61 | ||
62 | include_directories( | 62 | include_directories( |
63 | ${WLC_INCLUDE_DIRS} | 63 | ${WLC_INCLUDE_DIRS} |
64 | ${PCRE_INCLUDE_DIRS} | 64 | ${PCRE_INCLUDE_DIRS} |
65 | ${JSONC_INCLUDE_DIRS} | 65 | ${JSONC_INCLUDE_DIRS} |
66 | ${XKBCOMMON_INCLUDE_DIRS} | 66 | ${XKBCOMMON_INCLUDE_DIRS} |
67 | ${CMAKE_CURRENT_BINARY_DIR} | 67 | ${CMAKE_CURRENT_BINARY_DIR} |
68 | ) | 68 | ) |
69 | 69 | ||
70 | add_executable(sway | 70 | add_executable(sway |
71 | ${sources} | 71 | ${sources} |
72 | ${common} | 72 | ${common} |
73 | ${proto-desktop-shell} | 73 | ${proto-desktop-shell} |
74 | ) | 74 | ) |
75 | 75 | ||
76 | target_link_libraries(sway | 76 | target_link_libraries(sway |
77 | ${WLC_LIBRARIES} | 77 | ${WLC_LIBRARIES} |
78 | ${XKBCOMMON_LIBRARIES} | 78 | ${XKBCOMMON_LIBRARIES} |
79 | ${PCRE_LIBRARIES} | 79 | ${PCRE_LIBRARIES} |
80 | ${JSONC_LIBRARIES} | 80 | ${JSONC_LIBRARIES} |
81 | ${WAYLAND_SERVER_LIBRARIES} | 81 | ${WAYLAND_SERVER_LIBRARIES} |
82 | ) | 82 | ) |
83 | 83 | ||
84 | install( | 84 | install( |
85 | TARGETS sway | 85 | TARGETS sway |
86 | RUNTIME | 86 | RUNTIME |
87 | DESTINATION bin | 87 | DESTINATION bin |
88 | COMPONENT runtime | 88 | COMPONENT runtime |
89 | ) | 89 | ) |
90 | install( | 90 | install( |
91 | FILES "${CMAKE_CURRENT_SOURCE_DIR}/config" | 91 | FILES "${CMAKE_CURRENT_SOURCE_DIR}/config" |
92 | DESTINATION "${FALLBACK_CONFIG_DIR}" | 92 | DESTINATION "${FALLBACK_CONFIG_DIR}" |
93 | COMPONENT configuration | 93 | COMPONENT configuration |
94 | ) | 94 | ) |
95 | 95 | ||
96 | add_custom_target(man ALL) | 96 | add_custom_target(man ALL) |
97 | 97 | ||
98 | function(add_manpage name section) | 98 | function(add_manpage name section) |
99 | add_custom_command( | 99 | add_custom_command( |
100 | OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${name}.${section}" | 100 | OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${name}.${section}" |
101 | COMMAND "${A2X_COMMAND}" | 101 | COMMAND "${A2X_COMMAND}" |
102 | --no-xmllint | 102 | --no-xmllint |
103 | --doctype manpage | 103 | --doctype manpage |
104 | --format manpage | 104 | --format manpage |
105 | -D "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}" | 105 | -D "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}" |
106 | "${CMAKE_CURRENT_SOURCE_DIR}/${name}.${section}.txt" | 106 | "${CMAKE_CURRENT_SOURCE_DIR}/${name}.${section}.txt" |
107 | DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/${name}.${section}.txt" | 107 | DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/${name}.${section}.txt" |
108 | COMMENT "Generating manpage for ${name}.${section}" | 108 | COMMENT "Generating manpage for ${name}.${section}" |
109 | ) | 109 | ) |
110 | 110 | ||
111 | add_custom_target("man-${name}.${section}" | 111 | add_custom_target("man-${name}.${section}" |
112 | DEPENDS | 112 | DEPENDS |
113 | "${CMAKE_CURRENT_BINARY_DIR}/${name}.${section}" | 113 | "${CMAKE_CURRENT_BINARY_DIR}/${name}.${section}" |
114 | ) | 114 | ) |
115 | add_dependencies(man | 115 | add_dependencies(man |
116 | "man-${name}.${section}" | 116 | "man-${name}.${section}" |
117 | ) | 117 | ) |
118 | 118 | ||
119 | install( | 119 | install( |
120 | FILES "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name}.${section}" | 120 | FILES "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name}.${section}" |
121 | DESTINATION "share/man/man${section}" | 121 | DESTINATION "share/man/man${section}" |
122 | COMPONENT documentation | 122 | COMPONENT documentation |
123 | ) | 123 | ) |
124 | endfunction() | 124 | endfunction() |
125 | 125 | ||
126 | add_manpage(sway 1) | 126 | add_manpage(sway 1) |
@@ -129,12 +129,12 @@ add_manpage(swaymsg 1) | |||
129 | add_manpage(swaygrab 1) | 129 | add_manpage(swaygrab 1) |
130 | 130 | ||
131 | install( | 131 | install( |
132 | FILES "${CMAKE_CURRENT_SOURCE_DIR}/sway.desktop" | 132 | FILES "${CMAKE_CURRENT_SOURCE_DIR}/sway.desktop" |
133 | DESTINATION share/wayland-sessions | 133 | DESTINATION share/wayland-sessions |
134 | COMPONENT data | 134 | COMPONENT data |
135 | ) | 135 | ) |
136 | install( | 136 | install( |
137 | FILES "${CMAKE_CURRENT_SOURCE_DIR}/sway-xorg.desktop" | 137 | FILES "${CMAKE_CURRENT_SOURCE_DIR}/sway-xorg.desktop" |
138 | DESTINATION share/xsessions | 138 | DESTINATION share/xsessions |
139 | COMPONENT data | 139 | COMPONENT data |
140 | ) | 140 | ) |
diff --git a/swaybar/CMakeLists.txt b/swaybar/CMakeLists.txt index b4ce9e7b..1b68fd3e 100644 --- a/swaybar/CMakeLists.txt +++ b/swaybar/CMakeLists.txt | |||
@@ -7,19 +7,19 @@ find_package(Pango REQUIRED) | |||
7 | include(Wayland) | 7 | include(Wayland) |
8 | set(CMAKE_CURRENT_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/../bin/) | 8 | set(CMAKE_CURRENT_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/../bin/) |
9 | WAYLAND_ADD_PROTOCOL_CLIENT(proto-xdg-shell | 9 | WAYLAND_ADD_PROTOCOL_CLIENT(proto-xdg-shell |
10 | "${PROJECT_SOURCE_DIR}/../protocols/xdg-shell.xml" | 10 | "${PROJECT_SOURCE_DIR}/../protocols/xdg-shell.xml" |
11 | xdg-shell | 11 | xdg-shell |
12 | ) | 12 | ) |
13 | WAYLAND_ADD_PROTOCOL_CLIENT(proto-desktop-shell | 13 | WAYLAND_ADD_PROTOCOL_CLIENT(proto-desktop-shell |
14 | "${PROJECT_SOURCE_DIR}/../protocols/desktop-shell.xml" | 14 | "${PROJECT_SOURCE_DIR}/../protocols/desktop-shell.xml" |
15 | desktop-shell | 15 | desktop-shell |
16 | ) | 16 | ) |
17 | 17 | ||
18 | include_directories( | 18 | include_directories( |
19 | ${WAYLAND_CLIENT_INCLUDE_DIR} | 19 | ${WAYLAND_CLIENT_INCLUDE_DIR} |
20 | ${CAIRO_INCLUDE_DIRS} | 20 | ${CAIRO_INCLUDE_DIRS} |
21 | ${PANGO_INCLUDE_DIRS} | 21 | ${PANGO_INCLUDE_DIRS} |
22 | ${CMAKE_CURRENT_BINARY_DIR} | 22 | ${CMAKE_CURRENT_BINARY_DIR} |
23 | ) | 23 | ) |
24 | 24 | ||
25 | file(GLOB sources ${PROJECT_SOURCE_DIR}/*.c) | 25 | file(GLOB sources ${PROJECT_SOURCE_DIR}/*.c) |
@@ -27,24 +27,24 @@ file(GLOB common ${PROJECT_SOURCE_DIR}/../common/*.c) | |||
27 | file(GLOB wl_sources ${PROJECT_SOURCE_DIR}/../wayland/*.c) | 27 | file(GLOB wl_sources ${PROJECT_SOURCE_DIR}/../wayland/*.c) |
28 | 28 | ||
29 | add_executable(swaybar | 29 | add_executable(swaybar |
30 | ${sources} | 30 | ${sources} |
31 | ${wl_sources} | 31 | ${wl_sources} |
32 | ${common} | 32 | ${common} |
33 | ${proto-xdg-shell} | 33 | ${proto-xdg-shell} |
34 | ${proto-desktop-shell} | 34 | ${proto-desktop-shell} |
35 | ) | 35 | ) |
36 | 36 | ||
37 | target_link_libraries(swaybar | 37 | target_link_libraries(swaybar |
38 | ${WAYLAND_CLIENT_LIBRARIES} | 38 | ${WAYLAND_CLIENT_LIBRARIES} |
39 | ${WAYLAND_CURSOR_LIBRARIES} | 39 | ${WAYLAND_CURSOR_LIBRARIES} |
40 | ${CAIRO_LIBRARIES} | 40 | ${CAIRO_LIBRARIES} |
41 | ${PANGO_LIBRARIES} | 41 | ${PANGO_LIBRARIES} |
42 | m | 42 | m |
43 | ) | 43 | ) |
44 | 44 | ||
45 | install( | 45 | install( |
46 | TARGETS swaybar | 46 | TARGETS swaybar |
47 | RUNTIME | 47 | RUNTIME |
48 | DESTINATION bin | 48 | DESTINATION bin |
49 | COMPONENT runtime | 49 | COMPONENT runtime |
50 | ) | 50 | ) |
diff --git a/swaybg/CMakeLists.txt b/swaybg/CMakeLists.txt index ae376419..9a54a32a 100644 --- a/swaybg/CMakeLists.txt +++ b/swaybg/CMakeLists.txt | |||
@@ -7,19 +7,19 @@ find_package(Pango REQUIRED) | |||
7 | include(Wayland) | 7 | include(Wayland) |
8 | set(CMAKE_CURRENT_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/../bin/) | 8 | set(CMAKE_CURRENT_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/../bin/) |
9 | WAYLAND_ADD_PROTOCOL_CLIENT(proto-xdg-shell | 9 | WAYLAND_ADD_PROTOCOL_CLIENT(proto-xdg-shell |
10 | "${PROJECT_SOURCE_DIR}/../protocols/xdg-shell.xml" | 10 | "${PROJECT_SOURCE_DIR}/../protocols/xdg-shell.xml" |
11 | xdg-shell | 11 | xdg-shell |
12 | ) | 12 | ) |
13 | WAYLAND_ADD_PROTOCOL_CLIENT(proto-desktop-shell | 13 | WAYLAND_ADD_PROTOCOL_CLIENT(proto-desktop-shell |
14 | "${PROJECT_SOURCE_DIR}/../protocols/desktop-shell.xml" | 14 | "${PROJECT_SOURCE_DIR}/../protocols/desktop-shell.xml" |
15 | desktop-shell | 15 | desktop-shell |
16 | ) | 16 | ) |
17 | 17 | ||
18 | include_directories( | 18 | include_directories( |
19 | ${WAYLAND_CLIENT_INCLUDE_DIR} | 19 | ${WAYLAND_CLIENT_INCLUDE_DIR} |
20 | ${CAIRO_INCLUDE_DIRS} | 20 | ${CAIRO_INCLUDE_DIRS} |
21 | ${PANGO_INCLUDE_DIRS} | 21 | ${PANGO_INCLUDE_DIRS} |
22 | ${CMAKE_CURRENT_BINARY_DIR} | 22 | ${CMAKE_CURRENT_BINARY_DIR} |
23 | ) | 23 | ) |
24 | 24 | ||
25 | file(GLOB sources ${PROJECT_SOURCE_DIR}/*.c) | 25 | file(GLOB sources ${PROJECT_SOURCE_DIR}/*.c) |
@@ -27,24 +27,24 @@ file(GLOB common ${PROJECT_SOURCE_DIR}/../common/*.c) | |||
27 | file(GLOB wl_sources ${PROJECT_SOURCE_DIR}/../wayland/*.c) | 27 | file(GLOB wl_sources ${PROJECT_SOURCE_DIR}/../wayland/*.c) |
28 | 28 | ||
29 | add_executable(swaybg | 29 | add_executable(swaybg |
30 | ${sources} | 30 | ${sources} |
31 | ${wl_sources} | 31 | ${wl_sources} |
32 | ${common} | 32 | ${common} |
33 | ${proto-xdg-shell} | 33 | ${proto-xdg-shell} |
34 | ${proto-desktop-shell} | 34 | ${proto-desktop-shell} |
35 | ) | 35 | ) |
36 | 36 | ||
37 | target_link_libraries(swaybg | 37 | target_link_libraries(swaybg |
38 | ${WAYLAND_CLIENT_LIBRARIES} | 38 | ${WAYLAND_CLIENT_LIBRARIES} |
39 | ${WAYLAND_CURSOR_LIBRARIES} | 39 | ${WAYLAND_CURSOR_LIBRARIES} |
40 | ${CAIRO_LIBRARIES} | 40 | ${CAIRO_LIBRARIES} |
41 | ${PANGO_LIBRARIES} | 41 | ${PANGO_LIBRARIES} |
42 | m | 42 | m |
43 | ) | 43 | ) |
44 | 44 | ||
45 | install( | 45 | install( |
46 | TARGETS swaybg | 46 | TARGETS swaybg |
47 | RUNTIME | 47 | RUNTIME |
48 | DESTINATION bin | 48 | DESTINATION bin |
49 | COMPONENT runtime | 49 | COMPONENT runtime |
50 | ) | 50 | ) |
diff --git a/swaygrab/CMakeLists.txt b/swaygrab/CMakeLists.txt index 4f480d55..672a62cd 100644 --- a/swaygrab/CMakeLists.txt +++ b/swaygrab/CMakeLists.txt | |||
@@ -6,17 +6,17 @@ file(GLOB sources ${PROJECT_SOURCE_DIR}/*.c) | |||
6 | file(GLOB common ${PROJECT_SOURCE_DIR}/../common/*.c) | 6 | file(GLOB common ${PROJECT_SOURCE_DIR}/../common/*.c) |
7 | 7 | ||
8 | add_executable(swaygrab | 8 | add_executable(swaygrab |
9 | ${sources} | 9 | ${sources} |
10 | ${common} | 10 | ${common} |
11 | ) | 11 | ) |
12 | 12 | ||
13 | target_link_libraries(swaygrab | 13 | target_link_libraries(swaygrab |
14 | rt | 14 | rt |
15 | ) | 15 | ) |
16 | 16 | ||
17 | install( | 17 | install( |
18 | TARGETS swaygrab | 18 | TARGETS swaygrab |
19 | RUNTIME | 19 | RUNTIME |
20 | DESTINATION bin | 20 | DESTINATION bin |
21 | COMPONENT runtime | 21 | COMPONENT runtime |
22 | ) | 22 | ) |
diff --git a/swaymsg/CMakeLists.txt b/swaymsg/CMakeLists.txt index 9cb93e52..9231e9f4 100644 --- a/swaymsg/CMakeLists.txt +++ b/swaymsg/CMakeLists.txt | |||
@@ -6,13 +6,13 @@ file(GLOB sources ${PROJECT_SOURCE_DIR}/*.c) | |||
6 | file(GLOB common ${PROJECT_SOURCE_DIR}/../common/*.c) | 6 | file(GLOB common ${PROJECT_SOURCE_DIR}/../common/*.c) |
7 | 7 | ||
8 | add_executable(swaymsg | 8 | add_executable(swaymsg |
9 | ${sources} | 9 | ${sources} |
10 | ${common} | 10 | ${common} |
11 | ) | 11 | ) |
12 | 12 | ||
13 | install( | 13 | install( |
14 | TARGETS swaymsg | 14 | TARGETS swaymsg |
15 | RUNTIME | 15 | RUNTIME |
16 | DESTINATION bin | 16 | DESTINATION bin |
17 | COMPONENT runtime | 17 | COMPONENT runtime |
18 | ) | 18 | ) |