mirror of
https://github.com/avast/retdec.git
synced 2024-11-23 13:00:13 +00:00
Move CMAKE_C_FLAGS setting
Fix position of command that alters CMAKE_C_FLAGS. This did result in failing build of retdec on newst macOS systems.
This commit is contained in:
parent
d0f0dbca10
commit
e0d5a60e60
20
deps/yara/CMakeLists.txt
vendored
20
deps/yara/CMakeLists.txt
vendored
@ -39,6 +39,16 @@ else()
|
||||
set(YARAC_PATH ${YARA_DIR}/yarac)
|
||||
endif()
|
||||
|
||||
# https://github.com/avast/retdec/issues/439
|
||||
if(APPLE)
|
||||
execute_process(
|
||||
COMMAND xcrun --show-sdk-path
|
||||
OUTPUT_VARIABLE MACOS_SDK_PATH
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --sysroot=${MACOS_SDK_PATH}")
|
||||
endif()
|
||||
|
||||
# These are not used on MSVC, but we use it on all platforms to detect if
|
||||
# build configuration changed - changes in config should be mirrored on both
|
||||
# MSVC & Linux.
|
||||
@ -101,16 +111,6 @@ else()
|
||||
)
|
||||
endif()
|
||||
|
||||
# https://github.com/avast/retdec/issues/439
|
||||
if(APPLE)
|
||||
execute_process(
|
||||
COMMAND xcrun --show-sdk-path
|
||||
OUTPUT_VARIABLE MACOS_SDK_PATH
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --sysroot=${MACOS_SDK_PATH}")
|
||||
endif()
|
||||
|
||||
if(NOT MSVC)
|
||||
ExternalProject_Add_Step(yara configure-linux
|
||||
WORKING_DIRECTORY ${YARA_DIR}
|
||||
|
Loading…
Reference in New Issue
Block a user