From 687fcd791bd80354ba2966025ce37440f0384afc Mon Sep 17 00:00:00 2001 From: Eric Berge <eric.berge@quantum.com> Date: Tue, 20 Dec 2016 15:05:02 -0600 Subject: [PATCH] Add -lsocket for libcmsys.a build on SunOS Without this the linking of code using Source/kwsys/SystemInformation.cxx will have undefined Symbols on Solaris 11. --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9eb3b2d..d4fe8a7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -818,6 +818,9 @@ IF(KWSYS_C_SRCS OR KWSYS_CXX_SRCS) # for symbol lookup using dladdr TARGET_LINK_LIBRARIES(${KWSYS_NAMESPACE} ${CMAKE_DL_LIBS}) ENDIF() + IF (CMAKE_SYSTEM_NAME STREQUAL "SunOS") + TARGET_LINK_LIBRARIES(${KWSYS_NAMESPACE} socket) + ENDIF() ENDIF() ENDIF() -- GitLab