From f86d5c4ad42e1846337ff5a93ae02fcedd6fabdd Mon Sep 17 00:00:00 2001 From: David Korth Date: Fri, 17 May 2024 22:37:44 -0400 Subject: [PATCH] [cmake] CheckNettle2or3.cmake: Set HAVE_NETTLE locally *and* in PARENT_SCOPE. Otherwise, encryption will be disabled, even if Nettle is available. This fixes a regression from commit 03ce73c612ff3ffdda80d75b467be146373014da. ([cmake] CheckNettle2or3.cmake: Convert the macro to a function.) Also, remove the ENABLE_DECRYPTION section. That's a leftover from rom-properties, and rvthtool *requires* support for decryption. --- cmake/libs/CheckNettle2or3.cmake | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/cmake/libs/CheckNettle2or3.cmake b/cmake/libs/CheckNettle2or3.cmake index c0e7696..bb17a52 100644 --- a/cmake/libs/CheckNettle2or3.cmake +++ b/cmake/libs/CheckNettle2or3.cmake @@ -4,6 +4,7 @@ FUNCTION(CHECK_NETTLE_2_OR_3) FIND_PACKAGE(NETTLE) + SET(HAVE_NETTLE ${NETTLE_FOUND}) SET(HAVE_NETTLE ${NETTLE_FOUND} PARENT_SCOPE) IF(HAVE_NETTLE) # Check if this is Nettle 3.x. @@ -19,8 +20,5 @@ FUNCTION(CHECK_NETTLE_2_OR_3) CHECK_SYMBOL_EXISTS(NETTLE_VERSION_MAJOR "nettle/version.h" HAVE_NETTLE_VERSION_H) CHECK_SYMBOL_EXISTS(nettle_version_major "nettle/version.h" HAVE_NETTLE_VERSION_FUNCTIONS) ENDIF(HAVE_NETTLE_3) - ELSE(HAVE_NETTLE) - # Disable decryption. - SET(ENABLE_DECRYPTION OFF CACHE INTERNAL "Enable decryption for newer ROM and disc images." FORCE) ENDIF(HAVE_NETTLE) ENDFUNCTION(CHECK_NETTLE_2_OR_3)