Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cairo] Fix linker errors on Linux and MacOS #6806

Merged
merged 1 commit into from
Jun 7, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions ports/cairo/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,6 @@ find_package(Freetype REQUIRED)
find_package(unofficial-glib CONFIG REQUIRED)
find_package(unofficial-fontconfig CONFIG REQUIRED)
find_package(unofficial-pixman CONFIG REQUIRED)
if(APPLE)
find_package(Threads REQUIRED)
vicroms marked this conversation as resolved.
Show resolved Hide resolved
endif()

# Cairo needs to be told which features of FreeType are availible
add_definitions(
Expand All @@ -193,7 +190,11 @@ endif()

add_library(cairo ${SOURCES})

target_link_libraries(cairo PRIVATE gdi32 msimg32 user32 ZLIB::ZLIB PNG::PNG Freetype::Freetype unofficial::pixman::pixman-1 unofficial::fontconfig::fontconfig)
target_link_libraries(cairo PRIVATE ZLIB::ZLIB PNG::PNG Freetype::Freetype unofficial::pixman::pixman-1 unofficial::fontconfig::fontconfig)

if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
target_link_libraries(cairo PRIVATE gdi32 msimg32 user32)
endif()

# GObject support module

Expand Down
2 changes: 1 addition & 1 deletion ports/cairo/CONTROL
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Source: cairo
Version: 1.16.0
Version: 1.16.0-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
2 changes: 2 additions & 0 deletions ports/cairo/cairo-features.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@
*/

/* Always for Win32 */
#ifdef _WIN32
#define CAIRO_HAS_WIN32_SURFACE 1
#define CAIRO_HAS_WIN32_FONT 1
#endif

/* Require libpng */
#define CAIRO_HAS_PNG_FUNCTIONS 1
Expand Down