aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt2
-rw-r--r--external/CMakeLists.txt4
2 files changed, 6 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ff4f88536..fa3b07a3e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -177,6 +177,8 @@ if(MINGW)
list(REMOVE_ITEM CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES ${DEFLIB})
endif()
+set(ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
+
if(STATIC)
if(MSVC)
set(CMAKE_FIND_LIBRARY_SUFFIXES .lib .dll.a .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt
index d13f67b90..70763caf0 100644
--- a/external/CMakeLists.txt
+++ b/external/CMakeLists.txt
@@ -76,7 +76,11 @@ endif()
find_package(Unbound)
if(NOT UNBOUND_INCLUDE_DIR OR STATIC)
+ # We want unbound config tests to be independent of changes made to this setting.
+ set(CURRENT_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
+ set(CMAKE_FIND_LIBRARY_SUFFIXES ${ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})
add_subdirectory(unbound)
+ set(CMAKE_FIND_LIBRARY_SUFFIXES ${CURRENT_CMAKE_FIND_LIBRARY_SUFFIXES})
set(UNBOUND_STATIC true PARENT_SCOPE)
set(UNBOUND_INCLUDE "${CMAKE_CURRENT_SOURCE_DIR}/unbound/libunbound" PARENT_SCOPE)