diff --git a/scripts/cmake/CMakeSetup.cmake b/scripts/cmake/CMakeSetup.cmake index 921b504031f610d0fcb7c53aff978f2d428c489a..67d24f97840fe79dd8cbba4169b4002fd71d8fa5 100644 --- a/scripts/cmake/CMakeSetup.cmake +++ b/scripts/cmake/CMakeSetup.cmake @@ -30,21 +30,4 @@ endif() # Get the hostname site_name(HOSTNAME) -# Compute OS X version number -if(APPLE) - if(CMAKE_SYSTEM_VERSION VERSION_EQUAL 12.0) - set(OSX_VERSION 10.8 CACHE STRING "OS X version number") - set(OSX_VERSION_NAME CACHE STRING "Mountain Lion") - endif() - if(CMAKE_SYSTEM_VERSION VERSION_EQUAL 13.0) - set(OSX_VERSION 10.9 CACHE STRING "OS X version number") - set(OSX_VERSION_NAME CACHE STRING "Mavericks") - endif() - if(CMAKE_SYSTEM_VERSION VERSION_EQUAL 14.0) - set(OSX_VERSION 10.10 CACHE STRING "OS X version number") - set(OSX_VERSION_NAME CACHE STRING "Yosemite") - endif() -endif() -mark_as_advanced(OSX_VERSION OSX_VERSION_NAME) - set(CMAKE_INCLUDE_CURRENT_DIR ON) diff --git a/scripts/cmake/packaging/Pack.cmake b/scripts/cmake/packaging/Pack.cmake index 9c2e4be2a6af5440a92b781c3c1e332b805f7ab5..e0b7a274b9cb215b8ef981ddf7b6eb79bb7fad81 100644 --- a/scripts/cmake/packaging/Pack.cmake +++ b/scripts/cmake/packaging/Pack.cmake @@ -15,7 +15,10 @@ set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE.txt") set(CPACK_RESOURCE_FILE_README "${CMAKE_SOURCE_DIR}/README.md") # set(CPACK_RESOURCE_FILE_WELCOME "${CMAKE_SOURCE_DIR}/README.md") if(APPLE) - set(CPACK_PACKAGE_FILE_NAME "ogs-${OGS_VERSION}-OSX-${OSX_VERSION}-x${BITS}") + string(REGEX MATCH "(^[0-9]*)" TMP ${CMAKE_SYSTEM_VERSION}) + math(EXPR OSX_VERSION_MINOR "${CMAKE_MATCH_1} - 4") + set(CPACK_PACKAGE_FILE_NAME + "ogs-${OGS_VERSION}-OSX-10.${OSX_VERSION_MINOR}-x${BITS}") set(CPACK_SOURCE_PACKAGE_FILE_NAME ${CPACK_PACKAGE_FILE_NAME}) else() set(CPACK_PACKAGE_FILE_NAME "ogs-${OGS_VERSION}-${CMAKE_SYSTEM}-x${BITS}")