From 1b809dca7f87ed57809e78dc291aabf065c24a9f 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. --- cmake/CMakeLists.txt | 6 ++++++ cmake/dbus/CMakeLists.txt | 2 +- 2 Dateien geändert, 7 Zeilen hinzugefügt(+), 1 Zeile entfernt(-) 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. -- 1.7.10.4