aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt1
-rw-r--r--swaylock/CMakeLists.txt29
-rw-r--r--swaylock/main.c13
3 files changed, 43 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3972e730..2d7623b0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -63,6 +63,7 @@ add_subdirectory(swaybg)
63add_subdirectory(swaymsg) 63add_subdirectory(swaymsg)
64add_subdirectory(swaygrab) 64add_subdirectory(swaygrab)
65add_subdirectory(swaybar) 65add_subdirectory(swaybar)
66add_subdirectory(swaylock)
66 67
67install( 68install(
68 FILES ${CMAKE_CURRENT_SOURCE_DIR}/sway.desktop 69 FILES ${CMAKE_CURRENT_SOURCE_DIR}/sway.desktop
diff --git a/swaylock/CMakeLists.txt b/swaylock/CMakeLists.txt
new file mode 100644
index 00000000..69fe4252
--- /dev/null
+++ b/swaylock/CMakeLists.txt
@@ -0,0 +1,29 @@
1include_directories(
2 ${PROTOCOLS_INCLUDE_DIRS}
3 ${WAYLAND_CLIENT_INCLUDE_DIR}
4 ${CAIRO_INCLUDE_DIRS}
5 ${GDK_PIXBUF_INCLUDE_DIRS}
6 ${PANGO_INCLUDE_DIRS}
7)
8
9add_executable(swaylock
10 main.c
11)
12
13target_link_libraries(swaylock
14 sway-common
15 sway-wayland
16 ${WAYLAND_CLIENT_LIBRARIES}
17 ${WAYLAND_CURSOR_LIBRARIES}
18 ${CAIRO_LIBRARIES}
19 ${GDK_PIXBUF_LIBRARIES}
20 ${PANGO_LIBRARIES}
21 m
22)
23
24install(
25 TARGETS swaylock
26 RUNTIME
27 DESTINATION bin
28 COMPONENT runtime
29)
diff --git a/swaylock/main.c b/swaylock/main.c
new file mode 100644
index 00000000..37513b4d
--- /dev/null
+++ b/swaylock/main.c
@@ -0,0 +1,13 @@
1#include <stdio.h>
2#include <stdlib.h>
3#include "log.h"
4
5void sway_terminate(void) {
6 exit(EXIT_FAILURE);
7}
8
9int main(int argc, char **argv) {
10 init_log(L_INFO);
11 sway_log(L_INFO, "Hello world");
12 return 0;
13}