[Bf-committers] Fedora openCOLLADA cmake fix

Campbell Barton ideasman42 at gmail.com
Wed Aug 24 20:41:00 CEST 2011

On Mon, Aug 15, 2011 at 2:21 AM, Richard Shaw <hobbes1069 at gmail.com> wrote:
> On Sun, Aug 14, 2011 at 7:48 AM, Dan Eicher <dan at trollwerks.org> wrote:
>> On Sun, Aug 14, 2011 at 5:14 AM, Richard Shaw <hobbes1069 at gmail.com> wrote:
>>> I'm not a cmake expert but for the Fedora build we decided to put the
>>> headers in "/usr/include/<COLLADA_LIB_NAME>" without the extra
>>> "/include" on the end, so I also patch the blender cmake files to make
>>> that work.
>> That's pretty much the whole reason for this little adventure, I was
>> sitting around with nothing to do and figured I'd try the official
>> fedora blender.spec out on (pre-release) 2.59 which brought up the
>> header issue.
> I wouldn't use the official blender spec. The Fedora maintainer has
> just recently converted to using cmake, and it's a very minimal
> conversion. I started with the openSUSE source rpm and collaborated
> with its maintainer, which IMHO, had a much better (albeit more
> complicated) approach.
> I've uploaded my latest spec here:
> http://hobbes1069.fedorapeople.org/blender/
> There's also a source rpm but I don't remember when I uploaded that so
> it will probably not match the spec I just uploaded exactly.
> One thing mine does that I don't think the official maintainer has
> figured out yet is that be default the cmake macro on Fedora assumes
> you want to build shared libs, which in general is a good idea,
> however, blender builds all these in statically. I found out the hard
> way that if you want shared libs you have a lot of work patching all
> the CMakeLists.txt's to add the right linker dependencies.
>> Judging by blender's cmake files osx also does this with the collada
>> headers, IMHO the collada 'make install' is the one in the wrong here.
> Yup, if you've downloaded my openCOLLADA source rpm you'll find a
> patch to the cmake files to make it install like apple.
> I haven't worried about 'make install'. I just install everything
> manually in the spec file. Dave Platter, the openSUSE maintainer of
> blender (and openCOLLADA) has worked a little bit with openCOLLADA
> upstream to improve the cmake support, but I'm not sure how far he's
> gotten. I think he's pretty busy right now as I haven't heard from him
> in over a month.
>> As a bit of an aside, I also had to come up with a .spec for libspnav
>> since that's part of the official blender builds now (but apparently
>> linked statically by default).
> I'm not even sure if I'm building with nav support... I'll need to check.
> Do you want to do a Review Request for libspnav? If so I'll volunteer
> to be the reviewer.
> Thanks,
> Richard

Just committed and an update to CMake / Collada so collada can be
found on ubuntu which uses paths, interested to know if this works now
on fedora.

eg ubuntu paths...

/usr/ include/opencollada/COLLADABaseUtils/COLLADABUUtils.h
/usr/ lib/opencollada/libOpenCOLLADABaseUtils.a

As well as default paths when building with OpenCollada with cmake on
linux (my own setup).
Where /opt/opencollada is the root path,
OPENCOLLADA_ROOT_DIR=/opt/opencollada in CMake's cache.

/opt/opencollada/ lib/libOpenCOLLADABaseUtils.a
/opt/opencollada/ COLLADABaseUtils/include/COLLADABUUtils.h

Ack!, you're patch also includes FindOpenCOLLADA.cmake (just wrote a
new find module for this), but we should still make use of FindXML2
and FindPCRE.

Applied you're minor changes to package builds.

- Campbell

More information about the Bf-committers mailing list