From 88cc7e31781a0d42bdd4f9eee646c02ff03857c4 Mon Sep 17 00:00:00 2001 From: Tony Crisci Date: Thu, 30 Nov 2017 03:39:27 -0500 Subject: use meson subdirectories --- sway/meson.build | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 sway/meson.build (limited to 'sway') diff --git a/sway/meson.build b/sway/meson.build new file mode 100644 index 00000000..1f17ed31 --- /dev/null +++ b/sway/meson.build @@ -0,0 +1,29 @@ +sway_sources = sway_common + files( + 'main.c', + 'server.c', + 'commands.c', + 'commands/exit.c', + 'ipc-json.c', + 'ipc-server.c', + 'desktop/output.c', + 'desktop/xdg_shell_v6.c', + 'tree/container.c', + 'tree/layout.c', + 'tree/workspace.c', +) + +sway_deps = [ + pixman, + wayland_server, + jsonc, + wlroots, + libcap, + math, +] + +executable( + 'sway', + sway_sources, + include_directories: [sway_inc], + dependencies: sway_deps +) -- cgit v1.2.3 From cc310cffb0bf4cd2333be26a2ae16848655a306b Mon Sep 17 00:00:00 2001 From: Tony Crisci Date: Thu, 30 Nov 2017 06:25:13 -0500 Subject: meson: common static library --- sway/meson.build | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sway') diff --git a/sway/meson.build b/sway/meson.build index 1f17ed31..b02506c8 100644 --- a/sway/meson.build +++ b/sway/meson.build @@ -1,4 +1,4 @@ -sway_sources = sway_common + files( +sway_sources = files( 'main.c', 'server.c', 'commands.c', @@ -25,5 +25,6 @@ executable( 'sway', sway_sources, include_directories: [sway_inc], - dependencies: sway_deps + dependencies: sway_deps, + link_with: [lib_sway_common] ) -- cgit v1.2.3 From 2f3633433e2f1d840f3a98ca777d79d658a66e3f Mon Sep 17 00:00:00 2001 From: Tony Crisci Date: Thu, 30 Nov 2017 08:31:13 -0500 Subject: add meson install files --- sway/meson.build | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sway') diff --git a/sway/meson.build b/sway/meson.build index b02506c8..cf2aa913 100644 --- a/sway/meson.build +++ b/sway/meson.build @@ -26,5 +26,6 @@ executable( sway_sources, include_directories: [sway_inc], dependencies: sway_deps, - link_with: [lib_sway_common] + link_with: [lib_sway_common], + install: true ) -- cgit v1.2.3 From 517af37cc9a9f7b5efa3e22d7021aab691c80244 Mon Sep 17 00:00:00 2001 From: Tony Crisci Date: Thu, 30 Nov 2017 11:54:01 -0500 Subject: remove relevant CMakeLists.txt --- sway/CMakeLists.txt | 96 ----------------------------------------------------- 1 file changed, 96 deletions(-) delete mode 100644 sway/CMakeLists.txt (limited to 'sway') 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 @@ -include_directories( - ${PROTOCOLS_INCLUDE_DIRS} - ${WLR_INCLUDE_DIRS} - ${PCRE_INCLUDE_DIRS} - ${JSONC_INCLUDE_DIRS} - ${XKBCOMMON_INCLUDE_DIRS} - ${LIBINPUT_INCLUDE_DIRS} - ${CAIRO_INCLUDE_DIRS} - ${PANGO_INCLUDE_DIRS} - ${WAYLAND_INCLUDE_DIR} -) - -add_executable(sway - desktop/output.c - desktop/xdg_shell_v6.c - - commands.c - commands/exit.c - - tree/container.c - tree/layout.c - tree/workspace.c - - base64.c - main.c - server.c - ipc-json.c - ipc-server.c -) - -add_definitions( - -DSYSCONFDIR="${CMAKE_INSTALL_FULL_SYSCONFDIR}" -) - -target_link_libraries(sway - sway-common - sway-protocols - sway-wayland - ${WLR_LIBRARIES} - ${XKBCOMMON_LIBRARIES} - ${PCRE_LIBRARIES} - ${JSONC_LIBRARIES} - ${WAYLAND_SERVER_LIBRARIES} - ${LIBINPUT_LIBRARIES} - ${PANGO_LIBRARIES} - ${JSONC_LIBRARIES} - m -) - -if (CMAKE_SYSTEM_NAME STREQUAL Linux) - target_link_libraries(sway cap) -endif (CMAKE_SYSTEM_NAME STREQUAL Linux) - -install( - TARGETS sway - RUNTIME - DESTINATION bin - COMPONENT runtime -) - -add_custom_target(configs ALL) - -function(add_config name source destination) - add_custom_command( - OUTPUT ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name} - COMMAND sed -r - 's?__PREFIX__?${CMAKE_INSTALL_PREFIX}?g\; s?__SYSCONFDIR__?${CMAKE_INSTALL_FULL_SYSCONFDIR}?g\; s?__DATADIR__?${CMAKE_INSTALL_FULL_DATADIR}?g' - ${PROJECT_SOURCE_DIR}/${source}.in > ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name} - DEPENDS ${PROJECT_SOURCE_DIR}/${source}.in - COMMENT "Generating config file ${source}" - ) - - install( - FILES ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name} - DESTINATION ${CMAKE_INSTALL_FULL_SYSCONFDIR}/${destination} - COMPONENT configuration - ) - - add_custom_target(config-${name} DEPENDS ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name}) - add_dependencies(configs config-${name}) -endfunction() - -add_config(config config sway) -add_config(00-defaults security.d/00-defaults sway/security.d) - -if (CMAKE_SYSTEM_NAME STREQUAL FreeBSD) - add_config(10-freebsd security.d/10-freebsd sway/security.d) -endif (CMAKE_SYSTEM_NAME STREQUAL FreeBSD) - -if (A2X_FOUND) - add_manpage(sway 1) - add_manpage(sway 5) - add_manpage(sway-input 5) - add_manpage(sway-bar 5) - add_manpage(sway-security 7) -endif() -- cgit v1.2.3