aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt39
1 files changed, 39 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 00000000..66879422
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,39 @@
1cmake_minimum_required(VERSION 2.8.5)
2project(sway C)
3set(CMAKE_C_FLAGS "-g")
4set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "bin/")
5add_definitions("-Wall")
6set(CMAKE_BUILD_TYPE Debug)
7set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/CMake)
8
9find_package(XKBCommon REQUIRED)
10
11if (UNIX)
12 find_library(DL_LIBRARY dl)
13 mark_as_advanced(DL_LIBRARY)
14 if (NOT DL_LIBRARY)
15 message(FATAL_ERROR "libdl is needed on unix systems")
16 endif ()
17endif (UNIX)
18
19FILE(GLOB sources ${PROJECT_SOURCE_DIR}/sway/*.c)
20
21include_directories(
22 ${WLC_INCLUDE_DIRS}
23 sway/
24)
25
26add_executable(sway
27 ${sources}
28)
29
30target_link_libraries(sway
31 ${WLC_LIBRARIES}
32 ${XKBCOMMON_LIBRARIES}
33 ${DL_LIBRARY}
34)
35
36INSTALL(
37 TARGETS sway
38 RUNTIME DESTINATION bin
39)