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(){
|
makeCmakeFindLibs(){
|
||||||
isystem_seen=
|
isystem_seen=
|
||||||
|
iframework_seen=
|
||||||
for flag in $NIX_CFLAGS_COMPILE $NIX_LDFLAGS; do
|
for flag in $NIX_CFLAGS_COMPILE $NIX_LDFLAGS; do
|
||||||
if test -n "$isystem_seen" && test -d "$flag"; then
|
if test -n "$isystem_seen" && test -d "$flag"; then
|
||||||
isystem_seen=
|
isystem_seen=
|
||||||
export CMAKE_INCLUDE_PATH="$CMAKE_INCLUDE_PATH${CMAKE_INCLUDE_PATH:+:}${flag}"
|
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
|
else
|
||||||
isystem_seen=
|
isystem_seen=
|
||||||
|
iframework_seen=
|
||||||
case $flag in
|
case $flag in
|
||||||
-I*)
|
-I*)
|
||||||
export CMAKE_INCLUDE_PATH="$CMAKE_INCLUDE_PATH${CMAKE_INCLUDE_PATH:+:}${flag:2}"
|
export CMAKE_INCLUDE_PATH="$CMAKE_INCLUDE_PATH${CMAKE_INCLUDE_PATH:+:}${flag:2}"
|
||||||
|
@ -143,6 +148,9 @@ makeCmakeFindLibs(){
|
||||||
-isystem)
|
-isystem)
|
||||||
isystem_seen=1
|
isystem_seen=1
|
||||||
;;
|
;;
|
||||||
|
-iframework)
|
||||||
|
iframework_seen=1
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in a new issue