summaryrefslogtreecommitdiffstats
path: root/sway/CMakeLists.txt
diff options
context:
space:
mode:
authorLibravatar Christoph Gysin <christoph.gysin@gmail.com>2015-12-02 07:57:53 +0200
committerLibravatar Christoph Gysin <christoph.gysin@gmail.com>2015-12-02 12:15:57 +0200
commitcce9c338c07e889aa82db806f0dddf2f997edbb6 (patch)
tree717052d8d88f3fd14d26566daa520dbdd3a452fe /sway/CMakeLists.txt
parentMerge pull request #290 from christophgysin/cmake (diff)
downloadsway-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.txt38
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 @@
1find_package(XKBCommon REQUIRED)
2find_package(WLC REQUIRED)
3find_package(PCRE REQUIRED)
4find_package(Wayland REQUIRED)
5find_package(JsonC REQUIRED)
6
7include(Wayland)
8WAYLAND_ADD_PROTOCOL_SERVER(proto-desktop-shell
9 ${PROJECT_SOURCE_DIR}/protocols/desktop-shell.xml
10 desktop-shell
11)
12
13file(GLOB sources ${PROJECT_SOURCE_DIR}/sway/*.c)
14file(GLOB common ${PROJECT_SOURCE_DIR}/common/*.c)
15
16include_directories( 1include_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
24add_executable(sway 9add_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
30target_link_libraries(sway 28target_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}