title: Building OpenImage IO on windows
body: <p>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.</p>
  
  <p>Here is what I did (<a href="https://sites.google.com/site/openimageio/building-oiio-on-windows" rel="nofollow">I followed the official guide for building OIIO on windows</a>) :</p>
  
  <ol>
  <li>Downloaded the current OpenImageIO release branch from their github repo.
  And copied it to D:/libraries/oiio</li>
  <li>Downloaded the <a href="http://www.openimageio.org/external.zip" rel="nofollow">precompiled external libraries</a>
  Put them into D:/libraries/oiio/external</li>
  <li>Downloaded Qt4 binaries for windows.
  Put them to D:/qt and added the path D:/libraries/qt/bin to my PATH.</li>
  <li>Downlodaded precompiled BOOST libraries (version 1.60)
  They reside in D:/libraries/BOOST.</li>
  <li>Installed cmake and ran cmake-gui:
  
  <ul>
  <li>Set the source path to the OIIO root directory containing the CMake</li>
  <li>Set the output path to D:/oiio/</li>
  <li>Added THIRD_PARTY_TOOLS_HOME which points to D:/libraries/oiio/external/windows/dist</li>
  <li>Added BOOST_ROOT and made it point to D:/libraries/BOOST</li>
  <li>Set USE_PYTHON = 0 and USE_TBB = 0</li>
  </ul></li>
  </ol>
  
  <p>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 :</p>
  
  <pre><code>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".
  </code></pre>
  
  <ul>
  <li><p>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.</p></li>
  <li><p>I've also tried adding CMAKE_PREFIX_PATH to cmake-gui and setting it to the paths it cannot find but it helped nothing.</p></li>
  <li><p>Then I've tried using only backslashes because I read something about that this might be an issue but it also did not help.</p></li>
  </ul>
  
  <p>I'm using a Windows 7 64 bit machine with cmake 3.5.2 </p>
  
  <p>Id really appreciate any help as by now I don't know what I could do.</p>
  
  <p>Thanks in advance !</p>