mirror of
https://github.com/QuasarApp/openssl-cmake.git
synced 2025-04-30 03:34:37 +00:00
configure dso
This commit is contained in:
parent
02f5d0265d
commit
f4047cd59c
@ -39,11 +39,27 @@ file( WRITE ${CMAKE_CURRENT_BINARY_DIR}/opensslconf.h.cmake "${CONF}" )
|
|||||||
#~2DO: set BUILDINF_DATE to `date LC_ALL=C LC_TIME=C`
|
#~2DO: set BUILDINF_DATE to `date LC_ALL=C LC_TIME=C`
|
||||||
configure_file ( buildinf.h.cmake buildinf.h )
|
configure_file ( buildinf.h.cmake buildinf.h )
|
||||||
|
|
||||||
|
include( CheckIncludeFile )
|
||||||
|
CHECK_INCLUDE_FILE( fcntl.h CHK_DLFCN )
|
||||||
|
if( CHK_DLFCN )
|
||||||
|
set( HAVE_DLFCN_H ON )
|
||||||
|
endif()
|
||||||
|
|
||||||
if ( APPLE )
|
if ( APPLE )
|
||||||
|
set( DSO_DLFCN ON )
|
||||||
set( DSO_EXTENSION ".dylib" )
|
set( DSO_EXTENSION ".dylib" )
|
||||||
elseif ( WIN32 )
|
elseif ( WIN32 AND NOT CYGWIN )
|
||||||
|
set( DSO_WIN32 ON )
|
||||||
|
set( DSO_EXTENSION ".dll" )
|
||||||
|
elseif ( CYGWIN )
|
||||||
|
set( DSO_DLFCN ON )
|
||||||
set( DSO_EXTENSION ".dll" )
|
set( DSO_EXTENSION ".dll" )
|
||||||
else()
|
else()
|
||||||
|
if( CHK_DLFCN )
|
||||||
|
set( DSO_DLFCN ON )
|
||||||
|
else()
|
||||||
|
set( DSO_NONE ON )
|
||||||
|
endif()
|
||||||
set( DSO_EXTENSION ".so" )
|
set( DSO_EXTENSION ".so" )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@ -271,9 +287,14 @@ add_library( crypto ${LIBSRC} ${OBJECTS_SRC} )
|
|||||||
|
|
||||||
if( WIN32 AND NOT CYGWIN )
|
if( WIN32 AND NOT CYGWIN )
|
||||||
target_link_libraries( crypto ws2_32 crypt32 )
|
target_link_libraries( crypto ws2_32 crypt32 )
|
||||||
elseif( Threads_FOUND )
|
else()
|
||||||
|
if( Threads_FOUND )
|
||||||
target_link_libraries( crypto ${CMAKE_THREAD_LIBS_INIT} )
|
target_link_libraries( crypto ${CMAKE_THREAD_LIBS_INIT} )
|
||||||
endif()
|
endif()
|
||||||
|
if ( DSO_DLFCN AND HAVE_DLFCN_H )
|
||||||
|
target_link_libraries( crypto dl )
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
set_target_properties( crypto PROPERTIES
|
set_target_properties( crypto PROPERTIES
|
||||||
VERSION "${LIB_VERSION}" SOVERSION "${LIB_SOVERSION}" )
|
VERSION "${LIB_VERSION}" SOVERSION "${LIB_SOVERSION}" )
|
||||||
|
@ -9,6 +9,9 @@
|
|||||||
|
|
||||||
#ifndef HEADER_DSO_CONF_H
|
#ifndef HEADER_DSO_CONF_H
|
||||||
# define HEADER_DSO_CONF_H
|
# define HEADER_DSO_CONF_H
|
||||||
|
|
||||||
# define DSO_EXTENSION "@DSO_EXTENSION@"
|
# define DSO_EXTENSION "@DSO_EXTENSION@"
|
||||||
|
#cmakedefine DSO_NONE
|
||||||
|
#cmakedefine DSO_WIN32
|
||||||
|
#cmakedefine DSO_DLFCN
|
||||||
|
#cmakedefine HAVE_DLFCN_H
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user