4

I want to build OpenImageIO on windows using cmake but I am stuck with the following problem: cmake stops the project generation process because it cannot find the third party libraries required by OpenImageIO.

Here is what I did (I followed the official guide for building OIIO on windows) :

  1. Downloaded the current OpenImageIO release branch from their github repo. And copied it to D:/libraries/oiio
  2. Downloaded the precompiled external libraries Put them into D:/libraries/oiio/external
  3. Downloaded Qt4 binaries for windows. Put them to D:/qt and added the path D:/libraries/qt/bin to my PATH.
  4. Downlodaded precompiled BOOST libraries (version 1.60) They reside in D:/libraries/BOOST.
  5. Installed cmake and ran cmake-gui:
    • Set the source path to the OIIO root directory containing the CMake
    • Set the output path to D:/oiio/
    • Added THIRD_PARTY_TOOLS_HOME which points to D:/libraries/oiio/external/windows/dist
    • Added BOOST_ROOT and made it point to D:/libraries/BOOST
    • Set USE_PYTHON = 0 and USE_TBB = 0

So basically from my point of view I did everything what the install instructions told me to do. But then when I hit "configure" I get the following ouput form cmake-gui :

The C compiler identification is MSVC 19.0.23918.0
The CXX compiler identification is MSVC 19.0.23918.0
Check for working C compiler using: Visual Studio 14 2015 Win64
Check for working C compiler using: Visual Studio 14 2015 Win64 -- works
Detecting C compiler ABI info
Detecting C compiler ABI info - done
Check for working CXX compiler using: Visual Studio 14 2015 Win64
Check for working CXX compiler using: Visual Studio 14 2015 Win64 -- works
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
Detecting CXX compile features
Detecting CXX compile features - done
Project build dir = P:/libraries/oiio/build
CMAKE_CXX_COMPILER is C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe
CMAKE_CXX_COMPILER_ID is MSVC
Setting Namespace to: OpenImageIO
platform = windows
CMake Error at C:/Program Files (x86)/CMake/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:148 (message):
  Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
Call Stack (most recent call first):
  C:/Program Files (x86)/CMake/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:388 (_FPHSA_FAILURE_MESSAGE)
  C:/Program Files (x86)/CMake/share/cmake-3.5/Modules/FindZLIB.cmake:124 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  src/cmake/modules/FindOpenEXR.cmake:22 (find_package)
  src/cmake/externalpackages.cmake:70 (find_package)
  CMakeLists.txt:303 (include)


Configuring incomplete, errors occurred!
See also "P:/libraries/oiio/build/CMakeFiles/CMakeOutput.log".
  • I've tried a lot of things including setting ZLIB_LIBRARY and ZLIB_INCLUDE_DIR manually but then it complains either about not finding one of the above or it complains about not finding the next third party libary.

  • I've also tried adding CMAKE_PREFIX_PATH to cmake-gui and setting it to the paths it cannot find but it helped nothing.

  • Then I've tried using only backslashes because I read something about that this might be an issue but it also did not help.

I'm using a Windows 7 64 bit machine with cmake 3.5.2

Id really appreciate any help as by now I don't know what I could do.

Thanks in advance !

Rafael Pasquay
  • 328
  • 4
  • 11
  • `... it complains about not finding the next third party libary.` - so, what is your question? If you succeed with finding zlib when setting `ZLIB_LIBRARY` and `ZLIB_INCLUDE_DIR` variables, then problem is with next 3d party library. – Tsyvarev May 07 '16 at 22:12
  • 1
    Yes but why the hell isn't it using this THIRD_PARTY_TOOLS_HOME as it should ? When I set zlibs paths manually it complains about OpenEXR and is asking about a shitload of paths nut just lib and include but also debug and alot of other things I do not know about and which are not even in the OpenEXR directory. – Rafael Pasquay May 08 '16 at 14:16
  • Hm, according to content of [src/cmake/externalpackages.cmake](https://github.com/OpenImageIO/oiio/blob/master/src/cmake/externalpackages.cmake#L42), variable `THIRD_PARTY_TOOLS_HOME` is interpreted very similar to `CMAKE_PREFIX_PATH`. So it expect content of every archive's directory `dist/windows/` to be unpacked **directly** to directory, pointed by `THIRD_PARTY_TOOLS_HOME`. For example, if you set this variable to `D:/libraries/oiio/external`, then file `D:/libraries/oiio/external/include/zlib.h` should exist. – Tsyvarev May 09 '16 at 16:31
  • Any luck with this ever? Ever take it up as a GitHub issue at the project? – Alex Hall Nov 17 '18 at 05:48
  • Here's a comment with a script someone wrote that they allege worked: https://github.com/OpenImageIO/oiio/issues/79#issuecomment-282978889 – Alex Hall Nov 17 '18 at 06:06
  • Untested at this writing, but it seems someone is distributing binaries at this page: http://www.nico-rehberg.de/tools.html – Alex Hall Dec 12 '18 at 18:08
  • Thread with possible helps: https://www.reddit.com/r/vfx/comments/9jev6b/compiling_openimageio_for_windows/ – Alex Hall Dec 12 '18 at 18:10

0 Answers0