diff options
author | Ralf Habacker <ralf.habacker@freenet.de> | 2015-03-05 23:44:44 +0100 |
---|---|---|
committer | Ralf Habacker <ralf.habacker@freenet.de> | 2015-03-06 20:32:30 +0100 |
commit | 924bff39e6890ec7a50575e5c8318ea1867f8a4e (patch) | |
tree | 2dc32b8f8d2f0c888aa8306ad064e4bad18caf97 /cmake | |
parent | 5d8f82d63885be22075f9e1cedafef25a316a336 (diff) |
cmake: stop using deprecated LOCATION property (policy CMP0026)
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=89450
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/CMakeLists.txt | 3 | ||||
-rw-r--r-- | cmake/dbus/CMakeLists.txt | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 50949907..582d05b2 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -12,6 +12,9 @@ if(COMMAND cmake_policy) cmake_policy(SET CMP0003 NEW) endif(COMMAND cmake_policy) +if(CMAKE_MAJOR_VERSION GREATER 2) + cmake_policy(SET CMP0026 NEW) +endif() # detect version include(MacrosAutotools) diff --git a/cmake/dbus/CMakeLists.txt b/cmake/dbus/CMakeLists.txt index c3b58789..17014084 100644 --- a/cmake/dbus/CMakeLists.txt +++ b/cmake/dbus/CMakeLists.txt @@ -265,10 +265,9 @@ endif() if(WIN32) if(DEFINED DBUS_LIBRARY_REVISION) - get_target_property(LEGACY_FILE_NAME dbus-1 LOCATION) set_target_properties(dbus-1 PROPERTIES SUFFIX "-${DBUS_LIBRARY_MAJOR}${CMAKE_SHARED_LIBRARY_SUFFIX}") add_custom_command(TARGET dbus-1 POST_BUILD - COMMAND ${CMAKE_COMMAND} -E copy "$<TARGET_FILE:dbus-1>" "${LEGACY_FILE_NAME}" + COMMAND ${CMAKE_COMMAND} -E copy "$<TARGET_FILE:dbus-1>" "$<TARGET_FILE_DIR:dbus-1>/${CMAKE_SHARED_LIBRARY_PREFIX}dbus-1${CMAKE_SHARED_LIBRARY_SUFFIX}" COMMENT "Create non versioned dbus-1 library for legacy applications" ) install(FILES ${LEGACY_FILE_NAME} DESTINATION bin) |