Skip to content

Commit ea8fbf8

Browse files
author
Matthieu Longo
committed
[solaris] add extra linker flag -lsocket
1 parent c7b4264 commit ea8fbf8

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

proton-c/CMakeLists.txt

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,14 +115,19 @@ elseif (SASL_IMPL STREQUAL none)
115115
endif ()
116116

117117
# Set Compiler extra flags for Solaris when using SunStudio
118-
if(CMAKE_CXX_COMPILER_ID STREQUAL "SunPro" )
119-
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mt" )
118+
if (CMAKE_CXX_COMPILER_ID STREQUAL "SunPro")
119+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mt")
120120
endif()
121121

122-
if(CMAKE_C_COMPILER_ID STREQUAL "SunPro" )
122+
if (CMAKE_C_COMPILER_ID STREQUAL "SunPro")
123123
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mt")
124124
endif()
125125

126+
# Set linker's extra flags for Solaris (used by SunStudio and GCC without discrimination)
127+
if (CMAKE_HOST_SOLARIS)
128+
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -lsocket")
129+
endif(CMAKE_HOST_SOLARIS)
130+
126131
# Link in openssl if present
127132
if (SSL_IMPL STREQUAL openssl)
128133
set (pn_ssl_impl src/ssl/openssl.c)

0 commit comments

Comments
 (0)