Hi Gerrit,

> I'm partially looking into this after trying to figure out why scons
> doesn't want to build native win64 stuff. And OS X seems to be broken
> too, looking at more recent mails.


Glad to hear that!


So one general question for the cmake users, how do I propagate
> information, e.g. lists of values, up. E.g. from a subdir
> cmakelists.txt to the ones above. Ideally without writing it
> to files. But looking at OpenSG's structure it might be the best
> to traverse the source tree and write out files and use these to
> setup all the targets as a second step.


CMake has several types of properties. A property can be assigned to a file,
a directory, a target, or globally to CMake.
Include and lib directories are commonly controlled via directory
properties, which by default are propagated downwards (i.e. from parent dirs
to sub dirs).
If you wish you could define a new global property using "define_property"
and then manipulate it via "get/set_property".



> As a concrete example, how do I tell the OSGSystem build env. where to
> find the OSGBase includes.
>
> Ideally I want to get away from the scons way of either finding it
> locally via include"" or in the global install dir. That just does
> not seem to work well and is the worst part of the scons build system.
>
> Switching to include <> might be a solution, but I'm not sure how to
> handle the OpenSG subdir part of #include<OpenSG/XX>
>

I would strongly advise you to take the simplest path to solve this problem.
The CMakeList.txt in your root dir (which would be alongside the SConstruct)
is used to set global stuff.
Simply declare all the directories you want to have added to the include
path there. For instance:

SET( sourceDir ${CMAKE_HOME_DIRECTORY}/Source )

INCLUDE_DIRECTORIES(
    ${sourceDir}/Base/Base
    ${sourceDir}/Base/Field
    ...
)

Of course, you could create variables (e.g. OSGBASE_INCLUDE_DIRS,
OSGSYSTEM_INCLUDE_DIRS) with the list of dirs for re-use.
But I would not do anything fancy/complex to find the directories
automatically if the list of dirs only change at rare occasions.
Anyway, if you define the variables manually now, you could later on switch
to an automatic approach that finds and defines the variables automatically.

Regards,
Thiago
------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
Opensg-core mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-core

Reply via email to