aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2022-03-08 12:50:24 +0100
committerGitHub <noreply@github.com>2022-03-08 12:50:24 +0100
commit5712659366798b7187d01db868794e6e808fa1eb (patch)
tree9843d6b1962a5ca3530cbaf319c4442672865662
parent1461c9b30d93941e858cf68c01117b83f095c3d6 (diff)
parent439f4eec086fbdace1426a3e5b88192326a4829d (diff)
downloadPROJ-5712659366798b7187d01db868794e6e808fa1eb.tar.gz
PROJ-5712659366798b7187d01db868794e6e808fa1eb.zip
Merge pull request #3087 from mwtoews/cmake-list-remove-item-fix
CMake: handle potentially undefined value in list function
-rw-r--r--cmake/ProjUtilities.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmake/ProjUtilities.cmake b/cmake/ProjUtilities.cmake
index 690336b2..f0853fe3 100644
--- a/cmake/ProjUtilities.cmake
+++ b/cmake/ProjUtilities.cmake
@@ -98,7 +98,7 @@ function(configure_proj_pc)
list(APPEND EXTRA_LIBS -lole32 -lshell32)
else()
set(cxx_libs "${CMAKE_CXX_IMPLICIT_LINK_LIBRARIES}")
- list(REMOVE_ITEM cxx_libs ${CMAKE_C_IMPLICIT_LINK_LIBRARIES})
+ list(REMOVE_ITEM cxx_libs ${CMAKE_C_IMPLICIT_LINK_LIBRARIES} nonempty)
foreach(lib IN LISTS cxx_libs)
list(APPEND EXTRA_LIBS "-l${lib}")
endforeach()