Skip to content

Commit

Permalink
Don't explicitly set XCode SDK root if already specified.
Browse files Browse the repository at this point in the history
  • Loading branch information
ke6jjj committed Feb 23, 2021
1 parent 0ed9a36 commit 4974e4a
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions c_src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,14 @@ include(ASan)
IF (APPLE)
set(CMAKE_MODULE_LINKER_FLAGS "-flat_namespace -undefined suppress")
set(CMAKE_MACOSX_RPATH 1)
execute_process(COMMAND
xcrun --show-sdk-path
OUTPUT_VARIABLE APPLE_SDK_ROOT
)
if (NOT DEFINED ENV{SDKROOT})

This comment has been minimized.

Copy link
@JayKickliter

JayKickliter Feb 23, 2021

Contributor

Good idea. thanks

execute_process(COMMAND
xcrun --show-sdk-path
OUTPUT_VARIABLE APPLE_SDK_ROOT
)
else()
set(APPLE_SDK_ROOT $ENV{SDKROOT})
endif()
set(GF_APPLE_ENV "SDKROOT=${APPLE_SDK_ROOT}")
ENDIF()

Expand Down

0 comments on commit 4974e4a

Please sign in to comment.