My thanks to Orion Poplawski for pointing out that this
find module is severely dated.
From the last PLplot commit message concerning this find module:
"The plan is to drop this find module from PLplot and use the official
version from then on once our minimum version of CMake is 3.8.0 or
higher."
Our current minimum version of CMake is 3.13.2 (!) so from the "better
late than never department" I am now following this plan with this commit.
Tested by: Alan W. Irwin <airwin@...> on Linux
(Debian Buster) by configuring the PLplot build using
time (rm -rf /home/software/plplot/HEAD/build_dir/* ~/plplot/installcmake; env CMAKE_PREFIX_PATH=/home/software/lua/install-5.3.5:/home/software/qhull/install PKG_CONFIG_PATH=/home/software/lasi_svn/install/lib/pkgconfig PATH=/home/software/cmake/install-3.13.4/bin:"$PATH" cmake -DCMAKE_INSTALL_PREFIX=/home/software/plplot/installcmake -DBUILD_TEST=ON -DENABLE_d=OFF ../plplot.git >& cmake.out)
where /home/software/lua/install-5.3.5 is where I have installed my local version of Lua (because
the official Debian Buster version of Lua is badly broken). The result is (as expected)
software@...> grep -i lua cmake.out
-- Attempting to find any Lua version
-- LUA_INCLUDE_DIR = /home/software/lua/install-5.3.5/include
-- LUA_LIBRARIES = /home/software/lua/install-5.3.5/lib/liblua5.3.a;/usr/lib/x86_64-linux-gnu/libm.so
-- Found LUA_EXECUTABLE = /home/software/lua/install-5.3.5/bin/lua
LUA_DIR: /home/software/plplot/installcmake/lib/lua/plplot
ENABLE_lua: ON
So this is one of those "it works for me" tests, but the official
modern FindLua.cmake versions that accompany all modern versions of
CMake are each tested by many users with a lot of care used by the
CMake developers whenever they update that find module from one CMake
version to the next. Therefore those several different versions
(depending on what version of CMake is adopted by users) of this find
module are likely to each be more reliable on many more platforms than
the severely dated CMake-3.8.0 version of FindLua.cmake that we were
forcing users to use before this commit.