From 5bf59d58c4bfba8f8fdc06edc38bca089e75fc37 Mon Sep 17 00:00:00 2001 From: James Turner Date: Tue, 8 Dec 2015 20:46:54 +0000 Subject: [PATCH] On Mac, force the macon-min-version value MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit - Workaround for CMAKE_OSX_DEPLOYMENT_TARGET not behaving as it’s supposed to reliably. --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 816fa80d9..16281c215 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -108,6 +108,11 @@ IF(APPLE) find_library(CORESERVICES_LIBRARY CoreServices) find_library(COCOA_LIBRARY Cocoa) list(APPEND PLATFORM_LIBS ${COCOA_LIBRARY} ${CORESERVICES_LIBRARY}) + + # this should be handled by setting CMAKE_OSX_DEPLOYMENT_TARGET + # but it's not working reliably, so forcing it for now + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mmacosx-version-min=10.7") + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mmacosx-version-min=10.7") elseif(${CMAKE_SYSTEM_NAME} MATCHES "Linux" OR ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") find_package(Threads REQUIRED) -- 2.39.5