Skip to content

Commit

Permalink
only use hunter package when not cross compiling
Browse files Browse the repository at this point in the history
  • Loading branch information
zerotacg committed Jan 22, 2024
1 parent 42262cc commit 818956b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -186,10 +186,9 @@ IF(HUNTER_ENABLED)
SET(LIBXML2_LIBRARIES ${LIBXML2_LIBRARIES} libxml2::libxml2)

# cross compiling doesn't quite work on the hunter openssl package therefor compile it separately and use it
FIND_PACKAGE(OpenSSL QUIET)
if(NOT OpenSSL_FOUND)
IF(NOT CMAKE_CROSSCOMPILING)
HUNTER_ADD_PACKAGE(OpenSSL)
endif()
ENDIF()
FIND_PACKAGE(OpenSSL REQUIRED)
# TODO: is OpenSSL::Crypto only needed for WIN32?
SET(OPENSSL_LIBRARIES OpenSSL::SSL OpenSSL::Crypto)
Expand Down

0 comments on commit 818956b

Please sign in to comment.