1

我正在尝试使用 CMake 为 MathGL 2.3.3 生成 Visual Studio 2013 项目文件。

由于某种原因,cmake 不理解我的 PNG_PNG_INCLUDE_DIR 语句。

cmake "-DZLIB_INCLUDE_DIR=c:\users\chenning\projects\zlib-1.2.8\" "-DZLIB_LIBRARY_DEBUG=c:\users\chenning\projects\zlib-1.2.8\zlib.lib" "-DZLIB_LIBRARY_Release=c:\users\chenning\projects\zlib-1.2.8\zlib.lib" "-DPNG_PNG_INCLUDE_DIR=C:\Users\chenning\projects\lpng1620\" "-DPNG_LIBRARY_DEBUG=C:\Users\chenning\projects\lpng1620\projects\vstudio\x64\Debug\libpng16.lib" "-DPNG_LIBRARY_Release=C:\Users\chenning\projects\lpng1620\projects\vstudio\x64\Release\libpng16.lib" .

Path 存在,并且该变量实际上称为带有两个 PNG 的 PNG_PNG_INCLUDE_DIR。

cmake 告诉我:

-- Found ZLIB: c:\users\chenning\projects\zlib-1.2.8\zlib.lib
-- Could NOT find PNG (missing:  PNG_PNG_INCLUDE_DIR)
CMake Error at CMakeLists.txt:341 (message):
  Couldn't find PNG library.


-- Configuring incomplete, errors occurred!
See also "C:/Users/chenning/projects/mathgl-2.3.3/CMakeFiles/CMakeOutput.log".
See also "C:/Users/chenning/projects/mathgl-2.3.3/CMakeFiles/CMakeError.log".

当我使用 cmake-gui 设置路径时,一切正常。

有什么想法有什么问题吗?

4

0 回答 0