From: ThorstenB Date: Thu, 29 Dec 2011 13:45:29 +0000 (+0100) Subject: Add version suffix when building shared objects X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=f97ced2240b1d0299a288d700f1bafdf5a8ca286;p=simgear.git Add version suffix when building shared objects --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 07363346..037ede6a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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") diff --git a/simgear/CMakeLists.txt b/simgear/CMakeLists.txt index 364f6391..9a309e0e 100644 --- a/simgear/CMakeLists.txt +++ b/simgear/CMakeLists.txt @@ -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()