MantisBT - CMake
View Issue Details
0015756CMakeModulespublic2015-09-21 17:152016-06-10 14:31
jazztickets 
Kitware Robot 
normalminoralways
closedmoved 
linuxarch linuxarch linux
CMake 3.3.2 
 
0015756: FindLua.cmake doesn't work when both Lua5.2 and Lua5.3 are installed.
If you call find_package(Lua 5.2 REQUIRED) or find_package(Lua REQUIRED) this happens:

Found Lua: /usr/lib64/liblua5.2.so;/usr/lib64/libm.so (found suitable version "5.3.1", minimum required is "5.2")

Basically the 5.2 library is found but it still uses the 5.3 include path, hence the wrong "suitable version":

CMakeCache.txt
LUA_INCLUDE_DIR:PATH=/usr/include
LUA_LIBRARY:FILEPATH=/usr/lib64/liblua5.2.so

Calling find_package(Lua 5.3 REQUIRED) works fine though.
lua5.3 is installed to /usr/include
lua5.2 is installed to /usr/include/lua5.2
No tags attached.
patch 0001-FindLua-works-with-several-lua-installed.patch (6,335) 2015-12-27 17:37
https://public.kitware.com/Bug/file/5597/0001-FindLua-works-with-several-lua-installed.patch
Issue History
2015-09-21 17:15jazzticketsNew Issue
2015-12-27 17:37fftFile Added: 0001-FindLua-works-with-several-lua-installed.patch
2015-12-27 17:47fftNote Added: 0040029
2016-05-09 09:37Brad KingNote Added: 0041037
2016-06-10 14:29Kitware RobotNote Added: 0042843
2016-06-10 14:29Kitware RobotStatusnew => resolved
2016-06-10 14:29Kitware RobotResolutionopen => moved
2016-06-10 14:29Kitware RobotAssigned To => Kitware Robot
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0040029)
fft   
2015-12-27 17:47   
Bug affects me too, attached file proposed as a patch to fix this.

Its try to find header file in version-specific dirs at first, and then in common dirs (and also check version from lua.h against needed version).
(0041037)
Brad King   
2016-05-09 09:37   
Mailing list thread started with patch from 0015756:0040029:

proposal of fix for FindLua
http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/16340 [^]
(0042843)
Kitware Robot   
2016-06-10 14:29   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.