diff options
author | d3x0r <d3x0r@users.noreply.github.com> | 2017-07-06 02:09:44 -0700 |
---|---|---|
committer | d3x0r <d3x0r@users.noreply.github.com> | 2017-07-06 02:09:44 -0700 |
commit | 2557dd7439806448ad41b7bc5f175f4ed4f74d9c (patch) | |
tree | aeec866073e16350de88b84b05d11b7578c3db1c /CMakeLists.txt | |
parent | 728bda183018cbc9736f03d4f21d2b4a2585e83d (diff) | |
download | portable-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.txt | 6 |
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) | |||
26 | string(REPLACE ":" "." TLS_VERSION ${TLS_VERSION}) | 26 | string(REPLACE ":" "." TLS_VERSION ${TLS_VERSION}) |
27 | string(REGEX REPLACE "\\..*" "" TLS_MAJOR_VERSION ${TLS_VERSION}) | 27 | string(REGEX REPLACE "\\..*" "" TLS_MAJOR_VERSION ${TLS_VERSION}) |
28 | 28 | ||
29 | option(LIBRESSL_SKIP_INSTALL "Skip installation" ${LIBRESSL_SKIP_INSTALL}) | ||
29 | option(ENABLE_ASM "Enable assembly" ON) | 30 | option(ENABLE_ASM "Enable assembly" ON) |
30 | option(ENABLE_EXTRATESTS "Enable extra tests that may be unreliable on some platforms" OFF) | 31 | option(ENABLE_EXTRATESTS "Enable extra tests that may be unreliable on some platforms" OFF) |
31 | option(ENABLE_NC "Enable installing TLS-enabled nc(1)" OFF) | 32 | option(ENABLE_NC "Enable installing TLS-enabled nc(1)" OFF) |
32 | option(ENABLE_VSTEST "Enable test on Visual Studio" OFF) | 33 | option(ENABLE_VSTEST "Enable test on Visual Studio" OFF) |
33 | set(OPENSSLDIR ${OPENSSLDIR} CACHE PATH "Set the default openssl directory" FORCE) | 34 | set(OPENSSLDIR ${OPENSSLDIR} CACHE PATH "Set the default openssl directory" FORCE) |
34 | 35 | ||
36 | if(NOT LIBRESSL_SKIP_INSTALL) | ||
37 | set( ENABLE_LIBRESSL_INSTALL ON ) | ||
38 | endif(NOT LIBRESSL_SKIP_INSTALL) | ||
39 | |||
40 | |||
35 | set(BUILD_NC true) | 41 | set(BUILD_NC true) |
36 | 42 | ||
37 | if(CMAKE_SYSTEM_NAME MATCHES "Darwin") | 43 | if(CMAKE_SYSTEM_NAME MATCHES "Darwin") |