aboutsummaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorkinichiro <kinichiro.inoguchi@gmail.com>2016-04-11 12:59:23 +0900
committerkinichiro <kinichiro.inoguchi@gmail.com>2016-04-14 15:16:52 +0900
commitbda62f7fe4ad3965f8f6e7f06838c76455340567 (patch)
tree8686094e11d548e14d3207e8c80fc0b3183cfed2 /apps
parentc94670a8cd39f8a8843e9adba2a6030adb00ac94 (diff)
downloadportable-bda62f7fe4ad3965f8f6e7f06838c76455340567.tar.gz
portable-bda62f7fe4ad3965f8f6e7f06838c76455340567.tar.bz2
portable-bda62f7fe4ad3965f8f6e7f06838c76455340567.zip
add cmake build options
- add cmake build options as configure provides * -DENABLE_ASM (default ON) * -DENABLE_EXTRATESTS (default OFF) * -DENABLE_NC (default OFF) * -DOPENSSLDIR (default ${CMAKE_INSTALL_PREFIX}/etc/ssl) - add biotest and pidwraptest if ENABLE_EXTRATESTS is ON - add compiler flag `-fno-common` if CMAKE_SYSTEM_NAME is Darwin to prevent link error Undefined symbols "_OPENSSL_ia32cap_P"
Diffstat (limited to 'apps')
-rw-r--r--apps/nc/CMakeLists.txt6
-rw-r--r--apps/openssl/CMakeLists.txt8
2 files changed, 14 insertions, 0 deletions
diff --git a/apps/nc/CMakeLists.txt b/apps/nc/CMakeLists.txt
index a218899..c8757a6 100644
--- a/apps/nc/CMakeLists.txt
+++ b/apps/nc/CMakeLists.txt
@@ -43,6 +43,12 @@ else()
43 set(NC_SRC ${NC_SRC} compat/strtonum.c) 43 set(NC_SRC ${NC_SRC} compat/strtonum.c)
44endif() 44endif()
45 45
46if(NOT "${OPENSSLDIR}" STREQUAL "")
47 add_definitions(-DDEFAULT_CA_FILE=\"${OPENSSLDIR}/cert.pem\")
48else()
49 add_definitions(-DDEFAULT_CA_FILE=\"${CMAKE_INSTALL_PREFIX}/etc/ssl/cert.pem\")
50endif()
51
46add_executable(nc ${NC_SRC}) 52add_executable(nc ${NC_SRC})
47target_link_libraries(nc tls ${OPENSSL_LIBS}) 53target_link_libraries(nc tls ${OPENSSL_LIBS})
48 54
diff --git a/apps/openssl/CMakeLists.txt b/apps/openssl/CMakeLists.txt
index d4f786b..0d4642e 100644
--- a/apps/openssl/CMakeLists.txt
+++ b/apps/openssl/CMakeLists.txt
@@ -79,3 +79,11 @@ target_link_libraries(openssl ${OPENSSL_LIBS})
79 79
80install(TARGETS openssl DESTINATION bin) 80install(TARGETS openssl DESTINATION bin)
81install(FILES openssl.1 DESTINATION share/man/man1) 81install(FILES openssl.1 DESTINATION share/man/man1)
82
83if(NOT "${OPENSSLDIR}" STREQUAL "")
84 set(CONF_DIR "${OPENSSLDIR}")
85else()
86 set(CONF_DIR "${CMAKE_INSTALL_PREFIX}/etc/ssl")
87endif()
88install(FILES cert.pem openssl.cnf x509v3.cnf DESTINATION ${CONF_DIR})
89install(DIRECTORY DESTINATION ${CONF_DIR}/cert)