Windows上的CMake-zlib依赖关系错误



我正试图在Windows上构建OpenEXR2.2,但下载时附带的说明没有按预期工作。IlmBase的指令有效,但一旦我得到OpenEXR指令,它就会因为zlib而失败。此时的步骤是:

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

所以我去了这个网站,在以以下开头的部分:当前版本在这里公开:我下载了zlib源代码,版本1.2.8,zip文件格式

然后,我进入下一步,也就是我得到错误的地方:

4. Launch a command window, navigate to the OpenEXR folder with 
CMakeLists.txt, and type command:     
    setlocal
    del /f CMakeCache.txt
    cmake 
      -DZLIB_ROOT=<zlib location>
      -DILMBASE_PACKAGE_PREFIX=<where you installed the ilmbase builds>
      -DCMAKE_INSTALL_PREFIX=<where you want to instal the openexr builds>
      -G "Visual Studio 10 Win64" ^
      ..openexr

这是我键入的命令:

cmake -DZLIB_ROOT=C:UserserikDocumentszlib-1.2.8 -DILMBASE_PACKAGE_PREFIX=C:UserserikDocumentsilmbase-2.2.0bin -DCMAKE_INSTALL_PREFIX=C:UserserikDocumentsilmbase-2.2.0bin -G "Visual Studio 10 Win64" ^..openexr-2.2.0

我得到的错误是:

找不到ZLIB(缺少:ZLIB_LIBRARY)(找到版本"1.2.8")

第一个问题是,说明中没有任何关于ZLIB_LIBRARY的内容。第二,zlib下载看起来都是源代码。不涉及.lib或.dll文件。

您只下载了源代码。你需要先编译它。或者从zlib主页下载预编译DLL:"zlib编译DLL"。

ZLIB_LIBRARY将由ZLIB_DIR派生而来,因此此部分是正确的。

最新更新