# Documentation for FindLua has always been incorrect from my end.

**URL:** https://discourse.cmake.org/t/documentation-for-findlua-has-always-been-incorrect-from-my-end/15411
**Category:** Site Feedback
**Created:** [December 19, 2025, 8:20pm UTC](https://discourse.cmake.org/t/documentation-for-findlua-has-always-been-incorrect-from-my-end/15411 "2025-12-19T20:20:46Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![ProgramGamer](https://discourse.cmake.org/user_avatar/discourse.cmake.org/programgamer/32/5797_2.png) [@ProgramGamer](https://discourse.cmake.org/u/ProgramGamer)
#### Post date: [December 19, 2025, 8:20pm UTC](https://discourse.cmake.org/t/documentation-for-findlua-has-always-been-incorrect-from-my-end/15411/1 "2025-12-19T20:20:46Z")

</div>

As far back as I can remember, the [documentation for FindLua](https://cmake.org/cmake/help/v4.2/module/FindLua.html) has never matched the behavior I have observed in CMake proper. `Lua_FOUND` has never been defined after a call to `find_package(Lua)` (as opposed to `LUA_FOUND`, which is 1) and this includes CMake 4.2, the version where the all-caps version was ostensibly deprecated and which I just downloaded. In fact, none of the variables prefixed with the proper-casing spelling of Lua have ever been defined for me, on any machine where I’ve used CMake. I don’t know if something has, by some cursed happenstance, always been misconfigured on my computers to cause this behavior but that seems improbable, so is the documentation just wrong? Is CMake itself bugged? Do I need to opt into the switch to proper casing with a policy flag or something?

I’m at a loss.

P.S. you can use this snippet to verify my claim on your end.

```cmake
find_package(Lua)
message("Lua found: ${Lua_FOUND}")
message("LUA FOUND: ${LUA_FOUND}")

```

Edit: Nevermind, this is because of a flaky vcpkg wrapper script. I’m writing them a bug report about it.

---

<div class="post-metadata">

### Author: ![brad.king](https://discourse.cmake.org/user_avatar/discourse.cmake.org/brad.king/32/11_2.png) [@brad.king](https://discourse.cmake.org/u/brad.king)
#### Post date: [December 19, 2025, 8:36pm UTC](https://discourse.cmake.org/t/documentation-for-findlua-has-always-been-incorrect-from-my-end/15411/2 "2025-12-19T20:36:36Z")

</div>

It works fine for me:

```console
$ cat ../CMakeLists.txt
cmake_minimum_required(VERSION 3.10)
project(TestLua C)
find_package(Lua)
message(STATUS "Lua found: ${Lua_FOUND}")
message(STATUS "LUA FOUND: ${LUA_FOUND}")

```

With CMake 4.2.1:

```console
$ cmake ..
...
-- Found Lua: ... (found version "5.4.8")
-- Lua found: TRUE
-- LUA FOUND: TRUE

```

With CMake 3.10.3:

```console
$ cmake ..
...
-- Found Lua: ... (found version "5.3.6")
-- Lua found: TRUE
-- LUA FOUND: TRUE

```

---

<div class="post-metadata">

### Author: ![brad.king](https://discourse.cmake.org/user_avatar/discourse.cmake.org/brad.king/32/11_2.png) [@brad.king](https://discourse.cmake.org/u/brad.king)
#### Post date: [December 19, 2025, 8:37pm UTC](https://discourse.cmake.org/t/documentation-for-findlua-has-always-been-incorrect-from-my-end/15411/3 "2025-12-19T20:37:24Z")

</div>

> [@ProgramGamer](#):
>
> Edit: Nevermind, this is because of a flaky vcpkg wrapper script. I’m writing them a bug report about it.

Ah, thanks.

---

<div class="post-metadata">

### Author: ![ProgramGamer](https://discourse.cmake.org/user_avatar/discourse.cmake.org/programgamer/32/5797_2.png) [@ProgramGamer](https://discourse.cmake.org/u/ProgramGamer)
#### Post date: [December 19, 2025, 9:44pm UTC](https://discourse.cmake.org/t/documentation-for-findlua-has-always-been-incorrect-from-my-end/15411/4 "2025-12-19T21:44:07Z")

</div>

[Here’s the report](https://github.com/microsoft/vcpkg/issues/48972), for the curious.
