Philip Lowman ha scritto:
On Sat, Jan 31, 2009 at 4:22 AM, Luigi Calori <l.cal...@cineca.it
<mailto:l.cal...@cineca.it>> wrote:
Hi Philip: I did not know you has access to the CMake CVS, good to
know,.
I had to change my FindOSG as I need to find also .dll and .so on
windows and linux.
So I needed both version as well soversion, so I decided to run
the osgversion utility
Furthermore, it seem to me that osgversion provide other flags to
check for defines that have been specified in the build process of
the osg found. like OSG_USE_FLOAT_MATRIX, OSG_USE_FLOAT_PLANE or
OSG_USE_FLOAT_BOUNDINGSPHERE, are those still required to be
defined when compiling against osg or they are not used anymore?
That is a good question, I'm not sure when <osg/Config> was added to
the build in relation to those preprocessor definitions being added.
Robert should clarify it, and also if is more robust to look at headers
or to run osgversion to get version number
I decided to grab VPB version of FindOSG as really do not fully
understand the nedd of a separate Findosg<component> .
I see that other Find modules that have multiple components such
as ImageMagick are implemented as single file.
In my opinion, having a single file is more handy if you do not
use cvs CMake and also help in keeping the distributed CMake
Modules directory cleaned,
I think we could just find all the components available in the
"standard" place and test the requirements against them.
We can't remove Findosg<Component>.cmake from CMake for backwards
compatibility reasons so I've instead focused on making those files as
tiny as possible and clumping the function calls in
Findosg_functions.cmake.
Well, that's also a CMake policy: if any findable package define one
Findxxx file for his sub-package the Modules folder will probably grow a
lot.
I think eventually the extensibility of FindOpenSceneGraph.cmake will
pay off. In the long term it can be used by 3rd party nodekit
developers so they can write their own FindosgFoo.cmake to allow their
nodekits to be found alongside the OSG, without having to worry about
submitting code patches to allow their nodekit to be detected.
Obviously in the short term so long as you can't declare CMake minimum
version >= 2.6.3 the only real annoyance (assuming you want to use
this at all) is needing to download & CM 4+x files in your
CMAKE_MODULE_PATH (where x = the number of nodekits you use in your
project). Of these 4+x files only 2 will likely ever change,
Findosg_functions.cmake & FindOpenSceneGraph.cmake. Findosg.cmake &
FindOpenThreads.cmake are obviously always required for very good
reasons. =)
OpenThreads is a different package, so, even if it is most used in OSG,
it deserves his own separate Find,
instead, the difference between FindOpenSceneGraph and Findosg is not
clear to me.
If some of the macro I use for copying lib and plugins dll could
be useful to someone else, let me know, I can try to assemble them
better.
There is something new in CMake called GetPrerequisites.cmake you may
want to investigate. I assume it may still may have some bugs in it,
but it aims at determining the DLL dependencies of your LIB files at
which point you can do whatever you want with the list (copy to build
tree, INSTALL(), etc.)
I had looked at it but not used as It seems in CVS only and not seen
clear example usage,
It seems to me it try to infer dll requiremets by parsing output from
dumpin under windows or ldd under linux.... it is an interesting
approach, not know if it is already usable.
Have you an idea if it 'll go into cmake 2.6.3 or just 2.7?
Making it easier for new CMake users to copy files to either MSVC
build trees or standard build trees is something I'd like to see
supported within CMake/Modules with an easy to use API. Everybody
seems to have either come up with their own home-brewed solution for
this one or have cobbled together something from mailing list posts.
I found quite handy to use:
IF(EXISTS
"${CMAKE_ROOT}/Modules/InstallRequiredSystemLibraries.cmake")
SET(CMAKE_INSTALL_MFC_LIBRARIES 1)
INCLUDE(InstallRequiredSystemLibraries)
ENDIF(EXISTS
"${CMAKE_ROOT}/Modules/InstallRequiredSystemLibraries.cmake")
to tell CMake to add system library to bin install folder, this way the
bin folder is made auto consistent.
Regards
Luigi
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org