cmake: update setup-hook to take -isystem instead of -I into account
This commit is contained in:
parent
78178d5854
commit
dabf09aa92
1 changed files with 18 additions and 8 deletions
|
@ -70,15 +70,25 @@ else
|
|||
fi
|
||||
|
||||
makeCmakeFindLibs(){
|
||||
isystem_seen=
|
||||
for flag in $NIX_CFLAGS_COMPILE $NIX_LDFLAGS; do
|
||||
case $flag in
|
||||
-I*)
|
||||
export CMAKE_INCLUDE_PATH="$CMAKE_INCLUDE_PATH${CMAKE_INCLUDE_PATH:+:}${flag:2}"
|
||||
;;
|
||||
-L*)
|
||||
export CMAKE_LIBRARY_PATH="$CMAKE_LIBRARY_PATH${CMAKE_LIBRARY_PATH:+:}${flag:2}"
|
||||
;;
|
||||
esac
|
||||
if test -n "$isystem_seen" && test -d "$flag"; then
|
||||
isystem_seen=
|
||||
export CMAKE_INCLUDE_PATH="$CMAKE_INCLUDE_PATH${CMAKE_INCLUDE_PATH:+:}${flag}"
|
||||
else
|
||||
isystem_seen=
|
||||
case $flag in
|
||||
-I*)
|
||||
export CMAKE_INCLUDE_PATH="$CMAKE_INCLUDE_PATH${CMAKE_INCLUDE_PATH:+:}${flag:2}"
|
||||
;;
|
||||
-L*)
|
||||
export CMAKE_LIBRARY_PATH="$CMAKE_LIBRARY_PATH${CMAKE_LIBRARY_PATH:+:}${flag:2}"
|
||||
;;
|
||||
-isystem)
|
||||
isystem_seen=1
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue