Skip to content

Commit 7a5389b

Browse files
olszomalmtrojnar
authored andcommitted
Fixed cmake test cURL support
1 parent d9f0a8d commit 7a5389b

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

CMakeLists.txt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,16 @@ target_include_directories(osslsigncode PRIVATE ${OPENSSL_INCLUDE_DIR})
6666
target_link_libraries(osslsigncode PRIVATE ${OPENSSL_LIBRARIES})
6767

6868
# set cURL includes/libraries
69-
if(OPENSSL_VERSION VERSION_LESS "3.0.0" AND CURL_FOUND)
69+
if(OPENSSL_VERSION VERSION_LESS "3.0.0")
70+
if(CURL_FOUND)
7071
target_compile_definitions(osslsigncode PRIVATE ENABLE_CURL=1)
7172
target_include_directories(osslsigncode PRIVATE ${CURL_INCLUDE_DIRS})
7273
target_link_libraries(osslsigncode PRIVATE ${CURL_LIBRARIES})
7374
message(STATUS "cURL support enabled")
74-
else(OPENSSL_VERSION VERSION_LESS "3.0.0" AND CURL_FOUND)
75+
else(CURL_FOUND)
7576
message(STATUS "cURL support disabled (library not found)")
76-
endif(OPENSSL_VERSION VERSION_LESS "3.0.0" AND CURL_FOUND)
77+
endif(CURL_FOUND)
78+
endif(OPENSSL_VERSION VERSION_LESS "3.0.0")
7779

7880
if(NOT ZLIB_FOUND)
7981
message(FATAL_ERROR "Zlib library not found")

cmake/CMakeTest.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@ foreach(file ${files})
454454
endforeach(file ${files})
455455

456456

457-
if((Python3_FOUND OR server_error) AND CURL_FOUND)
457+
if((Python3_FOUND OR server_error) AND (OPENSSL_VERSION VERSION_GREATER_EQUAL "3.0.0" OR CURL_FOUND))
458458

459459
### Sign with Time-Stamp Authority ###
460460

@@ -724,9 +724,9 @@ endforeach(ext ${extensions_nocat})
724724
message(STATUS "Keep HTTP server after tests")
725725
endif(STOP_SERVER)
726726

727-
else((Python3_FOUND OR server_error) AND CURL_FOUND)
727+
else((Python3_FOUND OR server_error) AND (OPENSSL_VERSION VERSION_GREATER_EQUAL "3.0.0" OR CURL_FOUND))
728728
message(STATUS "CTest skips some tests")
729-
endif((Python3_FOUND OR server_error) AND CURL_FOUND)
729+
endif((Python3_FOUND OR server_error) AND (OPENSSL_VERSION VERSION_GREATER_EQUAL "3.0.0" OR CURL_FOUND))
730730

731731
# Delete test files
732732
set(names "legacy" "signed" "signed_crldp" "nested" "revoked" "removed" "added")

0 commit comments

Comments
 (0)