From 5ae191cf219249173256a27ce398062335079d0b Mon Sep 17 00:00:00 2001 From: Ralf Habacker Date: Fri, 20 Feb 2015 19:04:42 +0100 Subject: [PATCH 1/4] 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 --- cmake/dbus/CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmake/dbus/CMakeLists.txt b/cmake/dbus/CMakeLists.txt index f7bf476..c3b5878 100644 --- a/cmake/dbus/CMakeLists.txt +++ b/cmake/dbus/CMakeLists.txt @@ -259,12 +259,12 @@ add_library(dbus-1 SHARED ${libdbus_SOURCES} ${libdbus_HEADERS} ) -if(DBUS_LIBRARY_REVISION) +if(DEFINED DBUS_LIBRARY_REVISION) math(EXPR DBUS_LIBRARY_MAJOR "${DBUS_LIBRARY_CURRENT} - ${DBUS_LIBRARY_AGE}") endif() if(WIN32) - if(DBUS_LIBRARY_REVISION) + 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 @@ -279,7 +279,7 @@ if(WIN32) target_link_libraries(dbus-1 ws2_32 advapi32 netapi32 iphlpapi) endif(WINCE) 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}) endif() target_link_libraries(dbus-1 ${CMAKE_THREAD_LIBS_INIT} rt) -- 1.8.4.5