Hi Robert, Thanks for pointing out the CMAKE_DISABLE_FIND_PACKAGE option, I had no idea that existed but it'll definitely be useful.
Thanks! Jason On Mon Dec 22 2014 at 5:38:20 AM Robert Osfield <[email protected]> wrote: > Hi Brandon and James, > > From no I prefer the usage of CMAKE_DISABLE_FIND_PACKAGE_* as I'd like to > avoid proliferating lots of new cmake options. The option is pretty > obscure so I've added in a note to the OpenSceneGraph/CMakeLists.txt above > the FIND_PACKAGE block to suggest how to use this Cmake option. This note > is checked into svn/trunk and OSG-3.2 branch. > > Cheers, > Robert. > > > On 30 January 2014 at 08:54, James Turner <[email protected]> wrote: > >> >> On 30 Jan 2014, at 05:01, Hamm, Brandon <[email protected]> >> wrote: >> >> In my case, I had V8 and python libraries available that were being >> located by CMake, but I did not want to the corresponding OSG plugins to be >> built with these libraries. I saw on the osg-users list that someone else >> was wanting something similar (the ability to turn these plugins off in the >> build, or rather, a means to exclude them from being generated). I >> modified src/osgPlugins/CMakeLists.txt to add the following options: >> >> OSG_BUILD_V8_PLUGIN >> OSG_BUILD_PYTHON_PLUGIN >> OSG_BUILD_LUA_PLUGIN >> >> They are all three ON by default, but can be set to OFF to exclude the >> respective plugin. >> >> >> I found a different solution which doesn’t require OSG changes at all: >> >> -DCMAKE_DISABLE_FIND_PACKAGE_PythonLibs=1 >> >> I was completely unaware of this feature but one of my colleagues is a >> CMake contributor and pointed it out. Essentially you disable and find(Foo) >> using this style, unless it is REQUIRED - the only catch is the >> capitalization of the suffix must match that using in the find() >> declaration precisely. >> >> (Oh and it requires ‘fairly’ recent CMake - 2.8 at least) >> >> Arguably making the options explicit in OSG is nicer to users however, >> since this CMake option is obscure to say the least! >> >> Kind regards, >> James >> >> >> _______________________________________________ >> osg-users mailing list >> [email protected] >> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >> >> > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

