From 2557dd7439806448ad41b7bc5f175f4ed4f74d9c Mon Sep 17 00:00:00 2001 From: d3x0r Date: Thu, 6 Jul 2017 02:09:44 -0700 Subject: Add option LIBRESSL_SKIP_INSTALL Internally LIBRESSL_SKIP_INSTALL, if not set becomes ENABLE_LIBRESSL_INSTALL so this by default is enabled. defining LIBRESSL_SKIP_INSTALL before hand will disable all install() rules. This is useful if another project includes and links to this statically. I chose to add a prefix to avoid potential name collision because the options are cached globally. If the installation is skipped, maybe it should also disable building apps? I didn't do that. --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 570e0ef..bfd1363 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,12 +26,18 @@ string(STRIP ${TLS_VERSION} TLS_VERSION) string(REPLACE ":" "." TLS_VERSION ${TLS_VERSION}) string(REGEX REPLACE "\\..*" "" TLS_MAJOR_VERSION ${TLS_VERSION}) +option(LIBRESSL_SKIP_INSTALL "Skip installation" ${LIBRESSL_SKIP_INSTALL}) option(ENABLE_ASM "Enable assembly" ON) option(ENABLE_EXTRATESTS "Enable extra tests that may be unreliable on some platforms" OFF) option(ENABLE_NC "Enable installing TLS-enabled nc(1)" OFF) option(ENABLE_VSTEST "Enable test on Visual Studio" OFF) set(OPENSSLDIR ${OPENSSLDIR} CACHE PATH "Set the default openssl directory" FORCE) +if(NOT LIBRESSL_SKIP_INSTALL) + set( ENABLE_LIBRESSL_INSTALL ON ) +endif(NOT LIBRESSL_SKIP_INSTALL) + + set(BUILD_NC true) if(CMAKE_SYSTEM_NAME MATCHES "Darwin") -- cgit v1.2.3-55-g6feb