From 20fa662337b91d0c5e2b135ef283d691038e7c55 Mon Sep 17 00:00:00 2001 From: Ralf Habacker Date: Tue, 14 Jan 2014 23:41:59 +0100 Subject: [PATCH 1/2] Use cmake 'install' command instead of deprecated 'install_files'. --- cmake/CMakeLists.txt | 2 +- cmake/bus/CMakeLists.txt | 10 +++++----- cmake/dbus/CMakeLists.txt | 4 ++-- cmake/modules/CPackInstallConfig.cmake | 2 +- 4 Dateien geändert, 9 Zeilen hinzugefügt(+), 9 Zeilen entfernt(-) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 179617b..dcdc8ea 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -491,7 +491,7 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_BINARY if (WIN32) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/dbus-env.bat.cmake ${CMAKE_BINARY_DIR}/bin/dbus-env.bat ) -install_files(/bin FILES ${CMAKE_BINARY_DIR}/bin/dbus-env.bat) +install(FILES ${CMAKE_BINARY_DIR}/bin/dbus-env.bat DESTINATION bin) endif() add_definitions(-DHAVE_CONFIG_H=1) diff --git a/cmake/bus/CMakeLists.txt b/cmake/bus/CMakeLists.txt index f5b41cd..901dde3 100644 --- a/cmake/bus/CMakeLists.txt +++ b/cmake/bus/CMakeLists.txt @@ -4,8 +4,8 @@ SET(EFENCE "") SET(BUS_DIR ${CMAKE_SOURCE_DIR}/../bus) set (config_DATA - session.conf - system.conf + ${CMAKE_CURRENT_BINARY_DIR}/session.conf + ${CMAKE_CURRENT_BINARY_DIR}/system.conf ) # config files for installation @@ -87,8 +87,8 @@ target_link_libraries(dbus-daemon ${DBUS_INTERNAL_LIBRARIES} ${XML_LIBRARY}) set_target_properties(dbus-daemon PROPERTIES OUTPUT_NAME ${DBUS_DAEMON_NAME}) set_target_properties(dbus-daemon PROPERTIES COMPILE_FLAGS ${DBUS_INTERNAL_CLIENT_DEFINITIONS}) -install_targets(/bin dbus-daemon) -install_files(/etc/dbus-1 FILES ${config_DATA}) +install(TARGETS dbus-daemon DESTINATION bin) +install(FILES ${config_DATA} DESTINATION etc/dbus-1) install(DIRECTORY . DESTINATION etc/dbus-1/session.d FILES_MATCHING PATTERN "*.conf") if (DBUS_SERVICE) @@ -102,7 +102,7 @@ if (DBUS_SERVICE) add_executable(dbus-service ${dbus_service_SOURCES} ) target_link_libraries(dbus-service ${DBUS_INTERNAL_LIBRARIES} ${XML_LIBRARY}) set_target_properties(dbus-service PROPERTIES COMPILE_FLAGS ${DBUS_INTERNAL_CLIENT_DEFINITIONS}) - install_targets(/bin dbus-service ) + install(TARGET dbus-service DESTINATION bin) endif (DBUS_SERVICE) if (DBUS_ENABLE_EMBEDDED_TESTS) diff --git a/cmake/dbus/CMakeLists.txt b/cmake/dbus/CMakeLists.txt index a5481b7..035e3a7 100644 --- a/cmake/dbus/CMakeLists.txt +++ b/cmake/dbus/CMakeLists.txt @@ -22,7 +22,7 @@ set (dbusinclude_HEADERS ${DBUS_DIR}/dbus-syntax.h ${DBUS_DIR}/dbus-threads.h ${DBUS_DIR}/dbus-types.h - dbus-arch-deps.h + ${CMAKE_CURRENT_BINARY_DIR}/dbus-arch-deps.h ) ### source code that goes in the installed client library @@ -272,7 +272,7 @@ else(WIN32) endif(WIN32) install(TARGETS dbus-1 ${INSTALL_TARGETS_DEFAULT_ARGS}) -install_files(/include/dbus FILES ${dbusinclude_HEADERS}) +install(FILES ${dbusinclude_HEADERS} DESTINATION include/dbus) ### Internal library, used for the daemon, tools and tests, compiled statically. diff --git a/cmake/modules/CPackInstallConfig.cmake b/cmake/modules/CPackInstallConfig.cmake index 74b6689..aee6230 100644 --- a/cmake/modules/CPackInstallConfig.cmake +++ b/cmake/modules/CPackInstallConfig.cmake @@ -1,7 +1,7 @@ if (DBUS_INSTALL_SYSTEM_LIBS) if (MINGW) - install_files(/bin FILES ${LIBEXPAT_LIBRARIES}) + install(FILES ${LIBEXPAT_LIBRARIES} DESTINATION bin) else (MINGW) INCLUDE(InstallRequiredSystemLibraries) endif (MINGW) -- 1.7.10.4