cmake: Do not misuse CMAKE_REQUIRED_LIBRARIES
authorAndreas Schneider <asn@samba.org>
Tue, 7 May 2019 10:05:16 +0000 (12:05 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Mon, 3 Jun 2019 10:54:22 +0000 (12:54 +0200)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Gary Lockyer <gary@samba.org>
ConfigureChecks.cmake

index aaf64a04e259100a1be8625d965e2378237b526b..263da900955e291d40ebc7ee253892881d21e659 100644 (file)
@@ -220,7 +220,7 @@ int main(void) {
 check_library_exists(dl dlopen "" HAVE_LIBDL)
 if (HAVE_LIBDL)
     find_library(DLFCN_LIBRARY dl)
-    set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${DLFCN_LIBRARY})
+    list(APPEND _REQUIRED_LIBRARIES ${DLFCN_LIBRARY})
 endif (HAVE_LIBDL)
 
 if (OSX)
@@ -232,4 +232,4 @@ if (NOT WIN32)
     test_big_endian(WORDS_BIGENDIAN)
 endif (NOT WIN32)
 
-set(UIDWRAP_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} CACHE INTERNAL "uidwrap required system libraries")
+set(UIDWRAP_REQUIRED_LIBRARIES ${_REQUIRED_LIBRARIES} CACHE INTERNAL "uidwrap required system libraries")