summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorRalf Habacker <ralf.habacker@freenet.de>2015-02-20 19:04:42 +0100
committerRalf Habacker <ralf.habacker@freenet.de>2015-03-06 20:29:36 +0100
commit5d8f82d63885be22075f9e1cedafef25a316a336 (patch)
tree25443f875935a26ab7cf7c3e3a0e818842cecf4f /cmake
parentee9c52ca3358feccbc200424dea64c96f3ca211e (diff)
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: Simon McVittie <simon.mcvittie@collabora.co.uk>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/dbus/CMakeLists.txt6
1 files changed, 3 insertions, 3 deletions
diff --git a/cmake/dbus/CMakeLists.txt b/cmake/dbus/CMakeLists.txt
index f7bf4761..c3b58789 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)