Set VERSION and SOVERSION on shared libraries (compatible with versions from the...
authorThomas Jarosch <thomas.jarosch@intra2net.com>
Mon, 16 Mar 2009 20:35:39 +0000 (21:35 +0100)
committerThomas Jarosch <thomas.jarosch@intra2net.com>
Mon, 16 Mar 2009 20:35:39 +0000 (21:35 +0100)
ftdipp/CMakeLists.txt
src/CMakeLists.txt

index 66efc32..aff4ca3 100644 (file)
@@ -20,6 +20,9 @@ message(STATUS "Building libftdi++")
 # Targets
 add_library(ftdipp SHARED ${cpp_sources})
 
+math(EXPR VERSION_FIXUP "${MAJOR_VERSION} + 1")    # Compatiblity with previous releases
+set_target_properties(ftdipp PROPERTIES VERSION ${VERSION_FIXUP}.${MINOR_VERSION}.0 SOVERSION 1)
+
 # Static library
 add_library(ftdipp-static STATIC ${cpp_sources})
 set_target_properties(ftdipp-static PROPERTIES OUTPUT_NAME "ftdipp")
index e1ab82d..0a6a917 100644 (file)
@@ -9,6 +9,9 @@ set(c_headers     ftdi.h)
 
 add_library(ftdi SHARED ${c_sources})
 
+math(EXPR VERSION_FIXUP "${MAJOR_VERSION} + 1")    # Compatiblity with previous releases
+set_target_properties(ftdi PROPERTIES VERSION ${VERSION_FIXUP}.${MINOR_VERSION}.0 SOVERSION 1)
+
 # Static library
 add_library(ftdi-static STATIC ${c_sources})
 set_target_properties(ftdi-static PROPERTIES OUTPUT_NAME "ftdi")