aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2015-11-13 07:17:22 -0500
committerDrew DeVault <sir@cmpwn.com>2015-11-13 07:17:48 -0500
commitfd1a59def370be34853f3540a5e78cd82a40b7f6 (patch)
treeed5dce3cf79b27688ab81ab9d429653567b721bf
parent44d0b3282f91cf1f01a9c79ad0e2b64f1a11e845 (diff)
Clean up CMake stuff
-rw-r--r--CMakeLists.txt7
-rw-r--r--common/CMakeLists.txt3
-rw-r--r--swaybg/CMakeLists.txt3
3 files changed, 5 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f8dd9cb7..aa103915 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -29,10 +29,9 @@ add_definitions("-DSWAY_GIT_VERSION=\"g${GIT_COMMIT_HASH}\"")
add_definitions("-DSWAY_GIT_BRANCH=\"${GIT_BRANCH}\"")
string(TIMESTAMP CURRENT_DATE "%Y-%m-%d" UTC)
-add_definitions("-DSWAY_VERSION_DATE=${CURRENT_DATE}")
+add_definitions('-DSWAY_VERSION_DATE="${CURRENT_DATE}"')
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include")
-add_subdirectory(common)
add_subdirectory(swaybg)
find_package(XKBCommon REQUIRED)
@@ -42,6 +41,7 @@ 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}
@@ -60,7 +60,6 @@ target_link_libraries(sway
${XKBCOMMON_LIBRARIES}
${PCRE_LIBRARIES}
${JSONC_LIBRARIES}
- sway_common
)
install(
@@ -81,7 +80,7 @@ function (add_manpage name section)
--no-xmllint
--doctype manpage
--format manpage
- -D "${CMAKE_CURRENT_BINARY_DIR}"
+ -D "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}"
"${CMAKE_CURRENT_SOURCE_DIR}/${name}.${section}.txt"
DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/${name}.${section}.txt"
COMMENT "Generating manpage for ${name}.${section}")
diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt
deleted file mode 100644
index f3a00626..00000000
--- a/common/CMakeLists.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-add_library(sway_common STATIC
- list.c
- log.c)
diff --git a/swaybg/CMakeLists.txt b/swaybg/CMakeLists.txt
index 1ad43324..8da31faa 100644
--- a/swaybg/CMakeLists.txt
+++ b/swaybg/CMakeLists.txt
@@ -14,6 +14,7 @@ include_directories(
)
FILE(GLOB sources ${PROJECT_SOURCE_DIR}/*.c)
+FILE(GLOB common ${PROJECT_SOURCE_DIR}/../common/*.c)
FILE(GLOB wl_sources ${PROJECT_SOURCE_DIR}/../wayland/*.c)
add_executable(swaybg
@@ -22,7 +23,7 @@ add_executable(swaybg
${common}
)
-TARGET_LINK_LIBRARIES(swaybg ${WAYLAND_CLIENT_LIBRARIES} ${CAIRO_LIBRARIES} ${PANGO_LIBRARIES} sway_common)
+TARGET_LINK_LIBRARIES(swaybg ${WAYLAND_CLIENT_LIBRARIES} ${CAIRO_LIBRARIES} ${PANGO_LIBRARIES})
install(
TARGETS swaybg