Parcourir la source

Generate properly versioned shared library links on Linux

Instruct CMake to create a properly versioned library.

Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
Mike Looijmans il y a 8 ans
Parent
commit
58ce90e99d
1 fichiers modifiés avec 3 ajouts et 0 suppressions
  1. 3 0
      CMakeLists.txt

+ 3 - 0
CMakeLists.txt

@@ -392,6 +392,9 @@ target_link_libraries(open62541 ${open62541_LIBRARIES})
 target_compile_definitions(open62541-object PRIVATE -DUA_DYNAMIC_LINKING_EXPORT)
 target_compile_definitions(open62541-object PRIVATE -DUA_DYNAMIC_LINKING_EXPORT)
 target_compile_definitions(open62541 PRIVATE -DUA_DYNAMIC_LINKING_EXPORT)
 target_compile_definitions(open62541 PRIVATE -DUA_DYNAMIC_LINKING_EXPORT)
 
 
+# Generate properly versioned shared library links on Linux
+SET_TARGET_PROPERTIES(open62541 PROPERTIES SOVERSION 0 VERSION 0.2.0)
+
 if(WIN32)
 if(WIN32)
     target_link_libraries(open62541 ws2_32)
     target_link_libraries(open62541 ws2_32)
 endif()
 endif()