2016-11-15 155 views
1

我正在用cmake Gui構建Cairo。 當我打 '配置',CMake的是顯示以下錯誤:找不到Pixman - Cmake錯誤

Could NOT find PIXMAN, try to set the path to PIXMAN root folder in the system variable PIXMAN (missing: PIXMAN_LIBRARIES PIXMAN_INCLUDE_DIRS)
Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
CMake Error at C:/cmake-3.7.0-rc1-win32-x86/share/cmake-3.7/Modules/FindPackageHandleStandardArgs.cmake:138 (message):
Could NOT find PNG (missing: PNG_LIBRARY PNG_PNG_INCLUDE_DIR)
Call Stack (most recent call first):
C:/cmake-3.7.0-rc1-win32-x86/share/cmake-3.7/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
C:/cmake-3.7.0-rc1-win32-x86/share/cmake-3.7/Modules/FindPNG.cmake:146 (find_package_handle_standard_args)
CMakeLists.txt:7 (find_package)

我已經下載的zlib,libpng的,Pixman源文件。 在哪裏放置這些文件? 我覺得FindPixaman.cmake文件需要修改:

# PIXMAN_ROOT_DIR - Set this variable to the root installation of PIXMAN 

如何設置的PIXMAN_ROOT_DIR路徑安裝根?

回答

2

I think FindPixaman.cmake file needs to be modified

您不應該修改包文件。你應該做的是設置在您的CMake項目的可變PIXMAN_ROOT_DIR調用find_package之前,所以包裝就知道到哪裏去尋找:

set(PIXMAN_ROOT_DIR /path/to/pixman) 

哪裏/path/to/pixman是安裝pixman的目錄。查看package file,它應該包含子目錄includelib分別包含pixman.h和編譯的庫。

enter image description here

另外,您可以使用按鈕Add entry在GUI設置PIXMAN_ROOT_DIR