cmake: Drop optional `PkgConfig` use in `FindQRencode` module
What changed, and why it matters
This commit removes an optional way CMake can locate the QR code library (libqrencode). Previously, the build system could use pkg-config to find the library's location and version. Now it will rely only on CMake's standard search paths. There is no security-relevant change here; it is a build-system simplification.
No security action required. Reviewers may want to confirm that builds on systems where libqrencode was previously discovered only via pkg-config still succeed, but this is a build portability concern, not a security concern.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch drops optional PkgConfig integration from the FindQRencode CMake module. It removes the find_package(PkgConfig) call, pkg_check_modules() lookup, and use of PC_QRencode_INCLUDE_DIRS, PC_QRencode_LIBRARY_DIRS, and PC_QRencode_VERSION as hints/version variables. The module now uses only find_path/find_library without pkg-config hints. This is a build-system cleanup with no runtime security implications.
Changed components
cmake/module/FindQRencode.cmakeInspect captured patch +0 / −9
diff --git a/cmake/module/FindQRencode.cmake b/cmake/module/FindQRencode.cmake
index 575bfecc..aa0e8222 100644
--- a/cmake/module/FindQRencode.cmake
+++ b/cmake/module/FindQRencode.cmake
@@ -14,23 +14,15 @@ This is a wrapper around find_package()/pkg_check_modules() commands that:
#]=======================================================================]
-find_package(PkgConfig QUIET)
-if(PKG_CONFIG_FOUND)
- pkg_check_modules(PC_QRencode QUIET libqrencode)
-endif()
-
find_path(QRencode_INCLUDE_DIR
NAMES qrencode.h
- HINTS ${PC_QRencode_INCLUDE_DIRS}
)
find_library(QRencode_LIBRARY_RELEASE
NAMES qrencode
- HINTS ${PC_QRencode_LIBRARY_DIRS}
)
find_library(QRencode_LIBRARY_DEBUG
NAMES qrencoded qrencode
- HINTS ${PC_QRencode_LIBRARY_DIRS}
)
include(SelectLibraryConfigurations)
select_library_configurations(QRencode)
@@ -38,7 +30,6 @@ select_library_configurations(QRencode)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(QRencode
REQUIRED_VARS QRencode_LIBRARY QRencode_INCLUDE_DIR
- VERSION_VAR PC_QRencode_VERSION
)
if(QRencode_FOUND)
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.