Giter Club home page Giter Club logo

Comments (7)

meshula avatar meshula commented on July 2, 2024

Including as

 <IexBaseExc.h>

is pretty conventional, for example, the Alembic codebase also follows this pattern. Installs and builds of OpenEXR definitely build to include/OpenEXR, but at the moment, users of OpenEXR need to use a -I option to referencing include/OpenEXR as appropriate. So the fix is probably to adjust the cmake scripts for CTL to reference that directory if that's how OpenEXR is installed.

from ctl.

jasjuang avatar jasjuang commented on July 2, 2024

I am building CTL from cmake instead of plain old g++ commandline. How to adjust the cmake scripts to reference the directory when there could be two possible locations like /usr/include/OpenEXR and /usr/local/include/OpenEXR?

from ctl.

meshula avatar meshula commented on July 2, 2024

The Alembic cmake scripts are configured with input variables -

    -DALEMBIC_PYILMBASE_PYIMATH_LIB="${LIB_ROOT}/lib/libPyImath.dylib" \
    -DILMBASE_ROOT="${LIB_ROOT}" \
    -DALEMBIC_PYILMBASE_ROOT="${LIB_ROOT}" \

where ${LIB_ROOT} would be /usr or /usr/local according to your set up.

The OpenEXR discovery in OpenImageIO to be reliable and easy to use:

https://github.com/OpenImageIO/oiio/blob/master/src/cmake/modules/FindOpenEXR.cmake

  -DOPENEXR_CUSTOM_INCLUDE_DIR:STRING=${LIB_ROOT}/include \
  -DOPENEXR_CUSTOM_LIB_DIR=${LIB_ROOT}/lib \

My Cmake is not quite good enough to understand if the CTL cmake files work in a similar way.

from ctl.

jasjuang avatar jasjuang commented on July 2, 2024

Where are the Alembic cmake scripts? I did a grep -r ALEMBIC * and it shows nothing.

Are you suggesting that I should replace the FindOpenEXR.cmake in CTL into the one from OpenImageIO?

from ctl.

meshula avatar meshula commented on July 2, 2024

Alembic's cmake module discovery scripts are here: https://github.com/alembic/alembic/tree/master/cmake/Modules

I'm only suggesting that if the CTL OpenEXR module doesn't accept an argument to point to your OpenEXR location (my cmake is not good enough to read the current logic and know that), then, perhaps the CTL logic can be modified to do that. Alembic and OpenImageIO both have implementations that allow it, so I list them as examples of how other projects have solved the problem.

PS I'm not part of the CTL team, just someone with a suggestion.

from ctl.

jasjuang avatar jasjuang commented on July 2, 2024

Thanks for all the feedback and suggestions. I am struggling to get cmake to discover my OpenEXR location. I get it to compile temporarily by changing the CTL code to prefix all the OpenEXR related includes with OpenEXR/. Would love to see someone providing a elegant solution to this.

from ctl.

michaeldsmith avatar michaeldsmith commented on July 2, 2024

CTL's FindIlmBase.cmake and FindOpenEXR.cmake were replaced with OpenVDB's FindIlmBase.cmake and FindOpenEXR.cmake in #107, this fixed all known build issues on many platforms. CTL's build and Cmake processes were recently simplified, modernized and improved in Dec 2022 and Jan 2023. Please reopen a new issue if you have the same or new problems with these recent master branch commits.

from ctl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.