From d69cbeabc0d0f59847e0118f61ad7e4d76fc95e4 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Thu, 26 Nov 2015 12:41:24 -0500 Subject: Add swaymsg subproject --- CMakeLists.txt | 2 ++ swaymsg/CMakeLists.txt | 16 ++++++++++++++++ swaymsg/main.c | 11 +++++++++++ 3 files changed, 29 insertions(+) create mode 100644 swaymsg/CMakeLists.txt create mode 100644 swaymsg/main.c 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) add_definitions('-DSWAY_VERSION_DATE="${CURRENT_DATE}"') include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include") + add_subdirectory(swaybg) +add_subdirectory(swaymsg) find_package(XKBCommon REQUIRED) 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 @@ +project(swaymsg) + +set(CMAKE_CURRENT_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/../bin/) + +FILE(GLOB sources ${PROJECT_SOURCE_DIR}/*.c) +FILE(GLOB common ${PROJECT_SOURCE_DIR}/../common/*.c) + +add_executable(swaymsg + ${sources} + ${common} +) + +install( + TARGETS swaymsg + RUNTIME DESTINATION bin + 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 @@ +#include +#include + +void sway_terminate(void) { + exit(1); +} + +int main(int argc, const char **argv) { + printf("Hello world!"); + return 0; +} -- cgit v1.2.3-54-g00ecf