Commits

Holger Frydrych  committed abf4759

OGRE_VERSION has a whitespace and version suffix appended; this breaks builds if used as the .so version for shared libraries. Use a dedicated OGRE_SOVERSION instead.

  • Participants
  • Parent commits e709d84
  • Branches v1-7

Comments (0)

Files changed (6)

File CMake/Utils/OgreGetVersion.cmake

   get_preprocessor_entry(TEMP_VAR_CONTENTS OGRE_VERSION_NAME OGRE_VERSION_NAME)
   get_preprocessor_entry(TEMP_VAR_CONTENTS OGRE_VERSION_SUFFIX OGRE_VERSION_SUFFIX)
   set(OGRE_VERSION "${OGRE_VERSION_MAJOR}.${OGRE_VERSION_MINOR}.${OGRE_VERSION_PATCH} ${OGRE_VERSION_SUFFIX}")
+  set(OGRE_SOVERSION "${OGRE_VERSION_MAJOR}.${OGRE_VERSION_MINOR}.${OGRE_VERSION_PATCH}")
   set(OGRE_VERSION_DASH_SEPARATED "${OGRE_VERSION_MAJOR}-${OGRE_VERSION_MINOR}-${OGRE_VERSION_PATCH}${OGRE_VERSION_SUFFIX}")
 
 endmacro()

File Components/Paging/CMakeLists.txt

 
 # setup target
 add_library(OgrePaging ${OGRE_COMP_LIB_TYPE} ${HEADER_FILES} ${SOURCE_FILES} ${PLATFORM_HEADER_FILES} ${PLATFORM_SOURCE_FILES})
-set_target_properties(OgrePaging PROPERTIES VERSION ${OGRE_VERSION})
+set_target_properties(OgrePaging PROPERTIES VERSION ${OGRE_SOVERSION})
 target_link_libraries(OgrePaging OgreMain)
 if (OGRE_CONFIG_THREADS)
   target_link_libraries(OgrePaging ${Boost_LIBRARIES})

File Components/Property/CMakeLists.txt

 
 # setup target
 add_library(OgreProperty ${OGRE_COMP_LIB_TYPE} ${HEADER_FILES} ${SOURCE_FILES} ${PLATFORM_HEADER_FILES} ${PLATFORM_SOURCE_FILES})
-set_target_properties(OgreProperty PROPERTIES VERSION ${OGRE_VERSION})
+set_target_properties(OgreProperty PROPERTIES VERSION ${OGRE_SOVERSION})
 target_link_libraries(OgreProperty OgreMain)
 if (OGRE_CONFIG_THREADS)
   target_link_libraries(OgreProperty ${Boost_LIBRARIES})

File Components/RTShaderSystem/CMakeLists.txt

 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
 
 add_library(OgreRTShaderSystem ${OGRE_COMP_LIB_TYPE} ${HEADER_FILES} ${SOURCE_FILES})
-set_target_properties(OgreRTShaderSystem PROPERTIES VERSION ${OGRE_VERSION})
+set_target_properties(OgreRTShaderSystem PROPERTIES VERSION ${OGRE_SOVERSION})
 target_link_libraries(OgreRTShaderSystem OgreMain)
 
 ogre_config_component(OgreRTShaderSystem)

File Components/Terrain/CMakeLists.txt

 
 # setup target
 add_library(OgreTerrain ${OGRE_COMP_LIB_TYPE} ${HEADER_FILES} ${SOURCE_FILES} ${PLATFORM_HEADER_FILES} ${PLATFORM_SOURCE_FILES})
-set_target_properties(OgreTerrain PROPERTIES VERSION ${OGRE_VERSION})
+set_target_properties(OgreTerrain PROPERTIES VERSION ${OGRE_SOVERSION})
 target_link_libraries(OgreTerrain OgreMain)
 if (OGRE_BUILD_COMPONENT_PAGING)
 	target_link_libraries(OgreTerrain OgrePaging)

File OgreMain/CMakeLists.txt

 
 # setup OgreMain target
 add_library(OgreMain ${OGRE_LIB_TYPE} ${PREC_HEADER} ${HEADER_FILES} ${SOURCE_FILES} ${PLATFORM_HEADER_FILES} ${PLATFORM_SOURCE_FILES} ${THREAD_HEADER_FILES} ${THREAD_SOURCE_FILES})
-set_target_properties(OgreMain PROPERTIES VERSION ${OGRE_VERSION})
+set_target_properties(OgreMain PROPERTIES VERSION ${OGRE_SOVERSION})
 if (APPLE)
   if (NOT OGRE_BUILD_PLATFORM_IPHONE)
     set_target_properties(OgreMain PROPERTIES FRAMEWORK TRUE)