From 8225faedbd24b50e32f175050bd7c11279cbd7f0 Mon Sep 17 00:00:00 2001 From: Vladyslav Usenko Date: Fri, 17 Apr 2020 21:17:51 +0200 Subject: [PATCH] Small fixes for MacOS --- CMakeLists.txt | 17 +++++++---------- thirdparty/basalt-headers | 2 +- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 26f0fd9..56839e6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,9 +2,6 @@ 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}) @@ -126,17 +123,17 @@ 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) + 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") - #add_compile_options("-nostdinc++") - #set(STD_CXX_FS c++fs) + include_directories("/usr/local/opt/llvm/include/c++/v1") + link_directories("/usr/local/opt/llvm/lib") + add_compile_options("-nostdinc++") + set(STD_CXX_FS c++fs) # 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() + list(REMOVE_ITEM CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES "/usr/local/opt/llvm/include/c++/v1") + endif() if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") message(STATUS "Detected macOS with non-Apple clang") diff --git a/thirdparty/basalt-headers b/thirdparty/basalt-headers index c17b8d6..1395990 160000 --- a/thirdparty/basalt-headers +++ b/thirdparty/basalt-headers @@ -1 +1 @@ -Subproject commit c17b8d6ba96a2cdd0ade72e66dbb01bda455cbe9 +Subproject commit 1395990144121427d6236444b1643b6fe068f736