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 /tls | |
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 'tls')
-rw-r--r-- | tls/CMakeLists.txt | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tls/CMakeLists.txt b/tls/CMakeLists.txt index b71fb37..ab73460 100644 --- a/tls/CMakeLists.txt +++ b/tls/CMakeLists.txt | |||
@@ -39,9 +39,13 @@ if (BUILD_SHARED) | |||
39 | ARCHIVE_OUTPUT_NAME tls${TLS_POSTFIX}) | 39 | ARCHIVE_OUTPUT_NAME tls${TLS_POSTFIX}) |
40 | set_target_properties(tls-shared PROPERTIES VERSION ${TLS_VERSION} | 40 | set_target_properties(tls-shared PROPERTIES VERSION ${TLS_VERSION} |
41 | SOVERSION ${TLS_MAJOR_VERSION}) | 41 | SOVERSION ${TLS_MAJOR_VERSION}) |
42 | install(TARGETS tls tls-shared DESTINATION lib) | 42 | if(ENABLE_LIBRESSL_INSTALL) |
43 | install(TARGETS tls tls-shared DESTINATION lib) | ||
44 | endif(ENABLE_LIBRESSL_INSTALL) | ||
43 | else() | 45 | else() |
44 | add_library(tls STATIC ${TLS_SRC}) | 46 | add_library(tls STATIC ${TLS_SRC}) |
45 | install(TARGETS tls DESTINATION lib) | 47 | if(ENABLE_LIBRESSL_INSTALL) |
48 | install(TARGETS tls DESTINATION lib) | ||
49 | endif(ENABLE_LIBRESSL_INSTALL) | ||
46 | endif() | 50 | endif() |
47 | 51 | ||