diff options
author | Drew DeVault <sir@cmpwn.com> | 2015-11-26 12:41:24 -0500 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2015-11-26 12:41:24 -0500 |
commit | d69cbeabc0d0f59847e0118f61ad7e4d76fc95e4 (patch) | |
tree | cdb01ed4a7a89c25b7018d8cb939369b74d3ceeb | |
parent | Merge pull request #261 from christophgysin/exec (diff) | |
download | sway-d69cbeabc0d0f59847e0118f61ad7e4d76fc95e4.tar.gz sway-d69cbeabc0d0f59847e0118f61ad7e4d76fc95e4.tar.zst sway-d69cbeabc0d0f59847e0118f61ad7e4d76fc95e4.zip |
Add swaymsg subproject
-rw-r--r-- | CMakeLists.txt | 2 | ||||
-rw-r--r-- | swaymsg/CMakeLists.txt | 16 | ||||
-rw-r--r-- | swaymsg/main.c | 11 |
3 files changed, 29 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 0e61946b..bf94ca88 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt | |||
@@ -33,7 +33,9 @@ string(TIMESTAMP CURRENT_DATE "%Y-%m-%d" UTC) | |||
33 | add_definitions('-DSWAY_VERSION_DATE="${CURRENT_DATE}"') | 33 | add_definitions('-DSWAY_VERSION_DATE="${CURRENT_DATE}"') |
34 | 34 | ||
35 | include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include") | 35 | include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include") |
36 | |||
36 | add_subdirectory(swaybg) | 37 | add_subdirectory(swaybg) |
38 | add_subdirectory(swaymsg) | ||
37 | 39 | ||
38 | find_package(XKBCommon REQUIRED) | 40 | find_package(XKBCommon REQUIRED) |
39 | find_package(WLC REQUIRED) | 41 | find_package(WLC REQUIRED) |
diff --git a/swaymsg/CMakeLists.txt b/swaymsg/CMakeLists.txt new file mode 100644 index 00000000..79af0f3e --- /dev/null +++ b/swaymsg/CMakeLists.txt | |||
@@ -0,0 +1,16 @@ | |||
1 | project(swaymsg) | ||
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(swaymsg | ||
9 | ${sources} | ||
10 | ${common} | ||
11 | ) | ||
12 | |||
13 | install( | ||
14 | TARGETS swaymsg | ||
15 | RUNTIME DESTINATION bin | ||
16 | COMPONENT runtime) | ||
diff --git a/swaymsg/main.c b/swaymsg/main.c new file mode 100644 index 00000000..824af0e6 --- /dev/null +++ b/swaymsg/main.c | |||
@@ -0,0 +1,11 @@ | |||
1 | #include <stdio.h> | ||
2 | #include <stdlib.h> | ||
3 | |||
4 | void sway_terminate(void) { | ||
5 | exit(1); | ||
6 | } | ||
7 | |||
8 | int main(int argc, const char **argv) { | ||
9 | printf("Hello world!"); | ||
10 | return 0; | ||
11 | } | ||