Hi,

Gerrit Voß wrote:
> Hi,
> 
> ok, I finally found a little time to look at it, you should be able to
> do this the following way:
> 
> I added a check for a external prep cmake file (run after
> the 3rd part package confs). So if OSG_GLOBAL_PREP is set 
> to a cmake file this will be included.
> 
> Inside it you can do the setup of OSG_ADD_GLOBAL_SRC (which are code
> files added to all libs) and OSG_GLOBAL_LIB (which are libs linked to
> everything, libs and executables). There is an indirection for the
> elements in OSG_GLOBAL_LIBS, e.g. they have to be cmake variables which 
> are set to the real lib.
> 
> 
> My test prep looks like the following:
> ------------------------------------------------------------------------
> MESSAGE(STATUS "Global Prep")
> 
> SET(OSG_ADD_GLOBAL_SRC 
> /home/gerrit/test/addon/codepart.cpp;/home/gerrit/test/addon/codepart_b.cpp)
> 
> SET(OSG_GLOBAL_LIB OSG_LIBPART_LIBRARY;OSG_LIBPART_B_LIBRARY)
> 
> SET(OSG_LIBPART_LIBRARY /home/gerrit/test/addon/libpart.so)
> SET(OSG_LIBPART_B_LIBRARY /home/gerrit/test/addon/libpart_b.so)
> ------------------------------------------------------------------------
> 
> So far I tested it for Linux, the Windows test is next, but one thing
> one has to change is to use import targets so the libs for all the
> build types are setup correctly. I'll post a sample as soon as I have
> it.

ok, the windows example looks like this:
============================================================================
MESSAGE(STATUS "Global Prep")

SET(OSG_ADD_GLOBAL_SRC 
"D:/user/gerrit/Projects/OpenSG/svn/AddOnTest/libpart/codepart.cpp;D:/user/gerrit/Projects/OpenSG/svn/AddOnTest/libpart_b/codepart_b.cpp")

SET(OSG_LIBPART_LIBRARY_DIR 
D:/user/gerrit/Projects/OpenSG/svn/OpenSG-Support.install/lib)
SET(OSG_LIBPART_LIBRARY_RELEASE 
D:/user/gerrit/Projects/OpenSG/svn/OpenSG-Support.install/lib/osglibpartlib.lib)
SET(OSG_LIBPART_LIBRARY_DEBUG 
D:/user/gerrit/Projects/OpenSG/svn/OpenSG-Support.install/lib/osglibpartlibD.lib)

SET(OSG_LIBPART_B_LIBRARY_DIR 
D:/user/gerrit/Projects/OpenSG/svn/OpenSG-Support.install/lib)
SET(OSG_LIBPART_B_LIBRARY_RELEASE 
D:/user/gerrit/Projects/OpenSG/svn/OpenSG-Support.install/lib/osglibpartblib.lib)
SET(OSG_LIBPART_B_LIBRARY_DEBUG 
D:/user/gerrit/Projects/OpenSG/svn/OpenSG-Support.install/lib/osglibpartblibD.lib)

OSG_ADD_IMPORT_LIB(OSG_LIBPART_LIBRARY_TARGETS OSG_LIBPART_LIBRARY)
OSG_ADD_IMPORT_LIB(OSG_LIBPART_B_LIBRARY_TARGETS OSG_LIBPART_B_LIBRARY)

SET(OSG_LIBPART_LIBRARIES ${OSG_LIBPART_LIBRARY_TARGETS})
SET(OSG_LIBPART_B_LIBRARIES ${OSG_LIBPART_B_LIBRARY_TARGETS})

SET(OSG_GLOBAL_LIB OSG_LIBPART_LIBRARIES;OSG_LIBPART_B_LIBRARIES)
================================================================================

kind regards,
   gerrit



------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to