From 38704a92f5ded6ac028f589632f4a305400a83ce Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Wed, 31 Oct 2018 08:07:17 +0100 Subject: cmake: Create a list with required libraries This should fix the build on OmniOS. Signed-off-by: Andreas Schneider Reviewed-by: Ralph Boehme --- ConfigureChecks.cmake | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index cb5bf53..17fdd3e 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -72,7 +72,7 @@ check_function_exists(pledge HAVE_PLEDGE) if (UNIX) find_library(DLFCN_LIBRARY dl) if (DLFCN_LIBRARY) - string(APPEND _REQUIRED_LIBRARIES ${DLFCN_LIBRARY}) + list(APPEND _REQUIRED_LIBRARIES ${DLFCN_LIBRARY}) else() check_function_exists(dlopen HAVE_DLOPEN) if (NOT HAVE_DLOPEN) @@ -84,13 +84,13 @@ if (UNIX) # libsocket (Solaris) check_library_exists(socket getaddrinfo "" HAVE_LIBSOCKET) if (HAVE_LIBSOCKET) - string(APPEND _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) - string(APPEND _REQUIRED_LIBRARIES nsl) + list(APPEND _REQUIRED_LIBRARIES nsl) endif (HAVE_LIBNSL) endif (NOT LINUX) @@ -269,4 +269,5 @@ endif (NOT WIN32) check_type_size(pid_t SIZEOF_PID_T) +string(REPLACE ";" " " _REQUIRED_LIBRARIES "${_REQUIRED_LIBRARIES}") set(SWRAP_REQUIRED_LIBRARIES ${_REQUIRED_LIBRARIES} CACHE INTERNAL "socket_wrapper required system libraries") -- cgit