diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 2f0dfa0..ca7f565 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt | |||
@@ -414,6 +414,18 @@ else() | |||
414 | set(LIBTLS_TEST_LIBS tls ${PLATFORM_LIBS}) | 414 | set(LIBTLS_TEST_LIBS tls ${PLATFORM_LIBS}) |
415 | endif() | 415 | endif() |
416 | 416 | ||
417 | if(OPENSSLDIR STREQUAL "") | ||
418 | if(WIN32) | ||
419 | set(OPENSSLDIR "C:/Windows/libressl/ssl") | ||
420 | else() | ||
421 | set(OPENSSLDIR "${CMAKE_INSTALL_PREFIX}/etc/ssl") | ||
422 | endif() | ||
423 | |||
424 | set(CONF_DIR "${CMAKE_INSTALL_PREFIX}/etc/ssl") | ||
425 | else() | ||
426 | set(CONF_DIR "${OPENSSLDIR}") | ||
427 | endif() | ||
428 | |||
417 | add_subdirectory(include) | 429 | add_subdirectory(include) |
418 | add_subdirectory(crypto) | 430 | add_subdirectory(crypto) |
419 | add_subdirectory(ssl) | 431 | add_subdirectory(ssl) |
@@ -495,12 +507,6 @@ if(ENABLE_LIBRESSL_INSTALL) | |||
495 | endif() | 507 | endif() |
496 | endif(ENABLE_LIBRESSL_INSTALL) | 508 | endif(ENABLE_LIBRESSL_INSTALL) |
497 | 509 | ||
498 | if(NOT "${OPENSSLDIR}" STREQUAL "") | ||
499 | set(CONF_DIR "${OPENSSLDIR}") | ||
500 | else() | ||
501 | set(CONF_DIR "${CMAKE_INSTALL_PREFIX}/etc/ssl") | ||
502 | endif() | ||
503 | |||
504 | if(ENABLE_LIBRESSL_INSTALL) | 510 | if(ENABLE_LIBRESSL_INSTALL) |
505 | install(FILES cert.pem openssl.cnf x509v3.cnf DESTINATION ${CONF_DIR}) | 511 | install(FILES cert.pem openssl.cnf x509v3.cnf DESTINATION ${CONF_DIR}) |
506 | install(DIRECTORY DESTINATION ${CONF_DIR}/certs) | 512 | install(DIRECTORY DESTINATION ${CONF_DIR}/certs) |