Commit 5d8f82d6 authored by Ralf Habacker's avatar Ralf Habacker
Browse files

Fix cmake build system bug not generating versioned library name in case LT_REVISION is zero.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=89450

Reviewed-by: default avatarSimon McVittie <simon.mcvittie@collabora.co.uk>
parent ee9c52ca
...@@ -259,12 +259,12 @@ add_library(dbus-1 SHARED ...@@ -259,12 +259,12 @@ add_library(dbus-1 SHARED
${libdbus_SOURCES} ${libdbus_SOURCES}
${libdbus_HEADERS} ${libdbus_HEADERS}
) )
if(DBUS_LIBRARY_REVISION) if(DEFINED DBUS_LIBRARY_REVISION)
math(EXPR DBUS_LIBRARY_MAJOR "${DBUS_LIBRARY_CURRENT} - ${DBUS_LIBRARY_AGE}") math(EXPR DBUS_LIBRARY_MAJOR "${DBUS_LIBRARY_CURRENT} - ${DBUS_LIBRARY_AGE}")
endif() endif()
if(WIN32) if(WIN32)
if(DBUS_LIBRARY_REVISION) if(DEFINED DBUS_LIBRARY_REVISION)
get_target_property(LEGACY_FILE_NAME dbus-1 LOCATION) get_target_property(LEGACY_FILE_NAME dbus-1 LOCATION)
set_target_properties(dbus-1 PROPERTIES SUFFIX "-${DBUS_LIBRARY_MAJOR}${CMAKE_SHARED_LIBRARY_SUFFIX}") set_target_properties(dbus-1 PROPERTIES SUFFIX "-${DBUS_LIBRARY_MAJOR}${CMAKE_SHARED_LIBRARY_SUFFIX}")
add_custom_command(TARGET dbus-1 POST_BUILD add_custom_command(TARGET dbus-1 POST_BUILD
...@@ -279,7 +279,7 @@ if(WIN32) ...@@ -279,7 +279,7 @@ if(WIN32)
target_link_libraries(dbus-1 ws2_32 advapi32 netapi32 iphlpapi) target_link_libraries(dbus-1 ws2_32 advapi32 netapi32 iphlpapi)
endif(WINCE) endif(WINCE)
else(WIN32) else(WIN32)
if(DBUS_LIBRARY_REVISION) if(DEFINED DBUS_LIBRARY_REVISION)
set_target_properties(dbus-1 PROPERTIES VERSION ${DBUS_LIBRARY_MAJOR}.${DBUS_LIBRARY_AGE}.${DBUS_LIBRARY_REVISION} SOVERSION ${DBUS_LIBRARY_MAJOR}) set_target_properties(dbus-1 PROPERTIES VERSION ${DBUS_LIBRARY_MAJOR}.${DBUS_LIBRARY_AGE}.${DBUS_LIBRARY_REVISION} SOVERSION ${DBUS_LIBRARY_MAJOR})
endif() endif()
target_link_libraries(dbus-1 ${CMAKE_THREAD_LIBS_INIT} rt) target_link_libraries(dbus-1 ${CMAKE_THREAD_LIBS_INIT} rt)
......
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