diff options
Diffstat (limited to 'sway')
-rw-r--r-- | sway/CMakeLists.txt | 96 | ||||
-rw-r--r-- | sway/meson.build | 31 |
2 files changed, 31 insertions, 96 deletions
diff --git a/sway/CMakeLists.txt b/sway/CMakeLists.txt deleted file mode 100644 index 274fcc4a..00000000 --- a/sway/CMakeLists.txt +++ /dev/null | |||
@@ -1,96 +0,0 @@ | |||
1 | include_directories( | ||
2 | ${PROTOCOLS_INCLUDE_DIRS} | ||
3 | ${WLR_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 | add_executable(sway | ||
14 | desktop/output.c | ||
15 | desktop/xdg_shell_v6.c | ||
16 | |||
17 | commands.c | ||
18 | commands/exit.c | ||
19 | |||
20 | tree/container.c | ||
21 | tree/layout.c | ||
22 | tree/workspace.c | ||
23 | |||
24 | base64.c | ||
25 | main.c | ||
26 | server.c | ||
27 | ipc-json.c | ||
28 | ipc-server.c | ||
29 | ) | ||
30 | |||
31 | add_definitions( | ||
32 | -DSYSCONFDIR="${CMAKE_INSTALL_FULL_SYSCONFDIR}" | ||
33 | ) | ||
34 | |||
35 | target_link_libraries(sway | ||
36 | sway-common | ||
37 | sway-protocols | ||
38 | sway-wayland | ||
39 | ${WLR_LIBRARIES} | ||
40 | ${XKBCOMMON_LIBRARIES} | ||
41 | ${PCRE_LIBRARIES} | ||
42 | ${JSONC_LIBRARIES} | ||
43 | ${WAYLAND_SERVER_LIBRARIES} | ||
44 | ${LIBINPUT_LIBRARIES} | ||
45 | ${PANGO_LIBRARIES} | ||
46 | ${JSONC_LIBRARIES} | ||
47 | m | ||
48 | ) | ||
49 | |||
50 | if (CMAKE_SYSTEM_NAME STREQUAL Linux) | ||
51 | target_link_libraries(sway cap) | ||
52 | endif (CMAKE_SYSTEM_NAME STREQUAL Linux) | ||
53 | |||
54 | install( | ||
55 | TARGETS sway | ||
56 | RUNTIME | ||
57 | DESTINATION bin | ||
58 | COMPONENT runtime | ||
59 | ) | ||
60 | |||
61 | add_custom_target(configs ALL) | ||
62 | |||
63 | function(add_config name source destination) | ||
64 | add_custom_command( | ||
65 | OUTPUT ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name} | ||
66 | COMMAND sed -r | ||
67 | 's?__PREFIX__?${CMAKE_INSTALL_PREFIX}?g\; s?__SYSCONFDIR__?${CMAKE_INSTALL_FULL_SYSCONFDIR}?g\; s?__DATADIR__?${CMAKE_INSTALL_FULL_DATADIR}?g' | ||
68 | ${PROJECT_SOURCE_DIR}/${source}.in > ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name} | ||
69 | DEPENDS ${PROJECT_SOURCE_DIR}/${source}.in | ||
70 | COMMENT "Generating config file ${source}" | ||
71 | ) | ||
72 | |||
73 | install( | ||
74 | FILES ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name} | ||
75 | DESTINATION ${CMAKE_INSTALL_FULL_SYSCONFDIR}/${destination} | ||
76 | COMPONENT configuration | ||
77 | ) | ||
78 | |||
79 | add_custom_target(config-${name} DEPENDS ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name}) | ||
80 | add_dependencies(configs config-${name}) | ||
81 | endfunction() | ||
82 | |||
83 | add_config(config config sway) | ||
84 | add_config(00-defaults security.d/00-defaults sway/security.d) | ||
85 | |||
86 | if (CMAKE_SYSTEM_NAME STREQUAL FreeBSD) | ||
87 | add_config(10-freebsd security.d/10-freebsd sway/security.d) | ||
88 | endif (CMAKE_SYSTEM_NAME STREQUAL FreeBSD) | ||
89 | |||
90 | if (A2X_FOUND) | ||
91 | add_manpage(sway 1) | ||
92 | add_manpage(sway 5) | ||
93 | add_manpage(sway-input 5) | ||
94 | add_manpage(sway-bar 5) | ||
95 | add_manpage(sway-security 7) | ||
96 | endif() | ||
diff --git a/sway/meson.build b/sway/meson.build new file mode 100644 index 00000000..cf2aa913 --- /dev/null +++ b/sway/meson.build | |||
@@ -0,0 +1,31 @@ | |||
1 | sway_sources = files( | ||
2 | 'main.c', | ||
3 | 'server.c', | ||
4 | 'commands.c', | ||
5 | 'commands/exit.c', | ||
6 | 'ipc-json.c', | ||
7 | 'ipc-server.c', | ||
8 | 'desktop/output.c', | ||
9 | 'desktop/xdg_shell_v6.c', | ||
10 | 'tree/container.c', | ||
11 | 'tree/layout.c', | ||
12 | 'tree/workspace.c', | ||
13 | ) | ||
14 | |||
15 | sway_deps = [ | ||
16 | pixman, | ||
17 | wayland_server, | ||
18 | jsonc, | ||
19 | wlroots, | ||
20 | libcap, | ||
21 | math, | ||
22 | ] | ||
23 | |||
24 | executable( | ||
25 | 'sway', | ||
26 | sway_sources, | ||
27 | include_directories: [sway_inc], | ||
28 | dependencies: sway_deps, | ||
29 | link_with: [lib_sway_common], | ||
30 | install: true | ||
31 | ) | ||