OpenEXR not found in cmakelists

Dear all,

I want to run the optix samples from optix SDK 7.4 and in the INSTALL-LINUX.txt, it says run ccmake. Then I got the warning as:

CMake Warning at lib/ImageReader/CMakeLists.txt:39 (message):
OpenEXR not found (see OpenEXR_ROOT). Will use procedural texture in
optixDemandTexture.

It is a warning but I cannot generate makefiles then. So I have installed openexr using command:
sudo apt-get install openexr
sudo apt-get install libopenexr–dev

But still it cannot find the root dir of the openexr. What should I configure for the path of OpenEXR?

I have only found OpenEXR header files in my /usr/include. I have tried to export OpenEXR_ROOT= /usr/include/OpenEXR. But still I cannot generate make file. And I am using Ubuntu 20.04 LTS. If any other information needed, I will add then:)

Many thanks in advance!

Best regards,
Long

Hi @xueyun.long,

I’ve tried building the OptiX 7.4 SDK samples on Ubuntu 20.04, and I see the OpenEXR warning, but cmake still produces a “Makefile” anyway. If you start with ccmake and get the warning, you just need to [c]onfigure again one more time, and then the [g]enerate option should appear and become available. Have you tried that?


David.

Hi David,

oh I have tried and thats true! Thank you very much!!
Wish you a nice week!

Long

For posterity, if you do want to compile with OpenEXR support, I think the right answer is what you already tried. For me it works when I set OpenEXR_ROOT=/usr/include/OpenEXR, after installing libopenexr-dev.

I swear I tried that path 2 days ago just like you did, and saw the same behavior - cmake error. But today when I create a clean new build/ folder and use that path it works. So maybe we both had a bad cmake cache state or something. It might be the case that we needed to clear our cmake cache and/or start with a fresh build/ folder. Just making a note of this in case anyone else hits the same problem.


David.

1 Like

Yes, that is the same situation for me. I have created a new build folder and then the path works. Thank you very much!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.