The output variable from find_library() needs to be cleared
Otherwise you'll just get the initial response back every time
you call it.
diff --git a/cmake/Modules/CMakeMacroLibtoolFile.cmake b/cmake/Modules/CMakeMacroLibtoolFile.cmake
index b3b4a9b..a265789 100644
--- a/cmake/Modules/CMakeMacroLibtoolFile.cmake
+++ b/cmake/Modules/CMakeMacroLibtoolFile.cmake
@@ -45,6 +45,8 @@
else()
# No shared library found, so ignore target.
endif()
+ # Need to clear FL to get new results next loop
+ unset(FL CACHE)
else()
# Target is a CMake target, so ignore if (CMake targets are static
# libs in TigerVNC.)
@@ -69,6 +71,8 @@
else()
# No absolute pathname found. Ignore it.
endif()
+ # Need to clear FL to get new results next loop
+ unset(FL CACHE)
endif()
endif()
endforeach()