我想使用cmake在Windows上构建OpenImageIO,但我遇到了以下问题: cmake停止了项目生成过程,因为它无法找到OpenImageIO所需的第三方库。
这是我做的(I followed the official guide for building OIIO on windows):
所以基本上从我的角度来看,我做了安装说明告诉我要做的所有事情。但是当我点击"配置"我得到以下输出形式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".
我尝试了很多东西,包括手动设置ZLIB_LIBRARY和ZLIB_INCLUDE_DIR但是它抱怨要么没有找到上述内容之一,要么抱怨没有找到下一个第三方库。
我还尝试将CMAKE_PREFIX_PATH添加到cmake-gui并将其设置为无法找到的路径,但它没有任何帮助。
然后我尝试只使用反斜杠,因为我读到了一些关于这可能是一个问题的内容,但它也没有帮助。
我正在使用带有cmake 3.5.2的Windows 7 64位计算机
我非常感谢任何帮助,因为现在我不知道自己能做些什么。
提前致谢!