Skip to content
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

Adsk Contrib - Better manage Imath dependency #1478

Merged
merged 3 commits into from
Sep 8, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/apps/ocioconvert/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ set_target_properties(ocioconvert PROPERTIES
target_link_libraries(ocioconvert
PRIVATE
apputils
${OCIO_HALF_LIB}
${OCIO_GL_LIB}
oiiohelpers
OpenColorIO
Expand Down
11 changes: 10 additions & 1 deletion src/apps/ocioconvert/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,16 @@ namespace OCIO = OCIO_NAMESPACE;

#include <OpenImageIO/imageio.h>
#include <OpenImageIO/typedesc.h>

// Take the half.h the same way OpenImageIO takes it i.e. do not use the Imath/OpenEXR one from
// OpenColorIO to avoid version clashes between OpenColorIO & OpenImageIO libraries. For example,
// OpenColorIO uses Imath 3.1.x but OpenImageIO (from the system) is using Imath 3.0.x which
// breaks the OpenColorIO compilation.
#if (OIIO_VERSION >= 20200)
hodoulp marked this conversation as resolved.
Show resolved Hide resolved
# include <OpenImageIO/Imath.h>
#else
# include <OpenEXR/half.h>
#endif
#if (OIIO_VERSION < 10100)
namespace OIIO = OIIO_NAMESPACE;
#endif
Expand All @@ -24,7 +34,6 @@ namespace OIIO = OIIO_NAMESPACE;
#endif // OCIO_GPU_ENABLED

#include "oiiohelpers.h"
#include "utils/Half.h"


// Array of non OpenColorIO arguments.
Expand Down
1 change: 0 additions & 1 deletion src/apps/ocioperf/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ set_target_properties(ocioperf PROPERTIES
target_link_libraries(ocioperf
PRIVATE
apputils
${OCIO_HALF_LIB}
oiiohelpers
OpenColorIO
OpenImageIO::OpenImageIO
Expand Down
1 change: 0 additions & 1 deletion src/apps/ocioperf/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ namespace OIIO = OIIO_NAMESPACE;

#include "apputils/argparse.h"
#include "oiiohelpers.h"
#include "utils/Half.h"
#include "utils/StringUtils.h"


Expand Down
1 change: 0 additions & 1 deletion src/libutils/oiiohelpers/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ target_link_libraries(oiiohelpers

PRIVATE
OpenColorIO
${OCIO_HALF_LIB}
utils::strings
)

Expand Down
1 change: 0 additions & 1 deletion src/libutils/oiiohelpers/oiiohelpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@


#include "oiiohelpers.h"
#include "utils/Half.h"
#include "utils/StringUtils.h"


Expand Down