summaryrefslogtreecommitdiff
path: root/infrastructure/cmake/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'infrastructure/cmake/CMakeLists.txt')
-rw-r--r--infrastructure/cmake/CMakeLists.txt19
1 files changed, 12 insertions, 7 deletions
diff --git a/infrastructure/cmake/CMakeLists.txt b/infrastructure/cmake/CMakeLists.txt
index e6f46148..e98ef4c2 100644
--- a/infrastructure/cmake/CMakeLists.txt
+++ b/infrastructure/cmake/CMakeLists.txt
@@ -71,13 +71,6 @@ function(move_file_if_exists source_file dest_file)
endif()
endfunction()
-foreach(file_to_configure ${files_to_configure})
- configure_file("${base_dir}/${file_to_configure}.in" "${base_dir}/${file_to_configure}.out" @ONLY)
- replace_file_if_different(
- "${base_dir}/${file_to_configure}"
- "${base_dir}/${file_to_configure}.out")
-endforeach()
-
# If BOXBACKUP_VERSION is defined when running CMake (as the AppVeyor config does), use it
# as-is, since it contains the full version number, branch, and platform (Win32/Win64):
if(BOXBACKUP_VERSION)
@@ -375,6 +368,7 @@ file(WRITE "${boxconfig_h_file}" "// Auto-generated by CMake. Do not edit.\n")
if(WIN32)
target_link_libraries(lib_common PUBLIC ws2_32 gdi32)
+ list(APPEND CMAKE_REQUIRED_LIBRARIES ws2_32 gdi32)
endif()
# On Windows we want to statically link zlib to make debugging and distribution easier,
@@ -430,6 +424,7 @@ else()
endif()
include_directories(${OPENSSL_INCLUDE_DIR})
target_link_libraries(lib_crypto PUBLIC ${OPENSSL_LIBRARIES})
+list(APPEND CMAKE_REQUIRED_LIBRARIES ${OPENSSL_LIBRARIES})
# Link to PCRE
if (WIN32)
@@ -608,6 +603,9 @@ foreach(function_name ${detect_functions})
file(APPEND "${boxconfig_h_file}" "#cmakedefine HAVE_${platform_var_name}\n")
endforeach()
+check_function_exists(SSL_CTX_set_security_level HAVE_SSL_CTX_SET_SECURITY_LEVEL)
+file(APPEND "${boxconfig_h_file}" "#cmakedefine HAVE_SSL_CTX_SET_SECURITY_LEVEL\n")
+
check_symbol_exists(dirfd "dirent.h" HAVE_DECL_DIRFD)
file(APPEND "${boxconfig_h_file}" "#cmakedefine01 HAVE_DECL_DIRFD\n")
@@ -824,6 +822,13 @@ file(TO_NATIVE_PATH "${PERL_EXECUTABLE}" perl_executable_native)
string(REPLACE "\\" "\\\\" perl_path_escaped ${perl_executable_native})
target_compile_definitions(test_backupstorefix PRIVATE -DPERL_EXECUTABLE="${perl_path_escaped}")
+foreach(file_to_configure ${files_to_configure})
+ configure_file("${base_dir}/${file_to_configure}.in" "${base_dir}/${file_to_configure}.out" @ONLY)
+ replace_file_if_different(
+ "${base_dir}/${file_to_configure}"
+ "${base_dir}/${file_to_configure}.out")
+endforeach()
+
# Configure test timeouts:
# I've set the timeout to 4 times as long as it took to run on a particular run on Appveyor:
# https://ci.appveyor.com/project/qris/boxbackup/build/job/xm10itascygtu93j