1
votes

I was building Cairo using cmake Gui. When I hit 'configure', Cmake is showing the following error:

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)

I have downloaded Zlib, LibPng, Pixman source files. Where to place these files? I think FindPixaman.cmake file needs to be modified:

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

How to set path of PIXMAN_ROOT_DIR to root installation?

1

1 Answers

2
votes

I think FindPixaman.cmake file needs to be modified

You should never modify a package file. What you should do is set the variable PIXMAN_ROOT_DIR in your cmake project before the call to find_package so the package will know where to search:

set(PIXMAN_ROOT_DIR /path/to/pixman)

Where /path/to/pixman is the directory where pixman is installed. Looking in the package file, it should contain sub-directories include and lib containing pixman.h and the compiled library respectively.

Alternatively you can set PIXMAN_ROOT_DIR in the gui using button Add entry:

enter image description here