diff options
author | Christoph Gysin <christoph.gysin@gmail.com> | 2015-12-02 07:57:53 +0200 |
---|---|---|
committer | Christoph Gysin <christoph.gysin@gmail.com> | 2015-12-02 12:15:57 +0200 |
commit | cce9c338c07e889aa82db806f0dddf2f997edbb6 (patch) | |
tree | 717052d8d88f3fd14d26566daa520dbdd3a452fe /sway/CMakeLists.txt | |
parent | Merge pull request #290 from christophgysin/cmake (diff) | |
download | sway-cce9c338c07e889aa82db806f0dddf2f997edbb6.tar.gz sway-cce9c338c07e889aa82db806f0dddf2f997edbb6.tar.zst sway-cce9c338c07e889aa82db806f0dddf2f997edbb6.zip |
cmake: build common code only once
This creates (static) libraries for protocols/, common/, and wayland/.
Diffstat (limited to 'sway/CMakeLists.txt')
-rw-r--r-- | sway/CMakeLists.txt | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/sway/CMakeLists.txt b/sway/CMakeLists.txt index 92392354..49ed24e7 100644 --- a/sway/CMakeLists.txt +++ b/sway/CMakeLists.txt | |||
@@ -1,33 +1,33 @@ | |||
1 | find_package(XKBCommon REQUIRED) | ||
2 | find_package(WLC REQUIRED) | ||
3 | find_package(PCRE REQUIRED) | ||
4 | find_package(Wayland REQUIRED) | ||
5 | find_package(JsonC REQUIRED) | ||
6 | |||
7 | include(Wayland) | ||
8 | WAYLAND_ADD_PROTOCOL_SERVER(proto-desktop-shell | ||
9 | ${PROJECT_SOURCE_DIR}/protocols/desktop-shell.xml | ||
10 | desktop-shell | ||
11 | ) | ||
12 | |||
13 | file(GLOB sources ${PROJECT_SOURCE_DIR}/sway/*.c) | ||
14 | file(GLOB common ${PROJECT_SOURCE_DIR}/common/*.c) | ||
15 | |||
16 | include_directories( | 1 | include_directories( |
2 | ${PROTOCOLS_INCLUDE_DIRS} | ||
17 | ${WLC_INCLUDE_DIRS} | 3 | ${WLC_INCLUDE_DIRS} |
18 | ${PCRE_INCLUDE_DIRS} | 4 | ${PCRE_INCLUDE_DIRS} |
19 | ${JSONC_INCLUDE_DIRS} | 5 | ${JSONC_INCLUDE_DIRS} |
20 | ${XKBCOMMON_INCLUDE_DIRS} | 6 | ${XKBCOMMON_INCLUDE_DIRS} |
21 | ${CMAKE_CURRENT_BINARY_DIR} | ||
22 | ) | 7 | ) |
23 | 8 | ||
24 | add_executable(sway | 9 | add_executable(sway |
25 | ${sources} | 10 | commands.c |
26 | ${common} | 11 | config.c |
27 | ${proto-desktop-shell} | 12 | container.c |
13 | criteria.c | ||
14 | debug_log.c | ||
15 | extensions.c | ||
16 | focus.c | ||
17 | handlers.c | ||
18 | input_state.c | ||
19 | ipc-server.c | ||
20 | layout.c | ||
21 | main.c | ||
22 | output.c | ||
23 | resize.c | ||
24 | util.c | ||
25 | workspace.c | ||
28 | ) | 26 | ) |
29 | 27 | ||
30 | target_link_libraries(sway | 28 | target_link_libraries(sway |
29 | sway-common | ||
30 | sway-protocols | ||
31 | ${WLC_LIBRARIES} | 31 | ${WLC_LIBRARIES} |
32 | ${XKBCOMMON_LIBRARIES} | 32 | ${XKBCOMMON_LIBRARIES} |
33 | ${PCRE_LIBRARIES} | 33 | ${PCRE_LIBRARIES} |