aboutsummaryrefslogtreecommitdiffstats
path: root/swaybar
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2015-12-01 15:25:41 -0500
committerLibravatar Drew DeVault <sir@cmpwn.com>2015-12-01 15:25:41 -0500
commit1fbabc6c747205e62cd1dff3771bd319a935438f (patch)
tree8c079c9fe0f909be8429ab010ed75853bd3429d0 /swaybar
parentMerge pull request #286 from mikkeloscar/wlc-origin-point (diff)
parentcmake: remove unnecessary quotes (diff)
downloadsway-1fbabc6c747205e62cd1dff3771bd319a935438f.tar.gz
sway-1fbabc6c747205e62cd1dff3771bd319a935438f.tar.zst
sway-1fbabc6c747205e62cd1dff3771bd319a935438f.zip
Merge pull request #285 from christophgysin/cmake
cmake configuration cleanup
Diffstat (limited to 'swaybar')
-rw-r--r--swaybar/CMakeLists.txt51
1 files changed, 32 insertions, 19 deletions
diff --git a/swaybar/CMakeLists.txt b/swaybar/CMakeLists.txt
index 12dd40c6..ea35134f 100644
--- a/swaybar/CMakeLists.txt
+++ b/swaybar/CMakeLists.txt
@@ -5,32 +5,45 @@ find_package(Cairo REQUIRED)
5find_package(Pango REQUIRED) 5find_package(Pango REQUIRED)
6 6
7include(Wayland) 7include(Wayland)
8set(CMAKE_CURRENT_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/../bin/) 8WAYLAND_ADD_PROTOCOL_CLIENT(proto-xdg-shell
9WAYLAND_ADD_PROTOCOL_CLIENT(proto-xdg-shell "${PROJECT_SOURCE_DIR}/../protocols/xdg-shell.xml" xdg-shell) 9 ${PROJECT_SOURCE_DIR}/../protocols/xdg-shell.xml
10WAYLAND_ADD_PROTOCOL_CLIENT(proto-desktop-shell "${PROJECT_SOURCE_DIR}/../protocols/desktop-shell.xml" desktop-shell) 10 xdg-shell
11)
12WAYLAND_ADD_PROTOCOL_CLIENT(proto-desktop-shell
13 ${PROJECT_SOURCE_DIR}/../protocols/desktop-shell.xml
14 desktop-shell
15)
11 16
12include_directories( 17include_directories(
13 ${WAYLAND_CLIENT_INCLUDE_DIR} 18 ${WAYLAND_CLIENT_INCLUDE_DIR}
14 ${CAIRO_INCLUDE_DIRS} 19 ${CAIRO_INCLUDE_DIRS}
15 ${PANGO_INCLUDE_DIRS} 20 ${PANGO_INCLUDE_DIRS}
16 ${CMAKE_CURRENT_BINARY_DIR} 21 ${CMAKE_CURRENT_BINARY_DIR}
17) 22)
18 23
19FILE(GLOB sources ${PROJECT_SOURCE_DIR}/*.c) 24file(GLOB sources ${PROJECT_SOURCE_DIR}/*.c)
20FILE(GLOB common ${PROJECT_SOURCE_DIR}/../common/*.c) 25file(GLOB common ${PROJECT_SOURCE_DIR}/../common/*.c)
21FILE(GLOB wl_sources ${PROJECT_SOURCE_DIR}/../wayland/*.c) 26file(GLOB wl_sources ${PROJECT_SOURCE_DIR}/../wayland/*.c)
22 27
23add_executable(swaybar 28add_executable(swaybar
24 ${sources} 29 ${sources}
25 ${wl_sources} 30 ${wl_sources}
26 ${common} 31 ${common}
27 ${proto-xdg-shell} 32 ${proto-xdg-shell}
28 ${proto-desktop-shell} 33 ${proto-desktop-shell}
29) 34)
30 35
31TARGET_LINK_LIBRARIES(swaybar ${WAYLAND_CLIENT_LIBRARIES} ${WAYLAND_CURSOR_LIBRARIES} ${CAIRO_LIBRARIES} ${PANGO_LIBRARIES} m) 36target_link_libraries(swaybar
37 ${WAYLAND_CLIENT_LIBRARIES}
38 ${WAYLAND_CURSOR_LIBRARIES}
39 ${CAIRO_LIBRARIES}
40 ${PANGO_LIBRARIES}
41 m
42)
32 43
33install( 44install(
34 TARGETS swaybar 45 TARGETS swaybar
35 RUNTIME DESTINATION bin 46 RUNTIME
36 COMPONENT runtime) 47 DESTINATION bin
48 COMPONENT runtime
49)