summaryrefslogtreecommitdiffstats
path: root/swaybar/CMakeLists.txt
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2015-12-02 05:34:18 -0500
committerLibravatar Drew DeVault <sir@cmpwn.com>2015-12-02 05:34:18 -0500
commit7a1c8c2939c8581bb47323513b91a94aebf62b36 (patch)
tree717052d8d88f3fd14d26566daa520dbdd3a452fe /swaybar/CMakeLists.txt
parentMerge pull request #290 from christophgysin/cmake (diff)
parentcmake: build common code only once (diff)
downloadsway-7a1c8c2939c8581bb47323513b91a94aebf62b36.tar.gz
sway-7a1c8c2939c8581bb47323513b91a94aebf62b36.tar.zst
sway-7a1c8c2939c8581bb47323513b91a94aebf62b36.zip
Merge pull request #291 from christophgysin/libs
cmake: build common code only once
Diffstat (limited to 'swaybar/CMakeLists.txt')
-rw-r--r--swaybar/CMakeLists.txt28
1 files changed, 4 insertions, 24 deletions
diff --git a/swaybar/CMakeLists.txt b/swaybar/CMakeLists.txt
index c14b5f75..a2ff9f5a 100644
--- a/swaybar/CMakeLists.txt
+++ b/swaybar/CMakeLists.txt
@@ -1,37 +1,17 @@
1find_package(Wayland REQUIRED)
2find_package(Cairo REQUIRED)
3find_package(Pango REQUIRED)
4
5include(Wayland)
6WAYLAND_ADD_PROTOCOL_CLIENT(proto-xdg-shell
7 ../protocols/xdg-shell.xml
8 xdg-shell
9)
10WAYLAND_ADD_PROTOCOL_CLIENT(proto-desktop-shell
11 ../protocols/desktop-shell.xml
12 desktop-shell
13)
14
15include_directories( 1include_directories(
2 ${PROTOCOLS_INCLUDE_DIRS}
16 ${WAYLAND_CLIENT_INCLUDE_DIR} 3 ${WAYLAND_CLIENT_INCLUDE_DIR}
17 ${CAIRO_INCLUDE_DIRS} 4 ${CAIRO_INCLUDE_DIRS}
18 ${PANGO_INCLUDE_DIRS} 5 ${PANGO_INCLUDE_DIRS}
19 ${CMAKE_CURRENT_BINARY_DIR}
20) 6)
21 7
22file(GLOB sources *.c)
23file(GLOB common ../common/*.c)
24file(GLOB wl_sources ../wayland/*.c)
25
26add_executable(swaybar 8add_executable(swaybar
27 ${sources} 9 main.c
28 ${wl_sources}
29 ${common}
30 ${proto-xdg-shell}
31 ${proto-desktop-shell}
32) 10)
33 11
34target_link_libraries(swaybar 12target_link_libraries(swaybar
13 sway-common
14 sway-wayland
35 ${WAYLAND_CLIENT_LIBRARIES} 15 ${WAYLAND_CLIENT_LIBRARIES}
36 ${WAYLAND_CURSOR_LIBRARIES} 16 ${WAYLAND_CURSOR_LIBRARIES}
37 ${CAIRO_LIBRARIES} 17 ${CAIRO_LIBRARIES}