summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose Fonseca <jfonseca@vmware.com>2017-01-24 11:36:48 +0000
committerJose Fonseca <jfonseca@vmware.com>2017-01-24 11:36:48 +0000
commite0ef582a91a84caccfb2a3c945801a70711bb1c0 (patch)
treeaae0333127e7ee617ebca5ddc8ad48dbf6512f87
parent429e2cdb2ea5ba156a0a64c78338c6db979e2230 (diff)
cmake: Target macos 10.11 and up; stop building 32bits executables.
-rw-r--r--CMakeLists.txt10
-rw-r--r--gui/CMakeLists.txt5
2 files changed, 5 insertions, 10 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f6016da5..527035be 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -9,6 +9,11 @@ if (CMAKE_GENERATOR STREQUAL "Xcode")
message (FATAL_ERROR "Xcode generator is not supported. Please build with \"Unix Makefiles\" or \"Ninja\" generators.")
endif ()
+if (APPLE)
+ set (CMAKE_OSX_DEPLOYMENT_TARGET "10.11" CACHE STRING "Minimum OS X version to target for deployment" FORCE)
+ set (CMAKE_OSX_ARCHITECTURES "" CACHE STRING "Build architectures for OSX" FORCE)
+endif ()
+
# http://www.cmake.org/cmake/help/v3.0/policy/CMP0042.html
if (POLICY CMP0042)
cmake_policy (SET CMP0042 NEW)
@@ -21,11 +26,6 @@ project (apitrace)
##############################################################################
# Options
-# On Mac OS X build fat binaries with i386 and x86_64 architectures by default.
-if (APPLE AND NOT CMAKE_OSX_ARCHITECTURES)
- set (CMAKE_OSX_ARCHITECTURES "i386;x86_64" CACHE STRING "Build architectures for OSX" FORCE)
-endif ()
-
# We use a cached string variable instead of the standard (boolean) OPTION
# command so that we can default to auto-detecting optional depencies, while
# still providing a mechanism to force/disable these optional dependencies, as
diff --git a/gui/CMakeLists.txt b/gui/CMakeLists.txt
index 579b6514..adae7386 100644
--- a/gui/CMakeLists.txt
+++ b/gui/CMakeLists.txt
@@ -9,11 +9,6 @@ endif ()
add_definitions (-DQT_FORCE_ASSERTS)
-if (APPLE)
- # Recent builds of Qt no longer support i386 architecture
- set (CMAKE_OSX_ARCHITECTURES "x86_64")
-endif()
-
add_library (qubjson STATIC
qubjson.cpp
)