derive version numbers from VERSION files

This commit is contained in:
Brent Cook 2015-08-19 19:16:29 -05:00
parent 5461dea7f1
commit 61fe482d46

View File

@ -6,20 +6,20 @@ project (LibreSSL)
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}")
file(READ ${CMAKE_SOURCE_DIR}/ssl/VERSION SSL_VERSION)
string(STRIP ${SSL_VERSION} SSL_VERSION)
string(REPLACE ":" "." SSL_VERSION ${SSL_VERSION})
string(REGEX REPLACE "\\..*" "" SSL_MAJOR_VERSION ${SSL_VERSION})
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}")
file(READ ${CMAKE_SOURCE_DIR}/crypto/VERSION CRYPTO_VERSION)
string(STRIP ${CRYPTO_VERSION} CRYPTO_VERSION)
string(REPLACE ":" "." CRYPTO_VERSION ${CRYPTO_VERSION})
string(REGEX REPLACE "\\..*" "" CRYPTO_MAJOR_VERSION ${CRYPTO_VERSION})
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}")
file(READ ${CMAKE_SOURCE_DIR}/tls/VERSION TLS_VERSION)
string(STRIP ${TLS_VERSION} TLS_VERSION)
string(REPLACE ":" "." TLS_VERSION ${TLS_VERSION})
string(REGEX REPLACE "\\..*" "" TLS_MAJOR_VERSION ${TLS_VERSION})
if(CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
add_definitions(-DHAVE_ATTRIBUTE__BOUNDED__)