X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=CMakeLists.txt;h=0188cee760bb11323c2e2ec58f920a8aee206f3e;hb=270620a55c0144f0af05f006523f2d294298ade2;hp=2d5f962685a402e3955606c3e5839108f6ed83dc;hpb=ce69e8d3bd97e8c49dc09841d6af1d270e3ea5f0;p=profile%2Fivi%2Flibwebsockets.git diff --git a/CMakeLists.txt b/CMakeLists.txt index 2d5f962..0188cee 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -48,6 +48,7 @@ option(WITHOUT_DEBUG "Don't compile debug related code" OFF) option(WITHOUT_EXTENSIONS "Don't compile with extensions" OFF) option(WITH_LATENCY "Build latency measuring code into the library" OFF) option(WITHOUT_DAEMONIZE "Don't build the daemonization api" OFF) +option(WITH_SD_DAEMON "Build support for systemd based socket activation" OFF) if (WITHOUT_CLIENT AND WITHOUT_SERVER) message(FATAL_ERROR "Makes no sense to compile without both client or server.") @@ -357,6 +358,19 @@ set(LIB_LIST) # # +# SD_DAEMON (Only needed if systemd socket activation is desired.) +# +if (WITH_SD_DAEMON) + find_package(PkgConfig) + pkg_check_modules(SD_DAEMON REQUIRED libsystemd-daemon) + + include_directories(${SD_DAEMON_INCLUDE_DIRS}) + list(APPEND LIB_LIST ${SD_DAEMON_LIBRARIES}) + add_definitions(${SD_DAEMON_CFLAGS_OTHER}) + add_definitions(-DHAVE_SYSTEMD_DAEMON) +endif() + +# # ZLIB (Only needed for deflate extensions). # if (NOT WITHOUT_EXTENSIONS) @@ -695,7 +709,7 @@ Cflags: -I\${includedir}" ) install(FILES ${PROJECT_BINARY_DIR}/libwebsockets.pc - DESTINATION include/pkgconfig) + DESTINATION lib${LIB_SUFFIX}/pkgconfig) endif() # Install headers.