Skip to content

Commit 7634567

Browse files
committed
FindRSVG.cmake: Fix CMake warnings
CMake Warning (dev) at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:493 (message): The package name passed to find_package_handle_standard_args() (PkgConfig) does not match the name of the calling package (RSVG). 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): /usr/share/cmake/Modules/FindPkgConfig.cmake:562 (find_package_handle_standard_args) CMakeModules/FindRSVG.cmake:2 (INCLUDE) CMakeLists.txt:771 (FIND_PACKAGE) This warning is for project developers. Use -Wno-dev to suppress it. CMake Warning (dev) at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:493 (message): The package name passed to find_package_handle_standard_args() (PkgConfig) does not match the name of the calling package (RSVG). 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): /usr/share/cmake/Modules/FindPkgConfig.cmake:562 (find_package_handle_standard_args) CMakeModules/FindRSVG.cmake:6 (INCLUDE) CMakeLists.txt:771 (FIND_PACKAGE) This warning is for project developers. Use -Wno-dev to suppress it. Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
1 parent 89bbe4c commit 7634567

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

CMakeModules/FindRSVG.cmake

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
#use pkg-config to find various modues
2-
INCLUDE(FindPkgConfig OPTIONAL)
3-
4-
IF(PKG_CONFIG_FOUND)
5-
6-
INCLUDE(FindPkgConfig)
2+
find_package(PkgConfig QUIET)
73

4+
IF(PkgConfig_FOUND)
85
#Version 2.35 introduces the rsvg_cleanup function which is used
96
PKG_CHECK_MODULES(RSVG librsvg-2.0>=2.35)
107

0 commit comments

Comments
 (0)