diff options
| author | Brock Mammen <brockmammen@gmail.com> | 2019-06-06 20:07:55 -0500 |
|---|---|---|
| committer | Victor Romero <romerosanchezv@gmail.com> | 2019-06-06 18:07:54 -0700 |
| commit | da6d601d1c2161a455de0e572000633316962003 (patch) | |
| tree | 5c6328f7ed9749f9638bae48d4d41e390ee41a3b | |
| parent | 97d6a9be6bd5b1744d6883574433423e1d516f91 (diff) | |
| download | vcpkg-da6d601d1c2161a455de0e572000633316962003.tar.gz vcpkg-da6d601d1c2161a455de0e572000633316962003.zip | |
[cairo] Fix linker errors on Linux and MacOS (#6806)
On Linux and MacOS, the cairo port was attempting to link to some
Windows-only libraries.
| -rw-r--r-- | ports/cairo/CMakeLists.txt | 9 | ||||
| -rw-r--r-- | ports/cairo/CONTROL | 2 | ||||
| -rw-r--r-- | ports/cairo/cairo-features.h | 2 |
3 files changed, 8 insertions, 5 deletions
diff --git a/ports/cairo/CMakeLists.txt b/ports/cairo/CMakeLists.txt index a23d776ed..750a9850d 100644 --- a/ports/cairo/CMakeLists.txt +++ b/ports/cairo/CMakeLists.txt @@ -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) -endif() # Cairo needs to be told which features of FreeType are availible add_definitions( @@ -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 diff --git a/ports/cairo/CONTROL b/ports/cairo/CONTROL index fd3ce1187..3a82ccc97 100644 --- a/ports/cairo/CONTROL +++ b/ports/cairo/CONTROL @@ -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 diff --git a/ports/cairo/cairo-features.h b/ports/cairo/cairo-features.h index 3a1963974..e3eb31c13 100644 --- a/ports/cairo/cairo-features.h +++ b/ports/cairo/cairo-features.h @@ -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 |
