diff options
author | Drew DeVault <sir@cmpwn.com> | 2015-11-27 09:53:50 -0500 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2015-11-27 09:53:50 -0500 |
commit | 7c04cd4fc849f01aaf3c5e8b09bee0a8af39276e (patch) | |
tree | 77f14711471cd0688ff75725ef3e76d3bd04e441 | |
parent | Move IPC client into common, refactor IPC (diff) | |
download | sway-7c04cd4fc849f01aaf3c5e8b09bee0a8af39276e.tar.gz sway-7c04cd4fc849f01aaf3c5e8b09bee0a8af39276e.tar.zst sway-7c04cd4fc849f01aaf3c5e8b09bee0a8af39276e.zip |
Add swaygrab subproject
-rw-r--r-- | CMakeLists.txt | 1 | ||||
-rw-r--r-- | swaygrab/CMakeLists.txt | 16 | ||||
-rw-r--r-- | swaygrab/main.c | 12 |
3 files changed, 29 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 55d2cde8..15646251 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt | |||
@@ -36,6 +36,7 @@ include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include") | |||
36 | 36 | ||
37 | add_subdirectory(swaybg) | 37 | add_subdirectory(swaybg) |
38 | add_subdirectory(swaymsg) | 38 | add_subdirectory(swaymsg) |
39 | add_subdirectory(swaygrab) | ||
39 | 40 | ||
40 | find_package(XKBCommon REQUIRED) | 41 | find_package(XKBCommon REQUIRED) |
41 | find_package(WLC REQUIRED) | 42 | find_package(WLC REQUIRED) |
diff --git a/swaygrab/CMakeLists.txt b/swaygrab/CMakeLists.txt new file mode 100644 index 00000000..5b47a694 --- /dev/null +++ b/swaygrab/CMakeLists.txt | |||
@@ -0,0 +1,16 @@ | |||
1 | project(swaygrab) | ||
2 | |||
3 | set(CMAKE_CURRENT_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/../bin/) | ||
4 | |||
5 | FILE(GLOB sources ${PROJECT_SOURCE_DIR}/*.c) | ||
6 | FILE(GLOB common ${PROJECT_SOURCE_DIR}/../common/*.c) | ||
7 | |||
8 | add_executable(swaygrab | ||
9 | ${sources} | ||
10 | ${common} | ||
11 | ) | ||
12 | |||
13 | install( | ||
14 | TARGETS swaygrab | ||
15 | RUNTIME DESTINATION bin | ||
16 | COMPONENT runtime) | ||
diff --git a/swaygrab/main.c b/swaygrab/main.c new file mode 100644 index 00000000..4a15bd06 --- /dev/null +++ b/swaygrab/main.c | |||
@@ -0,0 +1,12 @@ | |||
1 | #include <stdio.h> | ||
2 | #include <stdlib.h> | ||
3 | #include "log.h" | ||
4 | |||
5 | void sway_terminate(void) { | ||
6 | exit(1); | ||
7 | } | ||
8 | |||
9 | int main(int argc, const char **argv) { | ||
10 | init_log(L_INFO); | ||
11 | sway_log(L_INFO, "Hello world!"); | ||
12 | } | ||