diff options
author | Andreas Schneider <asn@samba.org> | 2019-02-15 11:44:39 +0100 |
---|---|---|
committer | Andreas Schneider <asn@samba.org> | 2019-02-28 12:48:55 +0100 |
commit | e03ec1742fb6772022557522314a840912e52e71 (patch) | |
tree | 0375bde21fea23988a5a9e15ce8fc829152b0a95 | |
parent | fda5618f8cf6acb0bd2bc457d153a5e2d32a7261 (diff) | |
download | nss_wrapper-e03ec1742fb6772022557522314a840912e52e71.tar.gz nss_wrapper-e03ec1742fb6772022557522314a840912e52e71.tar.xz nss_wrapper-e03ec1742fb6772022557522314a840912e52e71.zip |
cmake: Do not misuse CMAKE_REQUIRED_LIBRARIES
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
-rw-r--r-- | ConfigureChecks.cmake | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index 7a60360..2d90f8f 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -90,13 +90,13 @@ if (UNIX) # libsocket (Solaris) check_library_exists(socket getaddrinfo "" HAVE_LIBSOCKET) if (HAVE_LIBSOCKET) - set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} socket) + list(APPEND _REQUIRED_LIBRARIES socket) endif (HAVE_LIBSOCKET) # libnsl/inet_pton (Solaris) check_library_exists(nsl inet_pton "" HAVE_LIBNSL) if (HAVE_LIBNSL) - set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} nsl) + list(APPEND _REQUIRED_LIBRARIES nsl) endif (HAVE_LIBNSL) endif (NOT LINUX) @@ -262,7 +262,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) # ENDIAN @@ -270,8 +270,6 @@ if (NOT WIN32) test_big_endian(WORDS_BIGENDIAN) endif (NOT WIN32) -set(NWRAP_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} CACHE INTERNAL "nss_wrapper required system libraries") - # check whether getaddrinfo() returns "node" in "ai_canonname" for IP-addresses check_c_source_runs("#include <stddef.h> #include <string.h> @@ -339,3 +337,5 @@ int main(void) { if (HAVE_NONNULL_GETHOSTENT) add_definitions(-DHAVE_NONNULL_GETHOSTENT) endif (HAVE_NONNULL_GETHOSTENT) + +set(NWRAP_REQUIRED_LIBRARIES ${_REQUIRED_LIBRARIES} CACHE INTERNAL "nss_wrapper required system libraries") |