Skip to content

Commit

Permalink
[io2d] Fix link to target "Cairo::Cairo" error (#8935)
Browse files Browse the repository at this point in the history
* [io2d] Fix link to target "Cairo::Cairo" error

* [io2d] Remove include(vcpkg_common_functions) in portfile.cmake
  • Loading branch information
LilyWangL authored and dan-shaw committed Dec 24, 2019
1 parent e7f28a2 commit 2f89f8d
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ports/io2d/CONTROL
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Source: io2d
Version: 2019-07-11-1
Version: 2019-07-11-2
Description: a lightweight, cross platform drawing library
Build-Depends: cairo (!osx), cairo[x11] (linux), graphicsmagick (!osx)
15 changes: 15 additions & 0 deletions ports/io2d/Fix-FindCairo.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff --git a/P0267_RefImpl/P0267_RefImpl/cairo/CMakeLists.txt b/P0267_RefImpl/P0267_RefImpl/cairo/CMakeLists.txt
index d0e9176..2ac638c 100644
--- a/P0267_RefImpl/P0267_RefImpl/cairo/CMakeLists.txt
+++ b/P0267_RefImpl/P0267_RefImpl/cairo/CMakeLists.txt
@@ -24,7 +24,9 @@ target_include_directories(io2d_cairo PUBLIC

target_compile_features(io2d_cairo PUBLIC cxx_std_17)

-target_link_libraries(io2d_cairo PUBLIC io2d_core Cairo::Cairo unofficial::graphicsmagick::graphicsmagick)
+find_package(unofficial-cairo CONFIG REQUIRED)
+
+target_link_libraries(io2d_cairo PUBLIC io2d_core unofficial::cairo::cairo unofficial::graphicsmagick::graphicsmagick)

install(
TARGETS io2d_cairo EXPORT io2d_targets
3 changes: 1 addition & 2 deletions ports/io2d/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
include(vcpkg_common_functions)

vcpkg_check_linkage(ONLY_STATIC_LIBRARY)

vcpkg_from_github(
Expand All @@ -10,6 +8,7 @@ vcpkg_from_github(
HEAD_REF master
PATCHES
fix-linux-build.patch
Fix-FindCairo.patch
)

if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL Darwin)
Expand Down

0 comments on commit 2f89f8d

Please sign in to comment.