aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt10
1 files changed, 9 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7be65a03..0e61946b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -5,7 +5,8 @@ project(sway C)
set(CMAKE_C_FLAGS "-g")
set(CMAKE_C_STANDARD 99)
SET(CMAKE_C_EXTENSIONS OFF)
-set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/bin")
+set(CMAKE_CURRENT_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/bin")
+set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
add_definitions("-Wall -Wextra -Wno-unused-parameter -D_GNU_SOURCE")
list(INSERT CMAKE_MODULE_PATH 0
"${CMAKE_CURRENT_SOURCE_DIR}/CMake")
@@ -38,21 +39,27 @@ find_package(XKBCommon REQUIRED)
find_package(WLC REQUIRED)
find_package(A2X 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
@@ -60,6 +67,7 @@ target_link_libraries(sway
${XKBCOMMON_LIBRARIES}
${PCRE_LIBRARIES}
${JSONC_LIBRARIES}
+ ${WAYLAND_SERVER_LIBRARIES}
)
install(