aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt5
-rw-r--r--tls/CMakeLists.txt2
2 files changed, 6 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7ab04ab..d3424c7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -55,6 +55,7 @@ option(ENABLE_ASM "Enable assembly" ON)
55option(ENABLE_EXTRATESTS "Enable extra tests that may be unreliable on some platforms" OFF) 55option(ENABLE_EXTRATESTS "Enable extra tests that may be unreliable on some platforms" OFF)
56option(ENABLE_NC "Enable installing TLS-enabled nc(1)" OFF) 56option(ENABLE_NC "Enable installing TLS-enabled nc(1)" OFF)
57set(OPENSSLDIR ${OPENSSLDIR} CACHE PATH "Set the default openssl directory" FORCE) 57set(OPENSSLDIR ${OPENSSLDIR} CACHE PATH "Set the default openssl directory" FORCE)
58set(TLS_DEFAULT_CA_FILE ${TLS_DEFAULT_CA_FILE} CACHE PATH "Set the default CA file" FORCE)
58set(LIBRESSL_INSTALL_CMAKEDIR "${CMAKE_INSTALL_LIBDIR}/cmake/LibreSSL" CACHE STRING "Installation directory for the CMake targets") 59set(LIBRESSL_INSTALL_CMAKEDIR "${CMAKE_INSTALL_LIBDIR}/cmake/LibreSSL" CACHE STRING "Installation directory for the CMake targets")
59 60
60option(USE_STATIC_MSVC_RUNTIMES "Use /MT instead of /MD in MSVC" OFF) 61option(USE_STATIC_MSVC_RUNTIMES "Use /MT instead of /MD in MSVC" OFF)
@@ -506,6 +507,10 @@ else()
506 set(CONF_DIR "${OPENSSLDIR}") 507 set(CONF_DIR "${OPENSSLDIR}")
507endif() 508endif()
508 509
510if(TLS_DEFAULT_CA_FILE STREQUAL "")
511 set(TLS_DEFAULT_CA_FILE "${OPENSSLDIR}/cert.pem")
512endif()
513
509add_subdirectory(include) 514add_subdirectory(include)
510add_subdirectory(crypto) 515add_subdirectory(crypto)
511add_subdirectory(ssl) 516add_subdirectory(ssl)
diff --git a/tls/CMakeLists.txt b/tls/CMakeLists.txt
index a1b244a..258cd95 100644
--- a/tls/CMakeLists.txt
+++ b/tls/CMakeLists.txt
@@ -41,7 +41,7 @@ if(WIN32)
41 set(TLS_COMPAT_SRC ${TLS_COMPAT_SRC} compat/pwrite.c) 41 set(TLS_COMPAT_SRC ${TLS_COMPAT_SRC} compat/pwrite.c)
42endif() 42endif()
43 43
44add_definitions(-DTLS_DEFAULT_CA_FILE=\"${OPENSSLDIR}/cert.pem\") 44add_definitions(-DTLS_DEFAULT_CA_FILE=\"${TLS_DEFAULT_CA_FILE}\")
45 45
46file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/tls.sym DESTINATION 46file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/tls.sym DESTINATION
47 ${CMAKE_CURRENT_BINARY_DIR}) 47 ${CMAKE_CURRENT_BINARY_DIR})