diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2018-12-19 13:36:49 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2018-12-24 19:31:24 +0100 |
commit | 05bc404492c1648ae584b86e1bb6cb7aa74b9645 (patch) | |
tree | 3f72c82e962221e4fdb91e8037670afccd0cfe54 /cmake | |
parent | 57ed505df94b189889b7497f820dfb13434822d7 (diff) |
cmake/platform: decruft
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/opentrack-platform.cmake | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/cmake/opentrack-platform.cmake b/cmake/opentrack-platform.cmake index 64b9fe4d..d987f5cd 100644 --- a/cmake/opentrack-platform.cmake +++ b/cmake/opentrack-platform.cmake @@ -23,11 +23,12 @@ include_guard(GLOBAL) -if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) +if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT OR NOT CMAKE_INSTALL_PREFIX) set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/install" CACHE PATH "" FORCE) - if(NOT CMAKE_BUILD_TYPE) - set(CMAKE_BUILD_TYPE "RELEASE" CACHE STRING "" FORCE) - endif() +endif() + +if(NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE "RELEASE" CACHE STRING "" FORCE) endif() string(TOUPPER "${CMAKE_BUILD_TYPE}" __build_type) @@ -45,10 +46,8 @@ else() set(opentrack-64bit FALSE) endif() -if(APPLE) - if(NOT CMAKE_OSX_ARCHITECTURES) - set(CMAKE_OSX_ARCHITECTURES "x86_64") - endif() +if(APPLE AND NOT CMAKE_OSX_ARCHITECTURES) + set(CMAKE_OSX_ARCHITECTURES "x86_64") endif() if(MSVC AND MSVC_VERSION LESS "1915" AND NOT ".${CMAKE_CXX_COMPILER_ID}" STREQUAL ".Clang") |