Skip to content

Commit

Permalink
Update to Libressl V3.3.3 version
Browse files Browse the repository at this point in the history
  • Loading branch information
bagajjal committed May 7, 2021
1 parent 3e9bd97 commit 63bd7ab
Show file tree
Hide file tree
Showing 476 changed files with 51,420 additions and 20,250 deletions.
32 changes: 27 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
cmake_minimum_required (VERSION 3.0)
if(MSVC)
cmake_minimum_required (VERSION 3.16.4)
cmake_policy(SET CMP0091 NEW)
else()
cmake_minimum_required (VERSION 3.0)
endif()

project (LibreSSL C ASM)

include(CheckFunctionExists)
include(CheckSymbolExists)
include(CheckLibraryExists)
Expand All @@ -9,8 +17,6 @@ set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}" ${CMAKE_MODULE_PATH})
include(cmake_export_symbol)
include(GNUInstallDirs)

project (LibreSSL C ASM)

enable_testing()

file(READ ${CMAKE_CURRENT_SOURCE_DIR}/ssl/VERSION SSL_VERSION)
Expand All @@ -36,6 +42,11 @@ option(ENABLE_EXTRATESTS "Enable extra tests that may be unreliable on some plat
option(ENABLE_NC "Enable installing TLS-enabled nc(1)" OFF)
set(OPENSSLDIR ${OPENSSLDIR} CACHE PATH "Set the default openssl directory" FORCE)

option(USE_STATIC_MSVC_RUNTIMES "Use /MT instead of /MD in MSVC" OFF)
if(USE_STATIC_MSVC_RUNTIMES)
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
endif()

if(NOT LIBRESSL_SKIP_INSTALL)
set( ENABLE_LIBRESSL_INSTALL ON )
endif(NOT LIBRESSL_SKIP_INSTALL)
Expand Down Expand Up @@ -108,7 +119,7 @@ if(WIN32)
add_definitions(-D_REENTRANT -D_POSIX_THREAD_SAFE_FUNCTIONS)
add_definitions(-DWIN32_LEAN_AND_MEAN -D_WIN32_WINNT=0x0600)
add_definitions(-DCPPFLAGS -DNO_SYSLOG -DNO_CRYPT)
set(PLATFORM_LIBS ${PLATFORM_LIBS} ws2_32)
set(PLATFORM_LIBS ${PLATFORM_LIBS} ws2_32 bcrypt)
endif()

if(MSVC)
Expand Down Expand Up @@ -289,7 +300,7 @@ if(ENABLE_ASM)
endif()
elseif(APPLE AND "${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_64")
set(HOST_ASM_MACOSX_X86_64 true)
elseif(MSVC AND "${CMAKE_GENERATOR}" MATCHES "Win64")
elseif(MSVC AND ("${CMAKE_GENERATOR}" MATCHES "Win64" OR "${CMAKE_GENERATOR_PLATFORM}" STREQUAL "x64"))
set(HOST_ASM_MASM_X86_64 true)
ENABLE_LANGUAGE(ASM_MASM)
elseif(CMAKE_SYSTEM_NAME MATCHES "MINGW" AND "${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_64")
Expand Down Expand Up @@ -357,6 +368,17 @@ if(NOT MSVC)
DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()

if(NOT "${OPENSSLDIR}" STREQUAL "")
set(CONF_DIR "${OPENSSLDIR}")
else()
set(CONF_DIR "${CMAKE_INSTALL_PREFIX}/etc/ssl")
endif()

if(ENABLE_LIBRESSL_INSTALL)
install(FILES cert.pem openssl.cnf x509v3.cnf DESTINATION ${CONF_DIR})
install(DIRECTORY DESTINATION ${CONF_DIR}/certs)
endif(ENABLE_LIBRESSL_INSTALL)

if(NOT TARGET uninstall)
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in"
Expand Down
Loading

0 comments on commit 63bd7ab

Please sign in to comment.