aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Gysin <christoph.gysin@gmail.com>2015-12-01 22:25:22 +0200
committerChristoph Gysin <christoph.gysin@gmail.com>2015-12-01 22:47:22 +0200
commit92a353838172c1a6d73a6ee092b346b2f14ca7cc (patch)
treee452882aedf889cc5866dfd7016fe2a169864ba5
parent4277070a7b92b5aad7c08beb876f7460fe268f60 (diff)
cmake: extract sway
-rw-r--r--CMakeLists.txt50
-rw-r--r--sway/CMakeLists.txt48
2 files changed, 49 insertions, 49 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4d828153..dcb52c0d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -43,60 +43,12 @@ add_definitions(-DSWAY_VERSION_DATE=\"${CURRENT_DATE}\")
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
+add_subdirectory(sway)
add_subdirectory(swaybg)
add_subdirectory(swaymsg)
add_subdirectory(swaygrab)
add_subdirectory(swaybar)
-find_package(XKBCommon REQUIRED)
-find_package(WLC REQUIRED)
-find_package(PCRE REQUIRED)
-find_package(Wayland REQUIRED)
-find_package(JsonC REQUIRED)
-
-file(GLOB sources ${PROJECT_SOURCE_DIR}/sway/*.c)
-file(GLOB common ${PROJECT_SOURCE_DIR}/common/*.c)
-
-include(Wayland)
-WAYLAND_ADD_PROTOCOL_SERVER(proto-desktop-shell
- ${PROJECT_SOURCE_DIR}/protocols/desktop-shell.xml
- desktop-shell
-)
-
-include_directories(
- ${WLC_INCLUDE_DIRS}
- ${PCRE_INCLUDE_DIRS}
- ${JSONC_INCLUDE_DIRS}
- ${XKBCOMMON_INCLUDE_DIRS}
- ${CMAKE_CURRENT_BINARY_DIR}
-)
-
-add_executable(sway
- ${sources}
- ${common}
- ${proto-desktop-shell}
-)
-
-target_link_libraries(sway
- ${WLC_LIBRARIES}
- ${XKBCOMMON_LIBRARIES}
- ${PCRE_LIBRARIES}
- ${JSONC_LIBRARIES}
- ${WAYLAND_SERVER_LIBRARIES}
-)
-
-install(
- TARGETS sway
- RUNTIME
- DESTINATION bin
- COMPONENT runtime
-)
-install(
- FILES ${CMAKE_CURRENT_SOURCE_DIR}/config
- DESTINATION ${FALLBACK_CONFIG_DIR}
- COMPONENT configuration
-)
-
include(Manpage)
add_manpage(sway 1)
add_manpage(sway 5)
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 @@
+find_package(XKBCommon REQUIRED)
+find_package(WLC REQUIRED)
+find_package(PCRE REQUIRED)
+find_package(Wayland REQUIRED)
+find_package(JsonC REQUIRED)
+
+include(Wayland)
+WAYLAND_ADD_PROTOCOL_SERVER(proto-desktop-shell
+ ${PROJECT_SOURCE_DIR}/protocols/desktop-shell.xml
+ desktop-shell
+)
+
+file(GLOB sources ${PROJECT_SOURCE_DIR}/sway/*.c)
+file(GLOB common ${PROJECT_SOURCE_DIR}/common/*.c)
+
+include_directories(
+ ${WLC_INCLUDE_DIRS}
+ ${PCRE_INCLUDE_DIRS}
+ ${JSONC_INCLUDE_DIRS}
+ ${XKBCOMMON_INCLUDE_DIRS}
+ ${CMAKE_CURRENT_BINARY_DIR}
+)
+
+add_executable(sway
+ ${sources}
+ ${common}
+ ${proto-desktop-shell}
+)
+
+target_link_libraries(sway
+ ${WLC_LIBRARIES}
+ ${XKBCOMMON_LIBRARIES}
+ ${PCRE_LIBRARIES}
+ ${JSONC_LIBRARIES}
+ ${WAYLAND_SERVER_LIBRARIES}
+)
+
+install(
+ TARGETS sway
+ RUNTIME
+ DESTINATION bin
+ COMPONENT runtime
+)
+install(
+ FILES ${CMAKE_CURRENT_SOURCE_DIR}/config
+ DESTINATION ${FALLBACK_CONFIG_DIR}
+ COMPONENT configuration
+)