cmake: setup-hook.sh: unify indentation

This commit is contained in:
Yueh-Shun Li 2024-04-01 02:51:04 +08:00
parent 6f4426f80f
commit 468cfccb0c

View File

@ -150,38 +150,38 @@ fi
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=
addToSearchPath CMAKE_INCLUDE_PATH "${flag}"
elif test -n "$iframework_seen" && test -d "$flag"; then
iframework_seen=
addToSearchPath CMAKE_FRAMEWORK_PATH "${flag}"
else
isystem_seen=
iframework_seen=
case $flag in
-I*)
addToSearchPath CMAKE_INCLUDE_PATH "${flag:2}"
;;
-L*)
addToSearchPath CMAKE_LIBRARY_PATH "${flag:2}"
;;
-F*)
addToSearchPath CMAKE_FRAMEWORK_PATH "${flag:2}"
;;
-isystem)
isystem_seen=1
;;
-iframework)
iframework_seen=1
;;
esac
fi
done
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=
addToSearchPath CMAKE_INCLUDE_PATH "${flag}"
elif test -n "$iframework_seen" && test -d "$flag"; then
iframework_seen=
addToSearchPath CMAKE_FRAMEWORK_PATH "${flag}"
else
isystem_seen=
iframework_seen=
case $flag in
-I*)
addToSearchPath CMAKE_INCLUDE_PATH "${flag:2}"
;;
-L*)
addToSearchPath CMAKE_LIBRARY_PATH "${flag:2}"
;;
-F*)
addToSearchPath CMAKE_FRAMEWORK_PATH "${flag:2}"
;;
-isystem)
isystem_seen=1
;;
-iframework)
iframework_seen=1
;;
esac
fi
done
}
# not using setupHook, because it could be a setupHook adding additional