aboutsummaryrefslogtreecommitdiff
path: root/apps
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 /apps
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 'apps')
-rw-r--r--apps/nc/CMakeLists.txt6
-rw-r--r--apps/ocspcheck/CMakeLists.txt6
-rw-r--r--apps/openssl/CMakeLists.txt12
3 files changed, 16 insertions, 8 deletions
diff --git a/apps/nc/CMakeLists.txt b/apps/nc/CMakeLists.txt
index c8757a6..424c676 100644
--- a/apps/nc/CMakeLists.txt
+++ b/apps/nc/CMakeLists.txt
@@ -53,8 +53,10 @@ add_executable(nc ${NC_SRC})
53target_link_libraries(nc tls ${OPENSSL_LIBS}) 53target_link_libraries(nc tls ${OPENSSL_LIBS})
54 54
55if(ENABLE_NC) 55if(ENABLE_NC)
56 install(TARGETS nc DESTINATION bin) 56 if(ENABLE_LIBRESSL_INSTALL)
57 install(FILES nc.1 DESTINATION share/man/man1) 57 install(TARGETS nc DESTINATION bin)
58 install(FILES nc.1 DESTINATION share/man/man1)
59 endif(ENABLE_LIBRESSL_INSTALL)
58endif() 60endif()
59 61
60endif() 62endif()
diff --git a/apps/ocspcheck/CMakeLists.txt b/apps/ocspcheck/CMakeLists.txt
index a14485e..064c367 100644
--- a/apps/ocspcheck/CMakeLists.txt
+++ b/apps/ocspcheck/CMakeLists.txt
@@ -36,7 +36,9 @@ endif()
36add_executable(ocspcheck ${OCSPCHECK_SRC}) 36add_executable(ocspcheck ${OCSPCHECK_SRC})
37target_link_libraries(ocspcheck tls ${OPENSSL_LIBS}) 37target_link_libraries(ocspcheck tls ${OPENSSL_LIBS})
38 38
39install(TARGETS ocspcheck DESTINATION bin) 39if(ENABLE_LIBRESSL_INSTALL)
40install(FILES ocspcheck.8 DESTINATION share/man/man8) 40 install(TARGETS ocspcheck DESTINATION bin)
41 install(FILES ocspcheck.8 DESTINATION share/man/man8)
42endif(ENABLE_LIBRESSL_INSTALL)
41 43
42endif() 44endif()
diff --git a/apps/openssl/CMakeLists.txt b/apps/openssl/CMakeLists.txt
index 9512065..cf5c852 100644
--- a/apps/openssl/CMakeLists.txt
+++ b/apps/openssl/CMakeLists.txt
@@ -76,13 +76,17 @@ endif()
76add_executable(openssl ${OPENSSL_SRC}) 76add_executable(openssl ${OPENSSL_SRC})
77target_link_libraries(openssl ${OPENSSL_LIBS}) 77target_link_libraries(openssl ${OPENSSL_LIBS})
78 78
79install(TARGETS openssl DESTINATION bin) 79if(ENABLE_LIBRESSL_INSTALL)
80install(FILES openssl.1 DESTINATION share/man/man1) 80 install(TARGETS openssl DESTINATION bin)
81 install(FILES openssl.1 DESTINATION share/man/man1)
82endif(ENABLE_LIBRESSL_INSTALL)
81 83
82if(NOT "${OPENSSLDIR}" STREQUAL "") 84if(NOT "${OPENSSLDIR}" STREQUAL "")
83 set(CONF_DIR "${OPENSSLDIR}") 85 set(CONF_DIR "${OPENSSLDIR}")
84else() 86else()
85 set(CONF_DIR "${CMAKE_INSTALL_PREFIX}/etc/ssl") 87 set(CONF_DIR "${CMAKE_INSTALL_PREFIX}/etc/ssl")
86endif() 88endif()
87install(FILES cert.pem openssl.cnf x509v3.cnf DESTINATION ${CONF_DIR}) 89if(ENABLE_LIBRESSL_INSTALL)
88install(DIRECTORY DESTINATION ${CONF_DIR}/cert) 90 install(FILES cert.pem openssl.cnf x509v3.cnf DESTINATION ${CONF_DIR})
91 install(DIRECTORY DESTINATION ${CONF_DIR}/cert)
92endif(ENABLE_LIBRESSL_INSTALL)