]> granicus.if.org Git - libevent/commitdiff
cmake/solaris: fix building (link with socket,nsl)
authorAzat Khuzhin <a3at.mail@gmail.com>
Tue, 9 Aug 2016 21:16:48 +0000 (00:16 +0300)
committerAzat Khuzhin <a3at.mail@gmail.com>
Tue, 9 Aug 2016 21:17:01 +0000 (00:17 +0300)
CMakeLists.txt

index cad9d57b4f8a40ea11c1d21b0e6529f3382ff1f8..7ea28e089d6bfc7b56a10f2840a2e6aade826107 100644 (file)
@@ -36,6 +36,7 @@ set(CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "Limited configuratio
 project(libevent C)
 
 set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/")
+string(REGEX MATCH "SunOS" SOLARIS "${CMAKE_SYSTEM_NAME}")
 
 
 include(CheckTypeSize)
@@ -747,6 +748,10 @@ if (UNIX)
     list(APPEND LIB_PLATFORM m)
 endif()
 
+if (SOLARIS)
+    list(APPEND LIB_PLATFORM socket nsl)
+endif()
+
 source_group("Headers Private"  FILES ${HDR_PRIVATE})
 source_group("Header Compat"    FILES ${HDR_COMPAT})
 source_group("Headers Public"   FILES ${HDR_PUBLIC})