Browse Source

CMake: Add OMIT_VERSION_SUFFIX option

On iOS, it's far easier to not include the version in the file name. It won't matter there because all libraries must be included in the app bundle anyway.
Donny Lawrence 6 years ago
parent
commit
bd0cd14f50
1 changed files with 1 additions and 1 deletions
  1. 1 1
      cmake/macros/Versioning.cmake

+ 1 - 1
cmake/macros/Versioning.cmake

@@ -12,7 +12,7 @@ function(add_library target_name)
   _add_library("${target_name}" ${ARGN})
   _add_library("${target_name}" ${ARGN})
 
 
   get_target_property(type "${target_name}" TYPE)
   get_target_property(type "${target_name}" TYPE)
-  if(type STREQUAL "SHARED_LIBRARY")
+  if(type STREQUAL "SHARED_LIBRARY" AND NOT OMIT_VERSION_SUFFIX)
     set_target_properties("${target_name}" PROPERTIES
     set_target_properties("${target_name}" PROPERTIES
       VERSION "${PROJECT_VERSION}"
       VERSION "${PROJECT_VERSION}"
       SOVERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
       SOVERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")