Skip to content
Snippets Groups Projects
Commit 1cf7e509 authored by Lars Bilke's avatar Lars Bilke
Browse files

Simplified OS X version number for packaging.

parent 1985ed1d
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......@@ -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}")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment