diff options
author | Vladislav Vaintroub <vvaintroub@mysql.com> | 2010-02-05 07:39:11 +0100 |
---|---|---|
committer | Vladislav Vaintroub <vvaintroub@mysql.com> | 2010-02-05 07:39:11 +0100 |
commit | 7ffdc1d301fcb4d39b9fabf9bb2c861811d0d2a2 (patch) | |
tree | 9260ec0dc20ab6e8f3e1d2d2465e14dfed16b9c2 /cmake/package_name.cmake | |
parent | 4d0b901a55e1f27cb7e5caedced1ebbb923d366b (diff) | |
download | mariadb-git-7ffdc1d301fcb4d39b9fabf9bb2c861811d0d2a2.tar.gz |
fix OSX package names is OSX_DEPLOYMENT_TARGET is specified
Diffstat (limited to 'cmake/package_name.cmake')
-rw-r--r-- | cmake/package_name.cmake | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/cmake/package_name.cmake b/cmake/package_name.cmake index 5ae6fe5f7f0..d2998cfd795 100644 --- a/cmake/package_name.cmake +++ b/cmake/package_name.cmake @@ -72,14 +72,15 @@ IF(NOT VERSION) ENDIF() ENDIF() ELSEIF(CMAKE_SYSTEM_NAME MATCHES "Darwin") - IF(${CMAKE_OSX_DEPLOYMENT_TARGET}) - SET(VER "${CMAKE_OSX_DEPLOYMENT_TARGET}") + IF(CMAKE_OSX_DEPLOYMENT_TARGET) + SET(DEFAULT_PLATFORM "osx${CMAKE_OSX_DEPLOYMENT_TARGET}") ELSE() SET(VER "${CMAKE_SYSTEM_VERSION}") + STRING(REGEX REPLACE "([0-9]+)\\.[0-9]+\\.[0-9]+" "\\1" VER "${VER}") + # Subtract 4 from Darwin version to get correct osx10.X + MATH(EXPR VER "${VER} -4") + SET(DEFAULT_PLATFORM "osx10.${VER}") ENDIF() - STRING(REGEX REPLACE "([0-9]+)\\.[0-9]+\\.[0-9]+" "\\1" VER "${VER}") - MATH(EXPR VER "${VER} -4") - SET(DEFAULT_PLATFORM "osx10.${VER}") LIST(LENGTH CMAKE_OSX_ARCHITECTURES LEN) IF(LEN GREATER 1) SET(DEFAULT_MACHINE "universal") |