From 31f63c8d55fdd1108d391b35e4e95ad67492ff34 Mon Sep 17 00:00:00 2001 From: dm1try Date: Tue, 16 Oct 2018 03:52:04 +0300 Subject: [PATCH] build/macOS: provide SDK path to deps compiler otherwise, system headers cannot be found on Mojave they were moved from /usr/include to SDK path --- third-party/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/third-party/CMakeLists.txt b/third-party/CMakeLists.txt index 4ca00b26cd..2c59d79c55 100644 --- a/third-party/CMakeLists.txt +++ b/third-party/CMakeLists.txt @@ -98,6 +98,10 @@ else() set(DEPS_C_COMPILER "${CMAKE_C_COMPILER}") endif() +if(CMAKE_OSX_SYSROOT) + set(DEPS_C_COMPILER "${DEPS_C_COMPILER} -isysroot${CMAKE_OSX_SYSROOT}") +endif() + # Cross compiling: use these for dependencies built for the # HOST system, when not crosscompiling these should be the # same as DEPS_*. Except when targeting Unix in which case