[CMake] Rewrite FindCairo.cmake.
authorrakuco@webkit.org <rakuco@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 4 May 2012 00:39:57 +0000 (00:39 +0000)
committerrakuco@webkit.org <rakuco@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 4 May 2012 00:39:57 +0000 (00:39 +0000)
commit52377ab83879737f4389c380da7a9154ac3e5878
tree5d75fb0e92334c3ec4d9a90d035bf8a1b96a43c2
parent89e28d34b8e8e825eb67031dd56debfc85e6ad0b
[CMake] Rewrite FindCairo.cmake.
https://bugs.webkit.org/show_bug.cgi?id=84895

Reviewed by Daniel Bates.

The old approach relied on pkg-config for finding Cairo (which
introduced a dependency on pkg-config that could be avoided), used
the LibFindMacros code that we should probably remove in the
future and did not use the FindPackageHandleStandardArguments
module.

Change all that by rewriting the module.
- Use the pkg-config output optionally instead of requiring it
like LibFindMacros did.
- Remove the implicit dependency on FreeType which often found it
the wrong way via pkg-config and without considering
CMAKE_PREFIX_PATH.
- Retrieve the Cairo version by looking at cairo-version.h instead
of relying on pkg-config. It requires some additional code for
checking if the desired version has been found, but that will not
be needed once we start depending on CMake 2.8.3 or later.

The only downside is that FPHSA sets <UPPERCASED_NAME>_FOUND
instead of <Name>_FOUND, and to keep things consistent
Cairo_LIBRARIES and Cairo_INCLUDE_DIRS have become CAIRO_LIBRARIES
and CAIRO_INCLUDE_DIRS.

.:

* Source/cmake/FindCairo.cmake:

Source/WebCore:

No new tests, build system change.

* PlatformEfl.cmake: Use CAIRO_FOO instead of Cairo_FOO.

Source/WebKit:

* PlatformEfl.cmake: Use CAIRO_FOO instead of Cairo_FOO.

Source/WebKit2:

* PlatformEfl.cmake: Use CAIRO_FOO instead of Cairo_FOO.

Tools:

* DumpRenderTree/efl/CMakeLists.txt: Use CAIRO_FOO instead of
Cairo_FOO.
* EWebLauncher/CMakeLists.txt: Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@116049 268f45cc-cd09-0410-ab3c-d52691b4dbfc
ChangeLog
Source/WebCore/ChangeLog
Source/WebCore/PlatformEfl.cmake
Source/WebKit/ChangeLog
Source/WebKit/PlatformEfl.cmake
Source/WebKit2/ChangeLog
Source/WebKit2/PlatformEfl.cmake
Source/cmake/FindCairo.cmake
Tools/ChangeLog
Tools/DumpRenderTree/efl/CMakeLists.txt
Tools/EWebLauncher/CMakeLists.txt