mirror of
https://github.com/libAthena/athena.git
synced 2025-12-09 05:27:50 +00:00
Better toolchain include discovery on macOS
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user