mirror of https://github.com/libAthena/athena.git
Better toolchain include discovery on macOS
This commit is contained in:
parent
87f213bc0b
commit
ec49377fcd
|
@ -202,12 +202,15 @@ macro(atdna out)
|
||||||
|
|
||||||
# OSX Extra
|
# OSX Extra
|
||||||
elseif(APPLE)
|
elseif(APPLE)
|
||||||
|
get_filename_component(COMPILER_DIR "${CMAKE_CXX_COMPILER}" DIRECTORY)
|
||||||
if (NOT EXISTS "${CMAKE_OSX_SYSROOT}")
|
if (NOT EXISTS "${CMAKE_OSX_SYSROOT}")
|
||||||
message(FATAL_ERROR "CMAKE_OSX_SYSROOT not set")
|
message(FATAL_ERROR "CMAKE_OSX_SYSROOT not set")
|
||||||
endif()
|
endif()
|
||||||
list(APPEND extraargs -isysroot ${CMAKE_OSX_SYSROOT} -isysroot ${CMAKE_OSX_SYSROOT}/usr/include
|
list(APPEND extraargs
|
||||||
-I ${CMAKE_OSX_SYSROOT}/../../../../../Toolchains/XcodeDefault.xctoolchain
|
-isysroot ${CMAKE_OSX_SYSROOT}
|
||||||
-I ${CMAKE_OSX_SYSROOT}/../../../../../Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1)
|
-isysroot ${CMAKE_OSX_SYSROOT}/usr/include
|
||||||
|
-I ${COMPILER_DIR}/../..
|
||||||
|
-I ${COMPILER_DIR}/../include/c++/v1)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Make target
|
# Make target
|
||||||
|
|
|
@ -52,12 +52,15 @@ macro(atdna out)
|
||||||
|
|
||||||
# OSX Extra
|
# OSX Extra
|
||||||
elseif(APPLE)
|
elseif(APPLE)
|
||||||
|
get_filename_component(COMPILER_DIR "${CMAKE_CXX_COMPILER}" DIRECTORY)
|
||||||
if (NOT EXISTS "${CMAKE_OSX_SYSROOT}")
|
if (NOT EXISTS "${CMAKE_OSX_SYSROOT}")
|
||||||
message(FATAL_ERROR "CMAKE_OSX_SYSROOT not set")
|
message(FATAL_ERROR "CMAKE_OSX_SYSROOT not set")
|
||||||
endif()
|
endif()
|
||||||
list(APPEND extraargs -isysroot ${CMAKE_OSX_SYSROOT} -isysroot ${CMAKE_OSX_SYSROOT}/usr/include
|
list(APPEND extraargs
|
||||||
-I ${CMAKE_OSX_SYSROOT}/../../../../../Toolchains/XcodeDefault.xctoolchain
|
-isysroot ${CMAKE_OSX_SYSROOT}
|
||||||
-I ${CMAKE_OSX_SYSROOT}/../../../../../Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1)
|
-isysroot ${CMAKE_OSX_SYSROOT}/usr/include
|
||||||
|
-I ${COMPILER_DIR}/../..
|
||||||
|
-I ${COMPILER_DIR}/../include/c++/v1)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Make target
|
# Make target
|
||||||
|
|
Loading…
Reference in New Issue