aboutsummaryrefslogtreecommitdiffstats
path: root/sway/CMakeLists.txt
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2015-12-01 15:57:03 -0500
committerLibravatar Drew DeVault <sir@cmpwn.com>2015-12-01 15:57:03 -0500
commitfc01f04c93c0de2a0cdcee946ac0131b86e18342 (patch)
tree204ba2fbc20298af8f159cd648c710b3a346135a /sway/CMakeLists.txt
parentRemove build badge (Travis is broken, not sway) (diff)
parentcmake: remove extra space (diff)
downloadsway-fc01f04c93c0de2a0cdcee946ac0131b86e18342.tar.gz
sway-fc01f04c93c0de2a0cdcee946ac0131b86e18342.tar.zst
sway-fc01f04c93c0de2a0cdcee946ac0131b86e18342.zip
Merge pull request #287 from christophgysin/cmake
cmake: extract config from toplevel CMakeLists.txt
Diffstat (limited to 'sway/CMakeLists.txt')
-rw-r--r--sway/CMakeLists.txt48
1 files changed, 48 insertions, 0 deletions
diff --git a/sway/CMakeLists.txt b/sway/CMakeLists.txt
new file mode 100644
index 00000000..1e2f3fd3
--- /dev/null
+++ b/sway/CMakeLists.txt
@@ -0,0 +1,48 @@
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(
17 ${WLC_INCLUDE_DIRS}
18 ${PCRE_INCLUDE_DIRS}
19 ${JSONC_INCLUDE_DIRS}
20 ${XKBCOMMON_INCLUDE_DIRS}
21 ${CMAKE_CURRENT_BINARY_DIR}
22)
23
24add_executable(sway
25 ${sources}
26 ${common}
27 ${proto-desktop-shell}
28)
29
30target_link_libraries(sway
31 ${WLC_LIBRARIES}
32 ${XKBCOMMON_LIBRARIES}
33 ${PCRE_LIBRARIES}
34 ${JSONC_LIBRARIES}
35 ${WAYLAND_SERVER_LIBRARIES}
36)
37
38install(
39 TARGETS sway
40 RUNTIME
41 DESTINATION bin
42 COMPONENT runtime
43)
44install(
45 FILES ${CMAKE_CURRENT_SOURCE_DIR}/config
46 DESTINATION ${FALLBACK_CONFIG_DIR}
47 COMPONENT configuration
48)