1

Apologies because I'm pretty new and inexperienced at this but I'm trying to compile OpenExr-2.3.0 (downloaded from http://www.openexr.com/downloads.html and extracted to a 'exr_2_3_0' directory) on Windows with cmake and Visual Studio 15. I'm just going to outline the basic questions I have before going into detail:

  1. Should the ilmbase build do more than just create some header files in the relevant include directory? (I know the 2.2.0 build did and I've a feeling this is what's missing).
  2. I'm confused as to how to tell the openexr build where these header files are. It never seems to be able to find them so I'm pretty sure I'm either building them to the wrong place or missing a step.

The README file suggests the following:

  1. Launch a command window, navigate to the IlmBase folder with CMakeLists.txt,and type command: setlocal del /f CMakeCache.txt cmake -DCMAKE_INSTALL_PREFIX= -G "Visual Studio 10 Win64" ..\ilmbase

  2. Navigate to IlmBase folder in Windows Explorer, open ILMBase.sln and build the solution. When it build successfully, right click INSTALL project and build. It will install the output to the path you set up at the previous step.

  3. Go to http://www.zlib.net and download zlib

  4. Launch a command window, navigate to the OpenEXR folder with CMakeLists.txt, and type command: setlocal del /f CMakeCache.txt cmake -DZLIB_ROOT= -DILMBASE_PACKAGE_PREFIX= -DCMAKE_INSTALL_PREFIX= -G "Visual Studio 10 Win64" ^ ..\openexr

  5. Navigate to OpenEXR folder in Windows Explorer, open OpenEXR.sln and build the solution. When it build successfully, right click INSTALL project and build. It will install the output to the path you set up at the previous step.

So I create a deploy folder inside the source directory and from the source directory I run:

cd ilmbase-2.3.0
setlocal
del /f CMakeCache.txt
cmake -DCMAKE_INSTALL_PREFIX="../deploy" -G "Visual Studio 15 Win64" ../ilmbase-2.3.0

This builds a sln file in the ilmbase folder, which builds with no errors but the install project inside that solution only creates a bunch of header files inside the 'source/deploy/include/OpenEXR' folder. Again, is this all it's supposed to do or is there supposed to be a lib directory with dll files etc built as a result at this stage?

I've successfully built zlib with no errors but when I try point 4 I run into errors of:

CMake Error at IlmImfExamples/CMakeLists.txt:3 (ADD_EXECUTABLE) Target "IlmImfExamples" links to target "IlmBase::IlmThread" but the target was not found. Perhaps a find_package() call is missing for an IMPORTED target or an ALIAS is missing?

I'm guessing I should be adding a path from cmake to the new files? Even if I open the openexr.sln that is generated and try to build, IlmImfExamples fails to build. If I manually add the header files that it complains about it still won't build, complaining that it can't find OpenEXR::IlmImf.lib It's right that this hasn't been built but I've no idea why, or at least I can't find it if it has.

I did see this thread on github: https://github.com/openexr/openexr/issues/355 that says there are errors in the CMakeLists.txt which I have also changed. But I'm rapidly hitting a brick wall of knowledge at this stage so any help is greatly appreciated.

Thanks, Paddy

Paddy
  • 13
  • 4

0 Answers0