vcpkg/ports/mapnik/cairo-find-fix.patch

22 lines
631 B
Diff
Raw Normal View History

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 47bbaa1..43f384d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -296,9 +296,14 @@ if(USE_WEBP)
endif()
if(USE_CAIRO)
- mapnik_find_package(Cairo REQUIRED)
+ if(WIN32)
+ mapnik_find_package(Cairo REQUIRED)
+ list(APPEND MAPNIK_OPTIONAL_LIBS Cairo::Cairo)
+ else()
+ pkg_check_modules(Cairo REQUIRED IMPORTED_TARGET cairo)
+ list(APPEND MAPNIK_OPTIONAL_LIBS PkgConfig::Cairo)
+ endif()
list(APPEND MAPNIK_COMPILE_DEFS HAVE_CAIRO)
- list(APPEND MAPNIK_OPTIONAL_LIBS Cairo::Cairo)
endif()
if(USE_PROJ)