-
Notifications
You must be signed in to change notification settings - Fork 632
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmake: Fix the handling of PNG_HARDWARE_OPTIMIZATIONS on FreeBSD/amd64
Because of a missing "amd64" string (in lowercase) in a regex match, the CMake build was unable to pick up the PNG_HARDWARE_OPTIMIZATIONS flag on FreeBSD/amd64 (and possibly other amd64 systems as well). Rename the target arch variable from TARGET_ARCH to a more idiomatic PNG_TARGET_ARCHITECTURE, and set it to an always-lowercase string. The follow-on checks are now simpler and easier to get right.
- Loading branch information
Showing
1 changed file
with
26 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33ef48b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ctruta; can you revert this so that #575 can go in?
33ef48b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As explained in issue #372 these checks don't work anyway because the TARGET_ARCH matches must not be anchored. The example failure (from the issue) is this:
cmake -S . -B build -DCMAKE_OSX_ARCHITECTURES:STRING="x86_64;arm64" -DPNG_HARDWARE_OPTIMIZATIONS=OFF
#575 fixes all of this by removing every single use of TARGET_ARCH from CMakeLists.txt (the setting is still there, I think that can be removed as well.)