mirror of
https://github.com/pocoproject/poco.git
synced 2025-02-20 22:31:23 +01:00
replace dl library with CMAKE_DL_LIBS
Some platforms do not have -ldl, specifically in this case freebsd. The CMAKE_DL_LIBS is part of standard cmake and is supported in the cmake_minimum_required() in the top level CMakeLists.txt CMAKE_DL_LIBS will be -ldl on platforms that support it, or empty.
This commit is contained in:
parent
4403634bef
commit
7dc24a2561
@ -85,7 +85,7 @@ else (CYGWIN)
|
||||
# Standard 'must be' defines
|
||||
if (APPLE)
|
||||
add_definitions( -DPOCO_HAVE_IPv6 -DPOCO_NO_STAT64)
|
||||
set(SYSLIBS dl)
|
||||
set(SYSLIBS ${CMAKE_DL_LIBS})
|
||||
else (APPLE)
|
||||
add_definitions( -D_REENTRANT -D_THREAD_SAFE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 )
|
||||
if (QNX)
|
||||
@ -93,7 +93,7 @@ else (CYGWIN)
|
||||
set(SYSLIBS m socket)
|
||||
else (QNX)
|
||||
add_definitions( -D_XOPEN_SOURCE=500 -DPOCO_HAVE_FD_EPOLL)
|
||||
set(SYSLIBS pthread dl rt)
|
||||
set(SYSLIBS pthread ${CMAKE_DL_LIBS} rt)
|
||||
endif (QNX)
|
||||
endif (APPLE)
|
||||
endif(UNIX AND NOT ANDROID )
|
||||
@ -103,7 +103,7 @@ if (CMAKE_SYSTEM MATCHES "SunOS")
|
||||
add_definitions( -DPOCO_OS_FAMILY_UNIX )
|
||||
# Standard 'must be' defines
|
||||
add_definitions( -D_XOPEN_SOURCE=500 -D_REENTRANT -D_THREAD_SAFE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 )
|
||||
set(SYSLIBS pthread socket xnet nsl resolv rt dl)
|
||||
set(SYSLIBS pthread socket xnet nsl resolv rt ${CMAKE_DL_LIBS})
|
||||
endif(CMAKE_SYSTEM MATCHES "SunOS")
|
||||
|
||||
if (CMAKE_COMPILER_IS_MINGW)
|
||||
|
Loading…
x
Reference in New Issue
Block a user