diff --git a/src/clib/CMakeLists.txt b/src/clib/CMakeLists.txt index 851877a83bb..d81ec2edbc4 100644 --- a/src/clib/CMakeLists.txt +++ b/src/clib/CMakeLists.txt @@ -165,6 +165,8 @@ foreach(x IN LISTS cppdefs) string(APPEND CPPFLAGS " -D${x}") endforeach() foreach(x IN LISTS includes) - string(APPEND CPPFLAGS " -I${x}") + if (x) + string(APPEND CPPFLAGS " -I${x}") + endif() endforeach() set(CPPFLAGS ${CPPFLAGS} PARENT_SCOPE) diff --git a/src/flib/CMakeLists.txt b/src/flib/CMakeLists.txt index 822b2e5afd3..1e357c81e5d 100644 --- a/src/flib/CMakeLists.txt +++ b/src/flib/CMakeLists.txt @@ -281,6 +281,8 @@ foreach(x IN LISTS fppdefs) string(APPEND FPPFLAGS " -D${x}") endforeach() foreach(x IN LISTS fincludes) - string(APPEND FPPFLAGS " -I${x}") + if (x) + string(APPEND FPPFLAGS " -I${x}") + endif() endforeach() set(FPPFLAGS ${FPPFLAGS} PARENT_SCOPE)