aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authord3x0r <d3x0r@users.noreply.github.com>2017-07-06 02:09:44 -0700
committerd3x0r <d3x0r@users.noreply.github.com>2017-07-06 02:09:44 -0700
commit2557dd7439806448ad41b7bc5f175f4ed4f74d9c (patch)
treeaeec866073e16350de88b84b05d11b7578c3db1c /CMakeLists.txt
parent728bda183018cbc9736f03d4f21d2b4a2585e83d (diff)
downloadportable-2557dd7439806448ad41b7bc5f175f4ed4f74d9c.tar.gz
portable-2557dd7439806448ad41b7bc5f175f4ed4f74d9c.tar.bz2
portable-2557dd7439806448ad41b7bc5f175f4ed4f74d9c.zip
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.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt6
1 files changed, 6 insertions, 0 deletions
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)
26string(REPLACE ":" "." TLS_VERSION ${TLS_VERSION}) 26string(REPLACE ":" "." TLS_VERSION ${TLS_VERSION})
27string(REGEX REPLACE "\\..*" "" TLS_MAJOR_VERSION ${TLS_VERSION}) 27string(REGEX REPLACE "\\..*" "" TLS_MAJOR_VERSION ${TLS_VERSION})
28 28
29option(LIBRESSL_SKIP_INSTALL "Skip installation" ${LIBRESSL_SKIP_INSTALL})
29option(ENABLE_ASM "Enable assembly" ON) 30option(ENABLE_ASM "Enable assembly" ON)
30option(ENABLE_EXTRATESTS "Enable extra tests that may be unreliable on some platforms" OFF) 31option(ENABLE_EXTRATESTS "Enable extra tests that may be unreliable on some platforms" OFF)
31option(ENABLE_NC "Enable installing TLS-enabled nc(1)" OFF) 32option(ENABLE_NC "Enable installing TLS-enabled nc(1)" OFF)
32option(ENABLE_VSTEST "Enable test on Visual Studio" OFF) 33option(ENABLE_VSTEST "Enable test on Visual Studio" OFF)
33set(OPENSSLDIR ${OPENSSLDIR} CACHE PATH "Set the default openssl directory" FORCE) 34set(OPENSSLDIR ${OPENSSLDIR} CACHE PATH "Set the default openssl directory" FORCE)
34 35
36if(NOT LIBRESSL_SKIP_INSTALL)
37 set( ENABLE_LIBRESSL_INSTALL ON )
38endif(NOT LIBRESSL_SKIP_INSTALL)
39
40
35set(BUILD_NC true) 41set(BUILD_NC true)
36 42
37if(CMAKE_SYSTEM_NAME MATCHES "Darwin") 43if(CMAKE_SYSTEM_NAME MATCHES "Darwin")