[cairo] Hardcode value of CAIRO_WIN32_STATIC_BUILD into the cairo headers.

This commit is contained in:
Alexander Täschner 2017-06-08 08:02:15 +02:00
parent 1c11bec722
commit 796220ee17
2 changed files with 9 additions and 1 deletions

View File

@ -1,4 +1,4 @@
Source: cairo
Version: 1.15.4
Version: 1.15.4-1
Description: Cairo is a 2D graphics library with support for multiple output devices. Currently supported output targets include the X Window System (via both Xlib and XCB), Quartz, Win32, image buffers, PostScript, PDF, and SVG file output. Experimental backends include OpenGL, BeOS, OS/2, and DirectFB.
Build-Depends: zlib, libpng, pixman, glib, freetype, fontconfig

View File

@ -32,6 +32,14 @@ endif()
vcpkg_install_cmake()
file(READ "${SOURCE_PATH}/src/cairo.h" CAIRO_H)
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
string(REPLACE "defined (CAIRO_WIN32_STATIC_BUILD)" "1" CAIRO_H "${CAIRO_H}")
else()
string(REPLACE "defined (CAIRO_WIN32_STATIC_BUILD)" "0" CAIRO_H "${CAIRO_H}")
endif()
file(WRITE "${SOURCE_PATH}/src/cairo.h" "${CAIRO_H}")
# Copy the appropriate header files.
file(COPY
"${SOURCE_PATH}/src/cairo.h"