-
Notifications
You must be signed in to change notification settings - Fork 293
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added IMATH_INCLUDES to the cmake module #1693
Comments
That makes sense, would you like to submit a PR? |
I think I stumbled upon something quite interesting... I try to integrate OTIO in a C++ project together with Qt and wrote myself a small build system wrapper (that invokes Cmake). OTIO just builds and installs fine. When trying to include the library / includepath into my project via
I get the same error telling me that /usr/local/include/opentimelineio/serializableObject.h:15:10: fatal error: 'ImathBox.h' file not found
#include "ImathBox.h"
^~~~~~~~~~~~
1 warning and 1 error generated. When explicitly setting the includepath in my
|
Oh, that's a very helpful observation. The proper fix is that OTIO itself should be including |
Hey @meshula, I try this tonight and probably submit a small PR if that works. |
It seems like neither the cmake additions of @marklomas nor the fix to include /Users/jan/_Projekte/_tests/HelloQt6/build/outdir/opentimelineio/src/opentimelineio/serializableObject.h:15:10: fatal error: 'Imath/ImathBox.h' file not found
#include <Imath/ImathBox.h> |
btw: Whats quite interesting about this even in the log above: composable.h uses it as |
Bug Report
Build Problem
OTIO_IMATH_TARGETS is added to the cmake module so that applications using opentimelineio can inherit the correct library paths and libraries to link against, however IMATH_INCLUDES is not added to the cmake module. It specifies the include path for IMath header files included by files such as
opentimelineio/serializableObject.h
.As a result, applications don't compile out of the box without discovering the correct IMath include path for themselves and manually adding it to the compiler's command line. The correct include path is needed to ensure the same version of IMath that opentimelineio was compiled against is referenced by the application.
For OTIO_IMATH_TARGETS, the
src/opentimelineio/CMakeLists.txt
file already does this:The same could be done for IMATH_INCLUDES by adding it to the public interface (it's only added to the private interface at the moment and hence not exported to the cmake module):
I've tested this change locally and it resolves the build error in the attached log.
Expected Behavior
The cmake module provides application developers with the include path to the version of IMath that was discovered and used to build opentimelineio.
Logs
The text was updated successfully, but these errors were encountered: