On 26-12-2011 0:33, John Labenski wrote:
On Sun, Dec 25, 2011 at 1:18 PM, klaas.holwerda<n...@klaasholwerda.nl> wrote:
ADD_SUB_DIRECTORY became too complicated, and i would need to make to many
changes, maybe later.
For the moment my original approach was the easiest to get working.
Why doesn't it just work when do ADD_SUBDIRECTORY("path/to/wxLua"
"Output/path") then put in the libs and includes just like the
wxLua/apps/CMakeLists.txt?
I don't only need to generate an executable, but several libraries and also configuration files,
containing things from wxLua.
I supply that to the wxart2d user, so he does not have to bother about "library paths, linking
order, include order etc". Also things to wrap extra bindings are part of it.
To use it they way you want, i need two types of configuration, the old 2.8 way using wx like
naming, and your new names for 2.9
And that in a rather different manner.
So its because i use the variables i normally generate when finding wxLua the Cmake way with
FindPackage().
They go into files that are next configured with Cmake.
But i did send a mail that talks about that.
Variables like this:
wxLua_INCLUDE_DIRS
wxLua_LIBRARY_DIRS
wxLua_LIBRARIES
wxLua_LIBRARIES_WXLIKE
wxLua_PREFIX
I need to fill them again, using your assembled lists. Which i would prefer you
added to a
wxLuaConfig.cmake.in in wxLua itself.
So i do not have to puzzle through your functions to find out how to get the
stuff i need.
That is exactly why CMake tries to define such an interface to packages.
ADD_SUBDIRECTORY() does not supply or define an interface at all. Leafing it
to me to get the information some way.
I know it should be simple to fill those variables, after adding
ADD_SUBDIRECTORY().
Anyway it is not that i don't want to use ADD_SUBDIRECTORY() but keeping two
systems working at the same time, with the second having libraries in deep
paths etc. is a bit to much.
As i explained it makes it much easier when concentrated these in one place.
include_directories( ${wxLua_ROOT_DIR}/
${wxLua_ROOT_DIR}/modules/
${wxLua_ROOT_DIR}/modules/lua/src
${wxLua_ROOT_DIR}/apps/wxluaedit/src
${wxLua_ROOT_DIR}/modules/wxbind/setup)
and link to these libs
wxLuaBindLib
wxLuaSocketLib
wxLuaDebugLib
wxLuaLib
In principle that is what i added to wxLuaConfig.cmake.in to make it work again. (apart from
changing the
set (LIBRARY_OUTPUT_PATH ${wxLua_BINARY_DIR}/lib ) and set
(EXECUTABLE_OUTPUT_PATH ${wxLua_BINARY_DIR}/bin )
Just take a look, no ministry there:
http://wxart2d.svn.sourceforge.net/viewvc/wxart2d/trunk/wxArt2D/packages/wxart2d/share/wxlua/wxLuaConfig.cmake.in?revision=279&view=markup
But why don't you call it ${wxLua_LIBRARIES} and ${wxLua_INCLUDE_DIRS} so one does not need to
figure it out himself.
And it can change it the future without problem.
BTW i also changed all includes to one include dir. Works better as you say
when installing.
Klaas
------------------------------------------------------------------------------
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create
new or port existing apps to sell to consumers worldwide. Explore the
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
_______________________________________________
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users