From 286923789ebe5c85b1f89b0b8279c498a968cb78 Mon Sep 17 00:00:00 2001 From: Ralf Habacker Date: Mon, 29 Apr 2013 20:27:12 +0200 Subject: [PATCH] Fixed cmake windows build system bug not installing runtime part of shared libraries into bin dir. This patch also take care of different install directories on unix like os. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=59733 Reviewed-by: Simon McVittie --- cmake/CMakeLists.txt | 6 ++++++ cmake/dbus/CMakeLists.txt | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 45d7fb8..9c1ef2e 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -70,6 +70,12 @@ set(DBUS_DAEMONDIR ${EXPANDED_BINDIR}) #enable building of shared library SET(BUILD_SHARED_LIBS ON) +if(WIN32) + set(INSTALL_TARGETS_DEFAULT_ARGS RUNTIME DESTINATION "bin" LIBRARY DESTINATION "lib" ARCHIVE DESTINATION "lib") +else() + set(INSTALL_TARGETS_DEFAULT_ARGS RUNTIME DESTINATION "${EXPANDED_LIBDIR}" LIBRARY DESTINATION "${EXPANDED_LIBDIR}" ARCHIVE DESTINATION "${EXPANDED_LIBDIR}") +endif() + if (CYGWIN) set (WIN32) endif (CYGWIN) diff --git a/cmake/dbus/CMakeLists.txt b/cmake/dbus/CMakeLists.txt index 66772c5..f70711a 100644 --- a/cmake/dbus/CMakeLists.txt +++ b/cmake/dbus/CMakeLists.txt @@ -270,7 +270,7 @@ else(WIN32) target_link_libraries(dbus-1 ${CMAKE_THREAD_LIBS_INIT} rt) endif(WIN32) -install_targets(/lib dbus-1 ) +install(TARGETS dbus-1 ${INSTALL_TARGETS_DEFAULT_ARGS}) install_files(/include/dbus FILES ${dbusinclude_HEADERS}) ### Internal library, used for the daemon, tools and tests, compiled statically. -- 2.7.4