From 151c77bbb78c68a3fffcfa6cc8bbd5e89a9fc4d7 Mon Sep 17 00:00:00 2001 From: Ralf Habacker Date: Thu, 5 Mar 2015 23:44:44 +0100 Subject: [PATCH 2/4] Fix cmake 3.1.3 policy CMP0026 warning. We can set this policy to NEW, because related parts has been refactored. See http://www.cmake.org/cmake/help/v3.1/policy/CMP0026.html for more details. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=89450 --- cmake/CMakeLists.txt | 3 +++ cmake/dbus/CMakeLists.txt | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 5094990..582d05b 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 c3b5878..1701408 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 "$" "${LEGACY_FILE_NAME}" + COMMAND ${CMAKE_COMMAND} -E copy "$" "$/${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) -- 1.8.4.5