Wireshark-dev: Re: [Wireshark-dev] Lua linkage with CMake

From: Evan Huus <eapache@xxxxxxxxx>
Date: Sat, 25 Aug 2012 15:15:01 -0400
On Fri, Aug 24, 2012 at 10:43 PM, Evan Huus <eapache@xxxxxxxxx> wrote:
> On Fri, Aug 24, 2012 at 6:52 PM, Tony Trinh <tony19@xxxxxxxxx> wrote:
>> It's possible that ${wireshark-src}/cmake/modules/FindLUA.cmake is not
>> properly detecting Lua 5.2 on your system. Check the path defined by
>> LUA_LIBRARY (and check LUA_INCLUDE_DIR while you're at it), using these
>> commands:
>>
>>    $ cd ${wireshark-src}
>>    $ cmake -LA | grep LUA
>>
>> The output should look something like this:
>>
>> ENABLE_LUA:BOOL=ON
>> LUA_INCLUDE_DIR:PATH=/Users/tony/src/lua-5.2.1/src/build/include
>> LUA_LIBRARIES:STRING=/Users/tony/src/lua-5.2.1/src/build/lib/liblua.a
>> LUA_LIBRARY:FILEPATH=/Users/tony/src/lua-5.2.1/src/build/lib/liblua.a
>>
>> You can either fix the detection script, or manually edit your path
>> variables (I use `ccmake`):
>>
>> Enter the CMake configuration with: $ ccmake .
>> Press 't' to toggle "Advanced mode" (to show the advanced variables)
>> Verify (and edit) LUA_INCLUDE_DIR, LUA_LIBRARIES, and LUA_LIBRARY. For the
>> library paths, enter the full path to liblua.a for Lua 5.2.
>
> Thanks a bunch, that was exactly what I needed to do - the include
> path was pointing to 5.1 for some reason, while the link paths were
> correctly pointing to 5.2. Everything works now.

I fixed the auto-detection in revision 44669. It wouldn't find an
include path that had a dot between the 5 and the 2 (ie
/usr/include/lua5.2/), but it would find a library path with a dot,
thus the mismatch in versions.

Evan