aboutsummaryrefslogtreecommitdiffstats
path: root/sway
diff options
context:
space:
mode:
authorLibravatar Christoph Gysin <christoph.gysin@gmail.com>2015-12-01 22:25:22 +0200
committerLibravatar Christoph Gysin <christoph.gysin@gmail.com>2015-12-01 22:47:22 +0200
commit92a353838172c1a6d73a6ee092b346b2f14ca7cc (patch)
treee452882aedf889cc5866dfd7016fe2a169864ba5 /sway
parentcmake: extract add_manpage() (diff)
downloadsway-92a353838172c1a6d73a6ee092b346b2f14ca7cc.tar.gz
sway-92a353838172c1a6d73a6ee092b346b2f14ca7cc.tar.zst
sway-92a353838172c1a6d73a6ee092b346b2f14ca7cc.zip
cmake: extract sway
Diffstat (limited to 'sway')
-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)