From 71ce0b8c3e07079a40011d2f3515969e3bdf302e Mon Sep 17 00:00:00 2001 From: Brent Cook Date: Tue, 4 Jul 2023 10:37:24 +0300 Subject: generate opensslconf.h in build dir for cmake --- apps/nc/CMakeLists.txt | 10 ++++++++-- apps/ocspcheck/CMakeLists.txt | 12 ++++++++---- apps/openssl/CMakeLists.txt | 17 +++++++++++------ 3 files changed, 27 insertions(+), 12 deletions(-) (limited to 'apps') diff --git a/apps/nc/CMakeLists.txt b/apps/nc/CMakeLists.txt index bd59211..ffd68e5 100644 --- a/apps/nc/CMakeLists.txt +++ b/apps/nc/CMakeLists.txt @@ -36,8 +36,14 @@ else() endif() add_executable(nc ${NC_SRC}) -target_include_directories(nc PUBLIC ../../include) -target_include_directories(nc PRIVATE . ./compat ../../include/compat) +target_include_directories(nc + PRIVATE + . + ./compat + ../../include/compat + PUBLIC + ../../include + ${CMAKE_BINARY_DIR}/include) target_link_libraries(nc ${LIBTLS_LIBS}) if(ENABLE_NC) diff --git a/apps/ocspcheck/CMakeLists.txt b/apps/ocspcheck/CMakeLists.txt index 2dddb6e..43eebdf 100644 --- a/apps/ocspcheck/CMakeLists.txt +++ b/apps/ocspcheck/CMakeLists.txt @@ -8,9 +8,9 @@ set( check_function_exists(memmem HAVE_MEMMEM) if(HAVE_MEMMEM) - add_definitions(-DHAVE_MEMMEM) + add_definitions(-DHAVE_MEMMEM) else() - set(OCSPCHECK_SRC ${OCSPCHECK_SRC} compat/memmem.c) + set(OCSPCHECK_SRC ${OCSPCHECK_SRC} compat/memmem.c) endif() if(NOT "${OPENSSLDIR}" STREQUAL "") @@ -20,8 +20,12 @@ else() endif() add_executable(ocspcheck ${OCSPCHECK_SRC}) -target_include_directories(ocspcheck PUBLIC ../../include) -target_include_directories(ocspcheck PRIVATE . ./compat ../../include/compat) +target_include_directories(ocspcheck + PRIVATE + ../../include/compat + PUBLIC + ../../include + ${CMAKE_BINARY_DIR}/include) target_link_libraries(ocspcheck tls ${OPENSSL_LIBS}) if(ENABLE_LIBRESSL_INSTALL) diff --git a/apps/openssl/CMakeLists.txt b/apps/openssl/CMakeLists.txt index 437c0db..efea217 100644 --- a/apps/openssl/CMakeLists.txt +++ b/apps/openssl/CMakeLists.txt @@ -61,15 +61,20 @@ if(WIN32) endif() if(CMAKE_SYSTEM_NAME MATCHES "Darwin") - check_function_exists(clock_gettime HAVE_CLOCK_GETTIME) - if(NOT HAVE_CLOCK_GETTIME) - set(OPENSSL_SRC ${OPENSSL_SRC} compat/clock_gettime_osx.c) - endif() + check_function_exists(clock_gettime HAVE_CLOCK_GETTIME) + if(NOT HAVE_CLOCK_GETTIME) + set(OPENSSL_SRC ${OPENSSL_SRC} compat/clock_gettime_osx.c) + endif() endif() add_executable(openssl ${OPENSSL_SRC}) -target_include_directories(openssl PUBLIC ../../include) -target_include_directories(openssl PRIVATE . ../../include/compat) +target_include_directories(openssl + PRIVATE + . + ../../include/compat + PUBLIC + ../../include + ${CMAKE_BINARY_DIR}/include) target_link_libraries(openssl ${OPENSSL_LIBS}) if(ENABLE_LIBRESSL_INSTALL) -- cgit v1.2.3-55-g6feb