diff options
author | 2015-12-02 05:34:18 -0500 | |
---|---|---|
committer | 2015-12-02 05:34:18 -0500 | |
commit | 7a1c8c2939c8581bb47323513b91a94aebf62b36 (patch) | |
tree | 717052d8d88f3fd14d26566daa520dbdd3a452fe /swaybg/CMakeLists.txt | |
parent | Merge pull request #290 from christophgysin/cmake (diff) | |
parent | cmake: build common code only once (diff) | |
download | sway-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 'swaybg/CMakeLists.txt')
-rw-r--r-- | swaybg/CMakeLists.txt | 28 |
1 files changed, 4 insertions, 24 deletions
diff --git a/swaybg/CMakeLists.txt b/swaybg/CMakeLists.txt index 9d3cc547..71363d79 100644 --- a/swaybg/CMakeLists.txt +++ b/swaybg/CMakeLists.txt | |||
@@ -1,37 +1,17 @@ | |||
1 | find_package(Wayland REQUIRED) | ||
2 | find_package(Cairo REQUIRED) | ||
3 | find_package(Pango REQUIRED) | ||
4 | |||
5 | include(Wayland) | ||
6 | WAYLAND_ADD_PROTOCOL_CLIENT(proto-xdg-shell | ||
7 | ../protocols/xdg-shell.xml | ||
8 | xdg-shell | ||
9 | ) | ||
10 | WAYLAND_ADD_PROTOCOL_CLIENT(proto-desktop-shell | ||
11 | ../protocols/desktop-shell.xml | ||
12 | desktop-shell | ||
13 | ) | ||
14 | |||
15 | include_directories( | 1 | include_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 | ||
22 | file(GLOB sources *.c) | ||
23 | file(GLOB common ../common/*.c) | ||
24 | file(GLOB wl_sources ../wayland/*.c) | ||
25 | |||
26 | add_executable(swaybg | 8 | add_executable(swaybg |
27 | ${sources} | 9 | main.c |
28 | ${wl_sources} | ||
29 | ${common} | ||
30 | ${proto-xdg-shell} | ||
31 | ${proto-desktop-shell} | ||
32 | ) | 10 | ) |
33 | 11 | ||
34 | target_link_libraries(swaybg | 12 | target_link_libraries(swaybg |
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} |