File tree 2 files changed +28
-5
lines changed
2 files changed +28
-5
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,10 @@ include_directories(
9
9
${CMAKE_BINARY_DIR} /headers
10
10
)
11
11
12
+ if (systemd_FOUND)
13
+ include_directories (${systemd_INCLUDE_DIRS} )
14
+ endif ()
15
+
12
16
add_definitions (
13
17
-DQT_COMPOSITOR_QUICK
14
18
)
@@ -69,14 +73,21 @@ qtwayland_add_protocol_server(SOURCES
69
73
70
74
qt5_add_resources(RESOURCES hawaii-shell.qrc)
71
75
72
- add_executable (hawaii-shell ${SOURCES} ${RESOURCES} )
73
- qt5_use_modules(hawaii-shell Quick Compositor)
74
- set_target_properties (hawaii-shell PROPERTIES
75
- LINK_FLAGS -L${WaylandServer_LIBDIR}
76
+ set (LINK_FLAGS
77
+ -L${WaylandServer_LIBDIR}
76
78
)
77
- target_link_libraries (hawaii-shell
79
+ set (LIBRARIES
78
80
${GreenIsland_LIBRARIES}
79
81
${WaylandServer_LIBRARIES}
80
82
)
83
+ if (systemd_FOUND)
84
+ set (LINK_FLAGS "${LINK_FLAGS} -L${systemd_LIBDIR} " )
85
+ set (LIBRARIES ${LIBRARIES} ${systemd_LIBRARIES} )
86
+ endif ()
87
+
88
+ add_executable (hawaii-shell ${SOURCES} ${RESOURCES} )
89
+ qt5_use_modules(hawaii-shell Quick Compositor)
90
+ set_target_properties (hawaii-shell PROPERTIES LINK_FLAGS ${LINK_FLAGS} )
91
+ target_link_libraries (hawaii-shell ${LIBRARIES} )
81
92
82
93
install (TARGETS hawaii-shell DESTINATION ${CMAKE_INSTALL_BINDIR} )
Original file line number Diff line number Diff line change 36
36
#include " cmakedirs.h"
37
37
#include " logging.h"
38
38
39
+ #if HAVE_SYSTEMD
40
+ # include < systemd/sd-daemon.h>
41
+ #endif
42
+
39
43
int main (int argc, char *argv[])
40
44
{
41
45
// Application
@@ -107,5 +111,13 @@ int main(int argc, char *argv[])
107
111
// Show compositor window
108
112
compositor->show ();
109
113
114
+ #if HAVE_SYSTEMD
115
+ sd_notifyf (0 ,
116
+ " READY=1\n "
117
+ " STATUS=Ready\n "
118
+ " MAINPID=%llu" ,
119
+ QCoreApplication::applicationPid ());
120
+ #endif
121
+
110
122
return app.exec ();
111
123
}
You can’t perform that action at this time.
0 commit comments