Skip to content

Commit 16c6f23

Browse files
committed
Fix CMake warning
CMake Warning (dev) at /usr/share/cmake-3.24/Modules/FindPackageHandleStandardArgs.cmake:438 (message): The package name passed to `find_package_handle_standard_args` (PkgConfig) does not match the name of the calling package (Lua). 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-3.24/Modules/FindPkgConfig.cmake:99 (find_package_handle_standard_args) cmake/FindLua.cmake:39 (include) CMakeLists.txt:571 (find_package) This warning is for project developers. Use -Wno-dev to suppress it.
1 parent 152a52b commit 16c6f23

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

cmake/FindLua.cmake

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,10 @@
3636
# This is because, the lua location is not standardized and may exist in
3737
# locations other than lua/
3838

39-
include(FindPkgConfig)
39+
if(NOT PKG_CONFIG_FOUND)
40+
include(CMakeFindDependencyMacro)
41+
find_dependency(PkgConfig)
42+
endif()
4043

4144
unset(_lua_include_subdirs)
4245
unset(_lua_library_names)

0 commit comments

Comments
 (0)