Skip to content

Commit ead4468

Browse files
committed
cmake: Use HINTS instead of PATHS in find_* commands
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.
1 parent ad654a4 commit ead4468

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cmake/module/FindQRencode.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,16 @@ endif()
2121

2222
find_path(QRencode_INCLUDE_DIR
2323
NAMES qrencode.h
24-
PATHS ${PC_QRencode_INCLUDE_DIRS}
24+
HINTS ${PC_QRencode_INCLUDE_DIRS}
2525
)
2626

2727
find_library(QRencode_LIBRARY_RELEASE
2828
NAMES qrencode
29-
PATHS ${PC_QRencode_LIBRARY_DIRS}
29+
HINTS ${PC_QRencode_LIBRARY_DIRS}
3030
)
3131
find_library(QRencode_LIBRARY_DEBUG
3232
NAMES qrencoded qrencode
33-
PATHS ${PC_QRencode_LIBRARY_DIRS}
33+
HINTS ${PC_QRencode_LIBRARY_DIRS}
3434
)
3535
include(SelectLibraryConfigurations)
3636
select_library_configurations(QRencode)

0 commit comments

Comments
 (0)