diff options
-rw-r--r-- | CMakeLists.txt | 1 | ||||
-rw-r--r-- | swaylock/CMakeLists.txt | 29 | ||||
-rw-r--r-- | swaylock/main.c | 13 |
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) | |||
63 | add_subdirectory(swaymsg) | 63 | add_subdirectory(swaymsg) |
64 | add_subdirectory(swaygrab) | 64 | add_subdirectory(swaygrab) |
65 | add_subdirectory(swaybar) | 65 | add_subdirectory(swaybar) |
66 | add_subdirectory(swaylock) | ||
66 | 67 | ||
67 | install( | 68 | install( |
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 @@ | |||
1 | include_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 | |||
9 | add_executable(swaylock | ||
10 | main.c | ||
11 | ) | ||
12 | |||
13 | target_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 | |||
24 | install( | ||
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 | |||
5 | void sway_terminate(void) { | ||
6 | exit(EXIT_FAILURE); | ||
7 | } | ||
8 | |||
9 | int main(int argc, char **argv) { | ||
10 | init_log(L_INFO); | ||
11 | sway_log(L_INFO, "Hello world"); | ||
12 | return 0; | ||
13 | } | ||