From f03df0da6cfffd723b7c6ea5f47511d172da3f8b Mon Sep 17 00:00:00 2001 From: Vladyslav Usenko Date: Thu, 16 Apr 2020 16:37:17 +0200 Subject: [PATCH] small cmake updates --- CMakeLists.txt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5bc917b..26f0fd9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,6 +2,9 @@ cmake_minimum_required(VERSION 3.10) include("thirdparty/basalt-headers/cmake_modules/PreProjectWorkarounds.cmake") +set(CMAKE_OSX_DEPLOYMENT_TARGET "10.15" CACHE STRING "Minimum OS X deployment version") +message(STATUS "... setting deployment target to '${CMAKE_OSX_DEPLOYMENT_TARGET}' to trick libc++ into not disabling some features (like std::visit)") + project(basalt) set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules/" ${CMAKE_MODULE_PATH}) @@ -123,9 +126,7 @@ if(APPLE) # See: https://github.com/openMVG/openMVG/issues/1349#issuecomment-401492811 set(CMAKE_FIND_FRAMEWORK LAST) - if(CMAKE_SYSTEM_VERSION VERSION_LESS 19.0.0) - set(CMAKE_OSX_DEPLOYMENT_TARGET "10.15" CACHE STRING "Minimum OS X deployment version") - + #if(CMAKE_SYSTEM_VERSION VERSION_LESS 19.0.0) # use brewed llvm's libc++ #include_directories("/usr/local/opt/llvm/include/c++/v1") #link_directories("/usr/local/opt/llvm/lib") @@ -135,7 +136,7 @@ if(APPLE) # Workaround for cmake not to filter the manually added standard include path # See: https://gitlab.kitware.com/cmake/cmake/issues/19227#note_669894 #list(REMOVE_ITEM CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES "/usr/local/opt/llvm/include/c++/v1") - endif() + #endif() if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") message(STATUS "Detected macOS with non-Apple clang")