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