diff options
author | Christoph Gysin <christoph.gysin@gmail.com> | 2015-12-02 07:57:53 +0200 |
---|---|---|
committer | Christoph Gysin <christoph.gysin@gmail.com> | 2015-12-02 12:15:57 +0200 |
commit | 96dda68170114524b2a424dacf6a1e059175cb31 (patch) | |
tree | 298a9d0d374d85b51eb4d4f19f8e7e797e850c2d /CMakeLists.txt | |
parent | ef192c5e4f5289c1e6ea32c1eb37d5b1f82b4534 (diff) | |
download | swaybg-96dda68170114524b2a424dacf6a1e059175cb31.tar.gz swaybg-96dda68170114524b2a424dacf6a1e059175cb31.tar.bz2 |
cmake: build common code only once
This creates (static) libraries for protocols/, common/, and wayland/.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 28 |
1 files changed, 4 insertions, 24 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 9d3cc54..71363d7 100644 --- a/CMakeLists.txt +++ b/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(swaybg - ${sources} - ${wl_sources} - ${common} - ${proto-xdg-shell} - ${proto-desktop-shell} + main.c ) target_link_libraries(swaybg + sway-common + sway-wayland ${WAYLAND_CLIENT_LIBRARIES} ${WAYLAND_CURSOR_LIBRARIES} ${CAIRO_LIBRARIES} |