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 <simon.mcvittie@collabora.co.uk>
This commit is contained in:
Ralf Habacker 2013-04-29 20:27:12 +02:00
parent 7ff0cd0640
commit 286923789e
2 changed files with 7 additions and 1 deletions

View file

@ -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)

View file

@ -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.