From ead44687483e9c936ba970de890c01d5e7ad3485 Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Tue, 24 Jun 2025 20:49:27 +0100 Subject: [PATCH] cmake: Use `HINTS` instead of `PATHS` in `find_*` commands MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit According to the CMake documentation, `HINTS` "should be paths computed by system introspection, such as a hint provided by the location of another item already found", which is precisely the case in the `FindQRencode` module. Entries in `HINTS` are searched before those in `PATHS`. On macOS, Homebrew’s `libqrencode` will therefore be located at its real path rather than via the symlink in the default prefix. --- cmake/module/FindQRencode.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmake/module/FindQRencode.cmake b/cmake/module/FindQRencode.cmake index 39e3b8b679b..575bfecc8b1 100644 --- a/cmake/module/FindQRencode.cmake +++ b/cmake/module/FindQRencode.cmake @@ -21,16 +21,16 @@ endif() find_path(QRencode_INCLUDE_DIR NAMES qrencode.h - PATHS ${PC_QRencode_INCLUDE_DIRS} + HINTS ${PC_QRencode_INCLUDE_DIRS} ) find_library(QRencode_LIBRARY_RELEASE NAMES qrencode - PATHS ${PC_QRencode_LIBRARY_DIRS} + HINTS ${PC_QRencode_LIBRARY_DIRS} ) find_library(QRencode_LIBRARY_DEBUG NAMES qrencoded qrencode - PATHS ${PC_QRencode_LIBRARY_DIRS} + HINTS ${PC_QRencode_LIBRARY_DIRS} ) include(SelectLibraryConfigurations) select_library_configurations(QRencode)