generate opensslconf.h in build dir for cmake
This commit is contained in:
parent
b16ad4dbd4
commit
71ce0b8c3e
@ -36,8 +36,14 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_executable(nc ${NC_SRC})
|
add_executable(nc ${NC_SRC})
|
||||||
target_include_directories(nc PUBLIC ../../include)
|
target_include_directories(nc
|
||||||
target_include_directories(nc PRIVATE . ./compat ../../include/compat)
|
PRIVATE
|
||||||
|
.
|
||||||
|
./compat
|
||||||
|
../../include/compat
|
||||||
|
PUBLIC
|
||||||
|
../../include
|
||||||
|
${CMAKE_BINARY_DIR}/include)
|
||||||
target_link_libraries(nc ${LIBTLS_LIBS})
|
target_link_libraries(nc ${LIBTLS_LIBS})
|
||||||
|
|
||||||
if(ENABLE_NC)
|
if(ENABLE_NC)
|
||||||
|
@ -8,9 +8,9 @@ set(
|
|||||||
|
|
||||||
check_function_exists(memmem HAVE_MEMMEM)
|
check_function_exists(memmem HAVE_MEMMEM)
|
||||||
if(HAVE_MEMMEM)
|
if(HAVE_MEMMEM)
|
||||||
add_definitions(-DHAVE_MEMMEM)
|
add_definitions(-DHAVE_MEMMEM)
|
||||||
else()
|
else()
|
||||||
set(OCSPCHECK_SRC ${OCSPCHECK_SRC} compat/memmem.c)
|
set(OCSPCHECK_SRC ${OCSPCHECK_SRC} compat/memmem.c)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT "${OPENSSLDIR}" STREQUAL "")
|
if(NOT "${OPENSSLDIR}" STREQUAL "")
|
||||||
@ -20,8 +20,12 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_executable(ocspcheck ${OCSPCHECK_SRC})
|
add_executable(ocspcheck ${OCSPCHECK_SRC})
|
||||||
target_include_directories(ocspcheck PUBLIC ../../include)
|
target_include_directories(ocspcheck
|
||||||
target_include_directories(ocspcheck PRIVATE . ./compat ../../include/compat)
|
PRIVATE
|
||||||
|
../../include/compat
|
||||||
|
PUBLIC
|
||||||
|
../../include
|
||||||
|
${CMAKE_BINARY_DIR}/include)
|
||||||
target_link_libraries(ocspcheck tls ${OPENSSL_LIBS})
|
target_link_libraries(ocspcheck tls ${OPENSSL_LIBS})
|
||||||
|
|
||||||
if(ENABLE_LIBRESSL_INSTALL)
|
if(ENABLE_LIBRESSL_INSTALL)
|
||||||
|
@ -61,15 +61,20 @@ if(WIN32)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
if(CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
||||||
check_function_exists(clock_gettime HAVE_CLOCK_GETTIME)
|
check_function_exists(clock_gettime HAVE_CLOCK_GETTIME)
|
||||||
if(NOT HAVE_CLOCK_GETTIME)
|
if(NOT HAVE_CLOCK_GETTIME)
|
||||||
set(OPENSSL_SRC ${OPENSSL_SRC} compat/clock_gettime_osx.c)
|
set(OPENSSL_SRC ${OPENSSL_SRC} compat/clock_gettime_osx.c)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_executable(openssl ${OPENSSL_SRC})
|
add_executable(openssl ${OPENSSL_SRC})
|
||||||
target_include_directories(openssl PUBLIC ../../include)
|
target_include_directories(openssl
|
||||||
target_include_directories(openssl PRIVATE . ../../include/compat)
|
PRIVATE
|
||||||
|
.
|
||||||
|
../../include/compat
|
||||||
|
PUBLIC
|
||||||
|
../../include
|
||||||
|
${CMAKE_BINARY_DIR}/include)
|
||||||
target_link_libraries(openssl ${OPENSSL_LIBS})
|
target_link_libraries(openssl ${OPENSSL_LIBS})
|
||||||
|
|
||||||
if(ENABLE_LIBRESSL_INSTALL)
|
if(ENABLE_LIBRESSL_INSTALL)
|
||||||
|
@ -997,7 +997,8 @@ target_include_directories(crypto_obj
|
|||||||
x509
|
x509
|
||||||
../include/compat
|
../include/compat
|
||||||
PUBLIC
|
PUBLIC
|
||||||
../include)
|
../include
|
||||||
|
${CMAKE_BINARY_DIR}/include)
|
||||||
|
|
||||||
if(HOST_AARCH64)
|
if(HOST_AARCH64)
|
||||||
target_include_directories(crypto_obj PRIVATE bn/arch/aarch64/)
|
target_include_directories(crypto_obj PRIVATE bn/arch/aarch64/)
|
||||||
|
@ -4,7 +4,10 @@ if(ENABLE_LIBRESSL_INSTALL)
|
|||||||
PATTERN "CMakeLists.txt" EXCLUDE
|
PATTERN "CMakeLists.txt" EXCLUDE
|
||||||
PATTERN "compat" EXCLUDE
|
PATTERN "compat" EXCLUDE
|
||||||
PATTERN "pqueue.h" EXCLUDE
|
PATTERN "pqueue.h" EXCLUDE
|
||||||
PATTERN "Makefile*" EXCLUDE)
|
PATTERN "Makefile*" EXCLUDE
|
||||||
|
PATTERN "arch" EXCLUDE)
|
||||||
|
install(FILES ${CMAKE_BINARY_DIR}/include/openssl/opensslconf.h
|
||||||
|
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/openssl")
|
||||||
endif(ENABLE_LIBRESSL_INSTALL)
|
endif(ENABLE_LIBRESSL_INSTALL)
|
||||||
|
|
||||||
if(HOST_AARCH64)
|
if(HOST_AARCH64)
|
||||||
@ -28,4 +31,4 @@ elseif(HOST_SPARC64)
|
|||||||
elseif(HOST_X86_64)
|
elseif(HOST_X86_64)
|
||||||
file(READ arch/amd64/opensslconf.h OPENSSLCONF)
|
file(READ arch/amd64/opensslconf.h OPENSSLCONF)
|
||||||
endif()
|
endif()
|
||||||
file(WRITE openssl/opensslconf.h "${OPENSSLCONF}")
|
file(WRITE ${CMAKE_BINARY_DIR}/include/openssl/opensslconf.h "${OPENSSLCONF}")
|
||||||
|
@ -69,7 +69,8 @@ target_include_directories(ssl_obj
|
|||||||
../crypto/bio
|
../crypto/bio
|
||||||
../include/compat
|
../include/compat
|
||||||
PUBLIC
|
PUBLIC
|
||||||
../include)
|
../include
|
||||||
|
${CMAKE_BINARY_DIR}/include)
|
||||||
|
|
||||||
add_library(bs_obj OBJECT ${BS_SRC})
|
add_library(bs_obj OBJECT ${BS_SRC})
|
||||||
target_include_directories(bs_obj
|
target_include_directories(bs_obj
|
||||||
|
@ -13,6 +13,7 @@ include_directories(
|
|||||||
../apps/openssl
|
../apps/openssl
|
||||||
../apps/openssl/compat
|
../apps/openssl/compat
|
||||||
../include
|
../include
|
||||||
|
${CMAKE_BINARY_DIR}/include
|
||||||
../include/compat
|
../include/compat
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -45,7 +45,8 @@ target_include_directories(tls_obj
|
|||||||
.
|
.
|
||||||
../include/compat
|
../include/compat
|
||||||
PUBLIC
|
PUBLIC
|
||||||
../include)
|
../include
|
||||||
|
${CMAKE_BINARY_DIR}/include)
|
||||||
|
|
||||||
add_library(tls $<TARGET_OBJECTS:tls_obj> $<TARGET_OBJECTS:ssl_obj>
|
add_library(tls $<TARGET_OBJECTS:tls_obj> $<TARGET_OBJECTS:ssl_obj>
|
||||||
$<TARGET_OBJECTS:crypto_obj> empty.c)
|
$<TARGET_OBJECTS:crypto_obj> empty.c)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user