Commit Graph

8 Commits

Author SHA1 Message Date
David Korth
2029a71346 [cmake] CheckNettle2or3.cmake: Also export NETTLE_FOUND in the PARENT_SCOPE.
NETTLE_FOUND may be used to determine if libnettle should be
linked to other libraries and/or executables.

This fixes a regression from commit 03ce73c612.
([cmake] CheckNettle2or3.cmake: Convert the macro to a function.)
2024-05-17 22:42:35 -04:00
David Korth
f86d5c4ad4 [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 03ce73c612.
([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.
2024-05-17 22:37:44 -04:00
David Korth
03ce73c612 [cmake] CheckNettle2or3.cmake: Convert the macro to a function.
Set HAVE_NETTLE in PARENT_SCOPE.
2024-02-20 23:43:07 -05:00
David Korth
43372103cb Port over CMake changes from rom-properties.
- CPUInstructionSetFlags.cmake: Add more CPU architectures.

- DirInstallPaths.cmake: Set ${TARGET_CPU_ARCH} and add more
  CPU architectures.

- FindNETTLE.cmake: Use ${TARGET_CPU_ARCH}.

- SplitDebugInformation.cmake: Add the `mold` workaround.

- options.cmake: Disable split debug by default on macOS.

- platform.cmake: Minor cleanups.

- gcc.cmake: Code coverage cleanup, check for "--no-undefined" and
  "--no-allow-shlib-undefined" (but only allow them on Linux),
  and check for "-ftree-vectorize".

- msvc.cmake:
  - Add: /we4477 /MP /guard:cf /guard:ehcont /permissive-
  - On i386 only: /SAFESEH
  - Disable /Zc:externC /Zc:noexceptTypes on Clang.
  - Disable thread-safe statics only on i386 and amd64.

- win32-gcc.cmake, win32-msvc.cmake:
  - Various flag changes.
2023-11-25 10:09:48 -05:00
David Korth
011e261972 [cmake] FindNETTLE.cmake: Set NETTLE_FOUND and HAVE_NETTLE on Windows.
Otherwise, the include paths aren't set correctly, and the AppVeyor
build fails.
2022-08-07 21:33:31 -04:00
David Korth
994ae2046b [qrvthtool] AboutDialog: Display the GNU Nettle version.
[libwiicrypto] config.libwiicrypto.h.in: Nettle version macros.

[cmake] CheckNettle2or3.cmake: Check if it's Nettle 3.x.

TODO: The Libraries tab needs to be RichText now.
2022-08-07 19:33:45 -04:00
David Korth
fa08e296c8 [cmake] FindNETTLE.cmake: s/Nettle/NETTLE/
This fixes a CMake warning:

CMake Warning (dev) at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
  The package name passed to `find_package_handle_standard_args` (Nettle)
  does not match the name of the calling package (NETTLE).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  cmake/libs/FindNETTLE.cmake:22 (find_package_handle_standard_args)
  src/CMakeLists.txt:74 (FIND_PACKAGE)
This warning is for project developers.  Use -Wno-dev to suppress it.
2022-08-07 19:15:00 -04:00
David Korth
31ee8efcfb [cmake] Renamed 'modules' to 'libs'. 2022-08-07 19:13:14 -04:00