mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-09-29 04:09:35 +03:00
FindLua: Fix error when LUA_INCLUDE_PREFIX is set as a variable
We use `LUA_INCLUDE_PREFIX` for the result of an internal `find_path` call and unset the cache entry before each use. Unset a plain variable of this name too in case it was set by project code. Otherwise the `find_path` call may be skipped and the wrong value used, leading to errors.
This commit is contained in:
1 parent
a99ff558af
commit
6cced78725
1 file changed
+1
@@ -122,6 +122,7 @@ endif ()
|
||||
if (NOT LUA_VERSION_STRING)
|
||||
foreach (subdir IN LISTS _lua_include_subdirs)
|
||||
unset(LUA_INCLUDE_PREFIX CACHE)
|
||||
unset(LUA_INCLUDE_PREFIX)
|
||||
find_path(LUA_INCLUDE_PREFIX ${subdir}/lua.h
|
||||
HINTS
|
||||
ENV LUA_DIR
|
||||
|
||||
Reference in new issue
Block a user