2016-07-31 10:56:54 +01:00
|
|
|
set( LIBSYSTEM_SOURCES sys.c crypto/md5.c )
|
|
|
|
set( LIBSYSTEM_HEADERS crypto/md5.h)
|
2014-12-14 12:05:43 +00:00
|
|
|
|
2015-11-05 16:14:45 +00:00
|
|
|
|
2017-09-06 01:17:43 +01:00
|
|
|
add_lib(sys ${LIBSYSTEM_SOURCES})
|
2016-07-31 10:56:54 +01:00
|
|
|
if (ANDROID)
|
|
|
|
set (TARGET libYap)
|
|
|
|
else()
|
|
|
|
set (TARGET sys)
|
|
|
|
endif()
|
|
|
|
|
2015-11-05 16:14:45 +00:00
|
|
|
|
2016-12-04 18:52:42 +00:00
|
|
|
if (NOT ANDROID AND WITH_OPENSSL)
|
2015-11-05 16:14:45 +00:00
|
|
|
#
|
2016-12-04 18:52:42 +00:00
|
|
|
# this will evolve to getting better cryptographic support,
|
2015-11-05 16:14:45 +00:00
|
|
|
# but right now Open SSL is not supported enough.
|
|
|
|
#
|
|
|
|
find_package (OpenSSL)
|
2017-07-30 22:24:00 +01:00
|
|
|
|
|
|
|
|
2015-11-05 16:14:45 +00:00
|
|
|
if (OPENSSL_FOUND)
|
|
|
|
include_directories (${OPENSSL_INCLUDE_DIR})
|
2016-07-31 10:56:54 +01:00
|
|
|
target_link_libraries(${TARGET} ${OPENSSL_LIBRARIES})
|
2015-11-05 16:14:45 +00:00
|
|
|
check_include_file( "openssl/ripemd.h" HAVE_OPENSSL_RIPEMD_H )
|
|
|
|
check_include_file( "openssl/md5.h" HAVE_OPENSSL_MD5_H )
|
|
|
|
endif (OPENSSL_FOUND)
|
|
|
|
|
2016-08-03 00:30:02 +01:00
|
|
|
endif()
|
|
|
|
|
2015-11-05 16:14:45 +00:00
|
|
|
check_library_exists( crypt crypt "" HAVE_LIBCRYPT )
|
|
|
|
if (HAVE_LIBCRYPT)
|
2016-07-31 10:56:54 +01:00
|
|
|
target_link_libraries(${TARGET} crypt)
|
2015-11-05 16:14:45 +00:00
|
|
|
endif (HAVE_LIBCRYPT)
|
2014-12-14 12:05:43 +00:00
|
|
|
|
2016-07-31 10:56:54 +01:00
|
|
|
MY_target_link_libraries(sys libYap)
|
2014-12-14 12:05:43 +00:00
|
|
|
|
2016-07-31 10:56:54 +01:00
|
|
|
if (NOT ANDROID)
|
2014-12-14 12:05:43 +00:00
|
|
|
set_target_properties (sys PROPERTIES PREFIX "")
|
2016-07-31 10:56:54 +01:00
|
|
|
endif()
|
2014-12-14 12:05:43 +00:00
|
|
|
|
2016-07-31 10:56:54 +01:00
|
|
|
MY_install(TARGETS sys
|
2017-12-05 15:14:57 +00:00
|
|
|
LIBRARY DESTINATION ${YAP_INSTALL_DLLDIR}
|
|
|
|
RUNTIME DESTINATION ${YAP_INSTALL_DLLDIR}
|
|
|
|
ARCHIVE DESTINATION ${YAP_INSTALL_DLLDIR} )
|
2014-12-14 12:05:43 +00:00
|
|
|
|
2015-11-05 16:14:45 +00:00
|
|
|
configure_file ("sys_config.h.cmake" "sys_config.h" )
|