aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorBen Boeckel <mathstuf@gmail.com>2015-11-12 21:42:37 -0500
committerBen Boeckel <mathstuf@gmail.com>2015-11-12 21:56:14 -0500
commitec013d1f1a5e0345353009f97dc506420995db6b (patch)
tree8ce960a4592d2889e4ed4ed307bdbdcbfd7c3e36 /CMakeLists.txt
parent98678dea5d395e08de5bf28d3c9b4f48ea6f6589 (diff)
common: create a static library
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt9
1 files changed, 5 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3f33a3f8..00e8de6e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -10,8 +10,6 @@ add_definitions("-Wall -Wextra -Wno-unused-parameter -D_GNU_SOURCE")
list(INSERT CMAKE_MODULE_PATH 0
"${CMAKE_CURRENT_SOURCE_DIR}/CMake")
-add_subdirectory(swaybg swaybg)
-
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git")
execute_process(
COMMAND git describe --always
@@ -31,6 +29,10 @@ add_definitions("-DSWAY_GIT_BRANCH=\"${GIT_BRANCH}\"")
string(TIMESTAMP CURRENT_DATE "%Y-%m-%d" UTC)
add_definitions("-DSWAY_VERSION_DATE=${CURRENT_DATE}")
+include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include")
+add_subdirectory(common)
+add_subdirectory(swaybg)
+
find_package(XKBCommon REQUIRED)
find_package(WLC REQUIRED)
find_package(A2X REQUIRED)
@@ -38,14 +40,12 @@ find_package(PCRE REQUIRED)
find_package(JsonC REQUIRED)
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}
- include/
)
add_executable(sway
@@ -58,6 +58,7 @@ target_link_libraries(sway
${XKBCOMMON_LIBRARIES}
${PCRE_LIBRARIES}
${JSONC_LIBRARIES}
+ sway_common
)
install(