cmake: NIX_CFLAGS_COMPILE NIX_LDFLAG could be undefined

This commit is contained in:
John Ericson 2019-11-05 19:16:36 -05:00
parent 770a4c7946
commit 42ffaf5290

View file

@ -125,7 +125,7 @@ addEnvHooks "$targetOffset" addCMakeParams
makeCmakeFindLibs(){
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
isystem_seen=
export CMAKE_INCLUDE_PATH="${CMAKE_INCLUDE_PATH-}${CMAKE_INCLUDE_PATH:+:}${flag}"