diff options
Diffstat (limited to 'sway/CMakeLists.txt')
-rw-r--r-- | sway/CMakeLists.txt | 107 |
1 files changed, 0 insertions, 107 deletions
diff --git a/sway/CMakeLists.txt b/sway/CMakeLists.txt deleted file mode 100644 index 48f7a7a8..00000000 --- a/sway/CMakeLists.txt +++ /dev/null | |||
@@ -1,107 +0,0 @@ | |||
1 | include_directories( | ||
2 | ${PROTOCOLS_INCLUDE_DIRS} | ||
3 | ${WLC_INCLUDE_DIRS} | ||
4 | ${PCRE_INCLUDE_DIRS} | ||
5 | ${JSONC_INCLUDE_DIRS} | ||
6 | ${XKBCOMMON_INCLUDE_DIRS} | ||
7 | ${LIBINPUT_INCLUDE_DIRS} | ||
8 | ${CAIRO_INCLUDE_DIRS} | ||
9 | ${PANGO_INCLUDE_DIRS} | ||
10 | ${WAYLAND_INCLUDE_DIR} | ||
11 | ) | ||
12 | |||
13 | file(GLOB cmds | ||
14 | "commands/*.c" | ||
15 | "commands/bar/*.c" | ||
16 | "commands/input/*.c" | ||
17 | ) | ||
18 | |||
19 | add_executable(sway | ||
20 | commands.c | ||
21 | ${cmds} | ||
22 | base64.c | ||
23 | config.c | ||
24 | container.c | ||
25 | criteria.c | ||
26 | debug_log.c | ||
27 | extensions.c | ||
28 | focus.c | ||
29 | handlers.c | ||
30 | input.c | ||
31 | input_state.c | ||
32 | ipc-json.c | ||
33 | ipc-server.c | ||
34 | layout.c | ||
35 | main.c | ||
36 | output.c | ||
37 | workspace.c | ||
38 | border.c | ||
39 | security.c | ||
40 | ) | ||
41 | |||
42 | add_definitions( | ||
43 | -DSYSCONFDIR="${CMAKE_INSTALL_FULL_SYSCONFDIR}" | ||
44 | ) | ||
45 | |||
46 | target_link_libraries(sway | ||
47 | sway-common | ||
48 | sway-protocols | ||
49 | sway-wayland | ||
50 | ${WLC_LIBRARIES} | ||
51 | ${XKBCOMMON_LIBRARIES} | ||
52 | ${PCRE_LIBRARIES} | ||
53 | ${JSONC_LIBRARIES} | ||
54 | ${WAYLAND_SERVER_LIBRARIES} | ||
55 | ${LIBINPUT_LIBRARIES} | ||
56 | ${PANGO_LIBRARIES} | ||
57 | ${JSONC_LIBRARIES} | ||
58 | m | ||
59 | ) | ||
60 | |||
61 | if (CMAKE_SYSTEM_NAME STREQUAL Linux) | ||
62 | target_link_libraries(sway cap) | ||
63 | endif (CMAKE_SYSTEM_NAME STREQUAL Linux) | ||
64 | |||
65 | install( | ||
66 | TARGETS sway | ||
67 | RUNTIME | ||
68 | DESTINATION bin | ||
69 | COMPONENT runtime | ||
70 | ) | ||
71 | |||
72 | add_custom_target(configs ALL) | ||
73 | |||
74 | function(add_config name source destination) | ||
75 | add_custom_command( | ||
76 | OUTPUT ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name} | ||
77 | COMMAND sed -r | ||
78 | 's?__PREFIX__?${CMAKE_INSTALL_PREFIX}?g\; s?__SYSCONFDIR__?${CMAKE_INSTALL_FULL_SYSCONFDIR}?g\; s?__DATADIR__?${CMAKE_INSTALL_FULL_DATADIR}?g' | ||
79 | ${PROJECT_SOURCE_DIR}/${source}.in > ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name} | ||
80 | DEPENDS ${PROJECT_SOURCE_DIR}/${source}.in | ||
81 | COMMENT "Generating config file ${source}" | ||
82 | ) | ||
83 | |||
84 | install( | ||
85 | FILES ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name} | ||
86 | DESTINATION ${CMAKE_INSTALL_FULL_SYSCONFDIR}/${destination} | ||
87 | COMPONENT configuration | ||
88 | ) | ||
89 | |||
90 | add_custom_target(config-${name} DEPENDS ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name}) | ||
91 | add_dependencies(configs config-${name}) | ||
92 | endfunction() | ||
93 | |||
94 | add_config(config config sway) | ||
95 | add_config(00-defaults security.d/00-defaults sway/security.d) | ||
96 | |||
97 | if (CMAKE_SYSTEM_NAME STREQUAL FreeBSD) | ||
98 | add_config(10-freebsd security.d/10-freebsd sway/security.d) | ||
99 | endif (CMAKE_SYSTEM_NAME STREQUAL FreeBSD) | ||
100 | |||
101 | if (A2X_FOUND) | ||
102 | add_manpage(sway 1) | ||
103 | add_manpage(sway 5) | ||
104 | add_manpage(sway-input 5) | ||
105 | add_manpage(sway-bar 5) | ||
106 | add_manpage(sway-security 7) | ||
107 | endif() | ||