Skip to content

Commit

Permalink
Fix CMake warning
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
DennisOSRM committed Dec 10, 2022
1 parent 152a52b commit 16c6f23
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cmake/FindLua.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@
# This is because, the lua location is not standardized and may exist in
# locations other than lua/

include(FindPkgConfig)
if(NOT PKG_CONFIG_FOUND)
include(CMakeFindDependencyMacro)
find_dependency(PkgConfig)
endif()

unset(_lua_include_subdirs)
unset(_lua_library_names)
Expand Down

0 comments on commit 16c6f23

Please sign in to comment.