libreSSL/apps/ocspcheck/CMakeLists.txt

46 lines
991 B
CMake
Raw Normal View History

2017-01-27 14:14:43 +01:00
if(NOT MSVC)
2017-01-24 13:06:07 +01:00
include_directories(
.
./compat
../../include
../../include/compat
)
set(
OCSPCHECK_SRC
http.c
ocspcheck.c
)
2017-01-26 05:58:27 +01:00
check_function_exists(inet_ntop HAVE_INET_NTOP)
if(HAVE_INET_NTOP)
add_definitions(-DHAVE_INET_NTOP)
else()
set(OCSPCHECK_SRC ${OCSPCHECK_SRC} compat/inet_ntop.c)
endif()
check_function_exists(inet_ntop HAVE_MEMMEM)
if(HAVE_MEMMEM)
add_definitions(-DHAVE_MEMMEM)
else()
set(OCSPCHECK_SRC ${OCSPCHECK_SRC} compat/memmem.c)
endif()
2017-01-24 13:06:07 +01:00
if(NOT "${OPENSSLDIR}" STREQUAL "")
add_definitions(-DDEFAULT_CA_FILE=\"${OPENSSLDIR}/cert.pem\")
else()
add_definitions(-DDEFAULT_CA_FILE=\"${CMAKE_INSTALL_PREFIX}/etc/ssl/cert.pem\")
endif()
add_executable(ocspcheck ${OCSPCHECK_SRC})
target_link_libraries(ocspcheck tls ${OPENSSL_LIBS})
if(ENABLE_LIBRESSL_INSTALL)
install(TARGETS ocspcheck DESTINATION ${CMAKE_INSTALL_BINDIR})
install(FILES ocspcheck.8 DESTINATION ${CMAKE_INSTALL_MANDIR}/man8)
endif(ENABLE_LIBRESSL_INSTALL)
2017-01-27 14:14:43 +01:00
endif()