Add install targets and shared libraries to CMake
This commit is contained in:
parent
9aa4e1d960
commit
5461dea7f1
@ -6,6 +6,21 @@ project (LibreSSL)
|
|||||||
|
|
||||||
enable_testing()
|
enable_testing()
|
||||||
|
|
||||||
|
set(SSL_MAJOR_VERSION "35")
|
||||||
|
set(SSL_MINOR_VERSION "0")
|
||||||
|
set(SSL_REVISION "0")
|
||||||
|
set(SSL_VERSION "${SSL_MAJOR_VERSION}.${SSL_MINOR_VERSION}.${SSL_REVISION}")
|
||||||
|
|
||||||
|
set(CRYPTO_MAJOR_VERSION "35")
|
||||||
|
set(CRYPTO_MINOR_VERSION "0")
|
||||||
|
set(CRYPTO_REVISION "0")
|
||||||
|
set(CRYPTO_VERSION "${CRYPTO_MAJOR_VERSION}.${CRYPTO_MINOR_VERSION}.${CRYPTO_REVISION}")
|
||||||
|
|
||||||
|
set(TLS_MAJOR_VERSION "6")
|
||||||
|
set(TLS_MINOR_VERSION "0")
|
||||||
|
set(TLS_REVISION "0")
|
||||||
|
set(TLS_VERSION "${TLS_MAJOR_VERSION}.${TLS_MINOR_VERSION}.${TLS_REVISION}")
|
||||||
|
|
||||||
if(CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
|
if(CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
|
||||||
add_definitions(-DHAVE_ATTRIBUTE__BOUNDED__)
|
add_definitions(-DHAVE_ATTRIBUTE__BOUNDED__)
|
||||||
endif()
|
endif()
|
||||||
@ -147,6 +162,8 @@ add_subdirectory(crypto)
|
|||||||
add_subdirectory(ssl)
|
add_subdirectory(ssl)
|
||||||
add_subdirectory(apps)
|
add_subdirectory(apps)
|
||||||
add_subdirectory(tls)
|
add_subdirectory(tls)
|
||||||
|
add_subdirectory(include)
|
||||||
if(NOT MSVC)
|
if(NOT MSVC)
|
||||||
|
add_subdirectory(man)
|
||||||
add_subdirectory(tests)
|
add_subdirectory(tests)
|
||||||
endif()
|
endif()
|
||||||
|
@ -77,3 +77,5 @@ endif()
|
|||||||
|
|
||||||
add_executable(openssl ${OPENSSL_SRC})
|
add_executable(openssl ${OPENSSL_SRC})
|
||||||
target_link_libraries(openssl ${OPENSSL_LIBS})
|
target_link_libraries(openssl ${OPENSSL_LIBS})
|
||||||
|
|
||||||
|
install(TARGETS openssl DESTINATION bin)
|
||||||
|
@ -638,4 +638,12 @@ if(NOT HAVE_TIMINGSAFE_MEMCMP)
|
|||||||
set(CRYPTO_SRC ${CRYPTO_SRC} compat/timingsafe_memcmp.c)
|
set(CRYPTO_SRC ${CRYPTO_SRC} compat/timingsafe_memcmp.c)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_library(crypto ${CRYPTO_SRC})
|
add_library(crypto-objects OBJECT ${CRYPTO_SRC})
|
||||||
|
set_property(TARGET crypto-objects PROPERTY POSITION_INDEPENDENT_CODE 1)
|
||||||
|
add_library(crypto STATIC $<TARGET_OBJECTS:crypto-objects>)
|
||||||
|
add_library(crypto-shared SHARED $<TARGET_OBJECTS:crypto-objects>)
|
||||||
|
set_target_properties(crypto-shared PROPERTIES OUTPUT_NAME crypto)
|
||||||
|
set_target_properties(crypto-shared PROPERTIES VERSION ${CRYPTO_VERSION} SOVERSION ${CRYPTO_MAJOR_VERSION})
|
||||||
|
install(TARGETS crypto crypto-shared DESTINATION lib)
|
||||||
|
|
||||||
|
|
||||||
|
5
include/CMakeLists.txt
Normal file
5
include/CMakeLists.txt
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
install(DIRECTORY .
|
||||||
|
DESTINATION include
|
||||||
|
PATTERN "CMakeLists.txt" EXCLUDE
|
||||||
|
PATTERN "compat" EXCLUDE
|
||||||
|
PATTERN "Makefile.*" EXCLUDE)
|
9
man/CMakeLists.txt
Normal file
9
man/CMakeLists.txt
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
install(DIRECTORY .
|
||||||
|
DESTINATION share/man/man3
|
||||||
|
FILES_MATCHING PATTERN "*.3"
|
||||||
|
)
|
||||||
|
|
||||||
|
install(DIRECTORY .
|
||||||
|
DESTINATION share/man/man1
|
||||||
|
FILES_MATCHING PATTERN "*.1"
|
||||||
|
)
|
@ -4,9 +4,8 @@ include_directories(
|
|||||||
../include/compat
|
../include/compat
|
||||||
)
|
)
|
||||||
|
|
||||||
add_library(
|
set(
|
||||||
ssl
|
SSL_SRC
|
||||||
|
|
||||||
bio_ssl.c
|
bio_ssl.c
|
||||||
bs_ber.c
|
bs_ber.c
|
||||||
bs_cbb.c
|
bs_cbb.c
|
||||||
@ -51,3 +50,12 @@ add_library(
|
|||||||
t1_reneg.c
|
t1_reneg.c
|
||||||
t1_srvr.c
|
t1_srvr.c
|
||||||
)
|
)
|
||||||
|
|
||||||
|
add_library(ssl-objects OBJECT ${SSL_SRC})
|
||||||
|
set_property(TARGET ssl-objects PROPERTY POSITION_INDEPENDENT_CODE 1)
|
||||||
|
add_library(ssl STATIC $<TARGET_OBJECTS:ssl-objects>)
|
||||||
|
add_library(ssl-shared SHARED $<TARGET_OBJECTS:ssl-objects>)
|
||||||
|
set_target_properties(ssl-shared PROPERTIES OUTPUT_NAME ssl)
|
||||||
|
set_target_properties(ssl-shared PROPERTIES VERSION ${SSL_VERSION} SOVERSION ${SSL_MAJOR_VERSION})
|
||||||
|
|
||||||
|
install(TARGETS ssl ssl-shared DESTINATION lib)
|
||||||
|
@ -19,4 +19,11 @@ if(NOT HAVE_STRCASECMP)
|
|||||||
set(TLS_SRC ${TLS_SRC} strsep.c)
|
set(TLS_SRC ${TLS_SRC} strsep.c)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_library(tls ${TLS_SRC})
|
add_library(tls-objects OBJECT ${TLS_SRC})
|
||||||
|
set_property(TARGET tls-objects PROPERTY POSITION_INDEPENDENT_CODE 1)
|
||||||
|
add_library(tls STATIC $<TARGET_OBJECTS:tls-objects>)
|
||||||
|
add_library(tls-shared SHARED $<TARGET_OBJECTS:tls-objects>)
|
||||||
|
set_target_properties(tls-shared PROPERTIES OUTPUT_NAME tls)
|
||||||
|
set_target_properties(tls-shared PROPERTIES VERSION ${TLS_VERSION} SOVERSION ${TLS_MAJOR_VERSION})
|
||||||
|
|
||||||
|
install(TARGETS tls tls-shared DESTINATION lib)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user