aboutsummaryrefslogtreecommitdiff
path: root/swaybar/CMakeLists.txt
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2015-12-02 05:34:18 -0500
committerDrew DeVault <sir@cmpwn.com>2015-12-02 05:34:18 -0500
commit7a1c8c2939c8581bb47323513b91a94aebf62b36 (patch)
tree717052d8d88f3fd14d26566daa520dbdd3a452fe /swaybar/CMakeLists.txt
parentf76b7f5385f79f9e004a096ed4896725cac30f9c (diff)
parentcce9c338c07e889aa82db806f0dddf2f997edbb6 (diff)
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 @@
-find_package(Wayland REQUIRED)
-find_package(Cairo REQUIRED)
-find_package(Pango REQUIRED)
-
-include(Wayland)
-WAYLAND_ADD_PROTOCOL_CLIENT(proto-xdg-shell
- ../protocols/xdg-shell.xml
- xdg-shell
-)
-WAYLAND_ADD_PROTOCOL_CLIENT(proto-desktop-shell
- ../protocols/desktop-shell.xml
- desktop-shell
-)
-
include_directories(
+ ${PROTOCOLS_INCLUDE_DIRS}
${WAYLAND_CLIENT_INCLUDE_DIR}
${CAIRO_INCLUDE_DIRS}
${PANGO_INCLUDE_DIRS}
- ${CMAKE_CURRENT_BINARY_DIR}
)
-file(GLOB sources *.c)
-file(GLOB common ../common/*.c)
-file(GLOB wl_sources ../wayland/*.c)
-
add_executable(swaybar
- ${sources}
- ${wl_sources}
- ${common}
- ${proto-xdg-shell}
- ${proto-desktop-shell}
+ main.c
)
target_link_libraries(swaybar
+ sway-common
+ sway-wayland
${WAYLAND_CLIENT_LIBRARIES}
${WAYLAND_CURSOR_LIBRARIES}
${CAIRO_LIBRARIES}