]> git.mxchange.org Git - simgear.git/commitdiff
Add version suffix when building shared objects
authorThorstenB <brehmt@gmail.com>
Thu, 29 Dec 2011 13:45:29 +0000 (14:45 +0100)
committerThorstenB <brehmt@gmail.com>
Thu, 29 Dec 2011 13:45:29 +0000 (14:45 +0100)
CMakeLists.txt
simgear/CMakeLists.txt

index 07363346e9bce01f0ed44c5e5ca48ac790beb3e5..037ede6a1af72772aee088f585005a8a1a75466a 100644 (file)
@@ -10,6 +10,9 @@ project(SimGear)
 file(READ version versionFile)
 string(STRIP ${versionFile} SIMGEAR_VERSION)
 
+# use simgear version also as the SO version (if building SOs)
+SET(SIMGEAR_SOVERSION ${SIMGEAR_VERSION})
+
 #packaging
 SET(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/COPYING")
 SET(CPACK_RESOURCE_FILE_README "${PROJECT_SOURCE_DIR}/README")
index 364f63910312ff66965d8d900fae377a6b2bff36..9a309e0ea8d27514ce9247dc09f16fd3e9c17c03 100644 (file)
@@ -48,12 +48,14 @@ if(SIMGEAR_SHARED)
     add_library(SimGearCore SHARED ${coreSources})
     set_property(TARGET SimGearCore PROPERTY COMPILE_FLAGS "-DNO_OPENSCENEGRAPH_INTERFACE=1")
     
-    
   # set_property(TARGET SimGearCore PROPERTY FRAMEWORK 1)
   #  message(STATUS "public header: ${publicHeaders}")
   #  set_property(TARGET SimGearCore PROPERTY PUBLIC_HEADER "${publicHeaders}")
     set_property(TARGET SimGearCore PROPERTY LINKER_LANGUAGE CXX)
-    
+
+    set_property(TARGET SimGearCore PROPERTY VERSION   ${SIMGEAR_VERSION})
+    set_property(TARGET SimGearCore PROPERTY SOVERSION ${SIMGEAR_SOVERSION})
+
     target_link_libraries(SimGearCore ${ZLIB_LIBRARY} ${RT_LIBRARY})
     install(TARGETS SimGearCore LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
 
@@ -74,7 +76,9 @@ if(SIMGEAR_SHARED)
       # set_property(TARGET SimGearScene PROPERTY FRAMEWORK 1)
       # set_property(TARGET SimGearScene PROPERTY PUBLIC_HEADER "${publicHeaders}")
         set_property(TARGET SimGearScene PROPERTY LINKER_LANGUAGE CXX)
-        
+        set_property(TARGET SimGearScene PROPERTY VERSION   ${SIMGEAR_VERSION})
+        set_property(TARGET SimGearScene PROPERTY SOVERSION ${SIMGEAR_SOVERSION})
+    
         target_link_libraries(SimGearScene 
             SimGearCore
             ${ZLIB_LIBRARY} 
@@ -85,7 +89,7 @@ if(SIMGEAR_SHARED)
         if(LIBSVN_FOUND)
             target_link_libraries(SimGearScene ${LIBSVN_LIBRARIES})
         endif(LIBSVN_FOUND)
-                
+
         install(TARGETS SimGearScene LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
     endif()