Commit 924bff39 authored by Ralf Habacker's avatar Ralf Habacker

cmake: stop using deprecated LOCATION property (policy CMP0026)

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=89450Reviewed-by: default avatarSimon McVittie <simon.mcvittie@collabora.co.uk>
parent 5d8f82d6
......@@ -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)
......
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment