From 7c04cd4fc849f01aaf3c5e8b09bee0a8af39276e Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Fri, 27 Nov 2015 09:53:50 -0500 Subject: Add swaygrab subproject --- CMakeLists.txt | 1 + swaygrab/CMakeLists.txt | 16 ++++++++++++++++ swaygrab/main.c | 12 ++++++++++++ 3 files changed, 29 insertions(+) create mode 100644 swaygrab/CMakeLists.txt create mode 100644 swaygrab/main.c 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") add_subdirectory(swaybg) add_subdirectory(swaymsg) +add_subdirectory(swaygrab) find_package(XKBCommon REQUIRED) 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 @@ +project(swaygrab) + +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(swaygrab + ${sources} + ${common} +) + +install( + TARGETS swaygrab + RUNTIME DESTINATION bin + 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 @@ +#include +#include +#include "log.h" + +void sway_terminate(void) { + exit(1); +} + +int main(int argc, const char **argv) { + init_log(L_INFO); + sway_log(L_INFO, "Hello world!"); +} -- cgit v1.2.3-54-g00ecf