small cmake updates

This commit is contained in:
Vladyslav Usenko 2020-04-16 16:37:17 +02:00
parent f5118d15a2
commit f03df0da6c
1 changed files with 5 additions and 4 deletions

View File

@ -2,6 +2,9 @@ cmake_minimum_required(VERSION 3.10)
include("thirdparty/basalt-headers/cmake_modules/PreProjectWorkarounds.cmake") 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) project(basalt)
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules/" ${CMAKE_MODULE_PATH}) 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 # See: https://github.com/openMVG/openMVG/issues/1349#issuecomment-401492811
set(CMAKE_FIND_FRAMEWORK LAST) set(CMAKE_FIND_FRAMEWORK LAST)
if(CMAKE_SYSTEM_VERSION VERSION_LESS 19.0.0) #if(CMAKE_SYSTEM_VERSION VERSION_LESS 19.0.0)
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.15" CACHE STRING "Minimum OS X deployment version")
# use brewed llvm's libc++ # use brewed llvm's libc++
#include_directories("/usr/local/opt/llvm/include/c++/v1") #include_directories("/usr/local/opt/llvm/include/c++/v1")
#link_directories("/usr/local/opt/llvm/lib") #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 # Workaround for cmake not to filter the manually added standard include path
# See: https://gitlab.kitware.com/cmake/cmake/issues/19227#note_669894 # 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") #list(REMOVE_ITEM CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES "/usr/local/opt/llvm/include/c++/v1")
endif() #endif()
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
message(STATUS "Detected macOS with non-Apple clang") message(STATUS "Detected macOS with non-Apple clang")