forked from mirrors/nixpkgs
Merge pull request #70997 from veprbl/pr/cmake_iframework
cmake: process -iframework in setup-hook
This commit is contained in:
commit
5d19c11efe
|
@ -124,12 +124,17 @@ addEnvHooks "$targetOffset" addCMakeParams
|
|||
|
||||
makeCmakeFindLibs(){
|
||||
isystem_seen=
|
||||
iframework_seen=
|
||||
for flag in $NIX_CFLAGS_COMPILE $NIX_LDFLAGS; do
|
||||
if test -n "$isystem_seen" && test -d "$flag"; then
|
||||
isystem_seen=
|
||||
export CMAKE_INCLUDE_PATH="$CMAKE_INCLUDE_PATH${CMAKE_INCLUDE_PATH:+:}${flag}"
|
||||
elif test -n "$iframework_seen" && test -d "$flag"; then
|
||||
iframework_seen=
|
||||
export CMAKE_FRAMEWORK_PATH="$CMAKE_FRAMEWORK_PATH${CMAKE_FRAMEWORK_PATH:+:}${flag}"
|
||||
else
|
||||
isystem_seen=
|
||||
iframework_seen=
|
||||
case $flag in
|
||||
-I*)
|
||||
export CMAKE_INCLUDE_PATH="$CMAKE_INCLUDE_PATH${CMAKE_INCLUDE_PATH:+:}${flag:2}"
|
||||
|
@ -143,6 +148,9 @@ makeCmakeFindLibs(){
|
|||
-isystem)
|
||||
isystem_seen=1
|
||||
;;
|
||||
-iframework)
|
||||
iframework_seen=1
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
done
|
||||
|
|
Loading…
Reference in a new issue