generate opensslconf.h in build dir for cmake

This commit is contained in:
Brent Cook
2023-07-04 10:37:24 +03:00
parent b16ad4dbd4
commit 71ce0b8c3e
8 changed files with 39 additions and 17 deletions

View File

@@ -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)

View File

@@ -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)

View File

@@ -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)