tpaviot/oce — Issue #166: OCE_INCLUDE_DIRS path may not be set correctly.
Author: hobbes1069
Created: 2011-11-09 20:14:43+00:00
State: open

Whlie packaging OCE for Fedora I noticed that .cmake files were defaulting to /usr/lb/oce-0.7.0/...

Since I wasn't sure where they belong but knew that wasn't it since Fedora is multi-lib (64-bit libraries go in /usr/lib64) I set the cmake option, OCE_INSTALL_CMAKE_DATA_DIR, to "%{_libdir}/%{name}-%{version}" which for building on x86_64 resolves to:

/usr/lib64/OCE-0.7.0

When I tried to build FreeCAD it found OCE but complained it couldn't find a header file. When I looked at OCEConfig.cmake it had:

SET(OCE_INCLUDE_DIRS "${SELF_DIR}/../../../include/oce")

Going back 3 directories would put it in root "/", not /usr in either of the above cases.

Perhaps this is happening because it assumes it will be installed to /usr/local instead of just /usr.

In either case I think the right directory to install the cmake files to is "/usr/share/cmake/Modules". At least on Fedora. I'm not sure about other distros.