Page 1 of 1

[Bug/Fix] Building Dependencies with Lua in XCode fails

Posted: Sun Aug 03, 2014 14:59
by markymark
Hi,

Building the CEGUI dependencies with Lua enabled from a clean slate bombs out. The error is Lua.h not found in project toluapp.

The include path that it expects to find lua.h is only populated once lua itself is built but there is no dependency between the two.

I have a fix for myself which involves adding the lua path to the ToLuaPP compile.

The file cegui-dependencies/src/tolua++-1.0.93/CEGUI-BUILD/CMakeLists.txt at Line 7

Code: Select all

include_directories(../include ../src/lib ${CMAKE_BINARY_DIR}/dependencies/include)

becomes

Code: Select all

include_directories(../include ../src/lib ${CMAKE_BINARY_DIR}/dependencies/include ../../lua-5.1.4/src)


A better solution would be to include add_dependencies between lua and toluapp, but my CMake foo isn't yet up to it.

Dave.

Re: [Bug/Fix] Building Dependencies with Lua in XCode fails

Posted: Sun Aug 03, 2014 17:50
by Ident
Next to what you mentioned, our change would break compatibility with all other Lua versions as far as i see, therefore i am not sure this is acceptable. What speaks for its general acceptability is, that both Tolua and Lua are in the same dependencies package. However users are free to use whatever dependency they want to use.

Aside from that doesnt the CMAke find file find the Lua include directory anyways? why not use that?

Re: [Bug/Fix] Building Dependencies with Lua in XCode fails

Posted: Mon Aug 04, 2014 17:18
by markymark
Hi Ident,
Ident wrote:Next to what you mentioned, our change would break compatibility with all other Lua versions as far as i see, therefore i am not sure this is acceptable. What speaks for its general acceptability is, that both Tolua and Lua are in the same dependencies package. However users are free to use whatever dependency they want to use.

Aside from that doesnt the CMAke find file find the Lua include directory anyways? why not use that?


If Lua compiled first in the dependencies followed by ToLuaPP then this wouldn't be a problem.

In reality ToLuaPP tries to compile first and then can't find lua.h as the Lua Include folder is copied during the lua compile.

Currently compiling the dependencies on a fresh system fails. (Mac OSX Mavericks, XCode 5.1.1, CMake 2.8.12.2)

Dave.

Re: [Bug/Fix] Building Dependencies with Lua in XCode fails

Posted: Tue Aug 05, 2014 08:38
by Kulik
If that is the case we can make ToLuaPP depend on Lua in the cegui-dependencies package using "add_dependency" from cmake itself. Could you please confirm that that fixes it and submit a pull request?