From: Ralf Habacker Date: Mon, 27 Apr 2020 18:19:57 +0000 (+0200) Subject: cmake: build and install dbus-uuidgen on non Windows platforms X-Git-Tag: dbus-1.13.16~8^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f88ca3b853d278bfb71234d31139b4bc52d4151c;p=thirdparty%2Fdbus.git cmake: build and install dbus-uuidgen on non Windows platforms --- diff --git a/dbus/CMakeLists.txt b/dbus/CMakeLists.txt index 2fedcba4f..972e05c15 100644 --- a/dbus/CMakeLists.txt +++ b/dbus/CMakeLists.txt @@ -61,6 +61,7 @@ set(DBUS_LIB_SOURCES if(UNIX) set(DBUS_LIB_SOURCES ${DBUS_LIB_SOURCES} + dbus-uuidgen.c dbus-transport-unix.c dbus-server-unix.c ) @@ -95,6 +96,7 @@ set(DBUS_LIB_HEADERS dbus-threads-internal.h dbus-transport.h dbus-transport-protected.h + dbus-uuidgen.h dbus-watch.h ${CMAKE_BINARY_DIR}/config.h ) diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index 21efa98f0..dde82beea 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -59,6 +59,10 @@ set(dbus_run_session_SOURCES dbus-run-session.c ) +set(dbus_uuidgen_SOURCES + dbus-uuidgen.c +) + if(WIN32) add_executable_version_info(dbus_send_SOURCES "dbus-send") endif() @@ -112,6 +116,12 @@ add_executable(dbus-run-session ${dbus_run_session_SOURCES}) target_link_libraries(dbus-run-session ${DBUS_INTERNAL_LIBRARIES}) install(TARGETS dbus-run-session ${INSTALL_TARGETS_DEFAULT_ARGS}) +if(NOT WIN32) + add_executable(dbus-uuidgen ${dbus_uuidgen_SOURCES}) + target_link_libraries(dbus-uuidgen ${DBUS_LIBRARIES}) + install(TARGETS dbus-uuidgen ${INSTALL_TARGETS_DEFAULT_ARGS}) +endif() + # create the /var/lib/dbus directory for dbus-uuidgen install(DIRECTORY DESTINATION ${CMAKE_INSTALL_LOCALSTATEDIR}/lib/dbus)