[cairo] fix export for macOS

This commit is contained in:
Angel Sánchez 2019-11-26 10:36:44 +01:00
parent 3aa5979471
commit 5fe8614bec
2 changed files with 12 additions and 5 deletions

View File

@ -208,10 +208,17 @@ set(CAIRO_GOBJECT_SOURCES
# GObject support sources do not include header with export macro
if(BUILD_SHARED_LIBS)
set_source_files_properties(
"../util/cairo-gobject/cairo-gobject-enums.c"
"../util/cairo-gobject/cairo-gobject-structs.c"
PROPERTIES COMPILE_DEFINITIONS "cairo_public=__declspec(dllexport)")
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
set_source_files_properties(
"../util/cairo-gobject/cairo-gobject-enums.c"
"../util/cairo-gobject/cairo-gobject-structs.c"
PROPERTIES COMPILE_DEFINITIONS "cairo_public=__declspec(dllexport)")
else()
set_source_files_properties(
"../util/cairo-gobject/cairo-gobject-enums.c"
"../util/cairo-gobject/cairo-gobject-structs.c"
PROPERTIES COMPILE_DEFINITIONS "cairo_public=__attribute__((visibility(\"default\")))")
endif()
endif()
add_library(cairo-gobject ${CAIRO_GOBJECT_SOURCES})

View File

@ -1,5 +1,5 @@
Source: cairo
Version: 1.16.0-2
Version: 1.16.0-3
Homepage: https://cairographics.org
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