2016-11-15 4 views
1

Je construisais Cairo en utilisant cmake Gui. Quand je frappe 'configure', Cmake montre l'erreur suivante:Impossible de trouver Pixman - erreur 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)

J'ai téléchargé Zlib, libpng, fichiers source Pixman. Où placer ces fichiers? Je pense que fichier FindPixaman.cmake doit être modifié:

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

Comment mettre en chemin de PIXMAN_ROOT_DIR à l'installation racine?

Répondre

2

I think FindPixaman.cmake file needs to be modified

Vous ne devez jamais modifier un fichier de package. Ce que vous devez faire est de définir la variable PIXMAN_ROOT_DIR dans votre projet CMake avant l'appel à find_package de sorte que le paquet saura où chercher:

set(PIXMAN_ROOT_DIR /path/to/pixman) 

/path/to/pixman est le répertoire où Pixman est installé. En regardant dans le package file, il devrait contenir les sous-répertoires include et lib contenant pixman.h et la bibliothèque compilée respectivement.

Vous pouvez également choisir PIXMAN_ROOT_DIR dans l'IUG en utilisant le bouton Add entry:

enter image description here