зеркало из https://github.com/microsoft/vcpkg.git
[graphviz,librsvg,libcroco] Refresh (#33964)
* [graphviz] Cleanup * Refresh patches * Versions * Disable #pragma comment lib * DLLs without exports * [librsvg] Modernize * Revise vendored librsvg build * [libcroco] Revise vendored build * [librsvg] Revise vendored build, cont. * [libcroco] Fix version * [librsvg] Fix pc file * [librsvg] Fix config polyfill * Mingw fixes, no abs paths * No abs paths
This commit is contained in:
Родитель
fefbf7c5aa
Коммит
7ceccee7f8
|
@ -3,3 +3,8 @@ if(MSVC)
|
|||
set(GETOPT_LIBRARY "unofficial::getopt-win32::getopt" CACHE INTERNAL "vcpkg")
|
||||
set(GETOPT_RUNTIME_LIBRARY "unused" CACHE INTERNAL "vcpkg")
|
||||
endif()
|
||||
|
||||
if(MINGW AND BUILD_SHARED_LIBS AND NOT CMAKE_CROSSCOMPILING)
|
||||
# Prevent running `configure_plugins.cmake`.
|
||||
set(CMAKE_CROSSCOMPILING 1)
|
||||
endif()
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
diff --git a/cmd/gvedit/mainwindow.cpp b/cmd/gvedit/mainwindow.cpp
|
||||
--- a/cmd/gvedit/mainwindow.cpp
|
||||
+++ b/cmd/gvedit/mainwindow.cpp
|
||||
@@ -595,7 +595,7 @@ void CMainWindow::readSettings()
|
||||
// first try new settings
|
||||
{
|
||||
QSettings settings("Graphviz", "gvedit");
|
||||
- if (settings.contains("pos") and settings.contains("size")) {
|
||||
+ if (settings.contains("pos") && settings.contains("size")) {
|
||||
QPoint pos = settings.value("pos", QPoint(200, 200)).toPoint();
|
||||
QSize size = settings.value("size", QSize(400, 400)).toSize();
|
||||
move(pos);
|
|
@ -0,0 +1,36 @@
|
|||
diff --git a/cmd/gvedit/main.cpp b/cmd/gvedit/main.cpp
|
||||
index 98a2a4a..e810c36 100644
|
||||
--- a/cmd/gvedit/main.cpp
|
||||
+++ b/cmd/gvedit/main.cpp
|
||||
@@ -30,6 +30,7 @@
|
||||
|
||||
|
||||
#ifdef _MSC_VER
|
||||
+#elif 0
|
||||
#pragma comment( lib, "cgraph.lib" )
|
||||
#pragma comment( lib, "gvc.lib" )
|
||||
#pragma comment( lib, "ingraphs.lib" )
|
||||
diff --git a/plugin/gdk/gvloadimage_gdk.c b/plugin/gdk/gvloadimage_gdk.c
|
||||
index 84c6a6a..0d3ec64 100644
|
||||
--- a/plugin/gdk/gvloadimage_gdk.c
|
||||
+++ b/plugin/gdk/gvloadimage_gdk.c
|
||||
@@ -22,6 +22,7 @@
|
||||
#include <gdk/gdkcairo.h>
|
||||
|
||||
#ifdef _MSC_VER //*dependencies
|
||||
+#elif 0
|
||||
#pragma comment( lib, "gvc.lib" )
|
||||
#pragma comment( lib, "glib-2.0.lib" )
|
||||
#pragma comment( lib, "cairo.lib" )
|
||||
diff --git a/plugin/webp/gvloadimage_webp.c b/plugin/webp/gvloadimage_webp.c
|
||||
index c983556..446d43f 100644
|
||||
--- a/plugin/webp/gvloadimage_webp.c
|
||||
+++ b/plugin/webp/gvloadimage_webp.c
|
||||
@@ -24,6 +24,7 @@
|
||||
#include <webp/decode.h>
|
||||
|
||||
#ifdef _MSC_VER //*dependencies
|
||||
+#elif 0
|
||||
#pragma comment( lib, "gvc.lib" )
|
||||
#pragma comment( lib, "glib-2.0.lib" )
|
||||
#pragma comment( lib, "pango-1.0.lib" )
|
|
@ -1,16 +1,52 @@
|
|||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 12fd424..11371df 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -126,9 +126,13 @@ endif()
|
||||
find_package(PANGOCAIRO)
|
||||
find_package(PkgConfig)
|
||||
if(PkgConfig_FOUND)
|
||||
- pkg_check_modules(POPPLER poppler-glib)
|
||||
- pkg_check_modules(RSVG librsvg-2.0)
|
||||
- pkg_check_modules(WEBP libwebp)
|
||||
+ #pkg_check_modules(POPPLER poppler-glib IMPORTED_TARGET REQUIRED)
|
||||
+ set(POPPLER_LIBRARIES PkgConfig::POPPLER)
|
||||
+ set(POPPLER_FOUND 0)
|
||||
+ pkg_check_modules(RSVG librsvg-2.0 IMPORTED_TARGET REQUIRED)
|
||||
+ set(RSVG_LIBRARIES PkgConfig::RSVG)
|
||||
+ pkg_check_modules(WEBP libwebp IMPORTED_TARGET REQUIRED)
|
||||
+ set(WEBP_LIBRARIES PkgConfig::WEBP)
|
||||
else()
|
||||
set(POPPLER_FOUND 0)
|
||||
set(RSVG_FOUND 0)
|
||||
diff --git a/cmake/FindCAIRO.cmake b/cmake/FindCAIRO.cmake
|
||||
index 65bb42f..47949f6 100644
|
||||
--- a/cmake/FindCAIRO.cmake
|
||||
+++ b/cmake/FindCAIRO.cmake
|
||||
@@ -1,4 +1,4 @@
|
||||
@@ -1,6 +1,6 @@
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
-if(WIN32)
|
||||
+if(0)
|
||||
find_path(
|
||||
CAIRO_INCLUDE_DIR cairo.h
|
||||
PATH_SUFFIXES cairo
|
||||
@@ -39,7 +39,9 @@ if(WIN32)
|
||||
)
|
||||
else()
|
||||
find_package(PkgConfig)
|
||||
- pkg_check_modules(CAIRO cairo)
|
||||
+ pkg_check_modules(CAIRO cairo IMPORTED_TARGET)
|
||||
+ set(CAIRO_LIBRARIES PkgConfig::CAIRO)
|
||||
+ set(CAIRO_LINK_LIBRARIES PkgConfig::CAIRO)
|
||||
|
||||
find_package_handle_standard_args(CAIRO DEFAULT_MSG
|
||||
CAIRO_INCLUDE_DIRS
|
||||
diff --git a/cmake/FindGD.cmake b/cmake/FindGD.cmake
|
||||
index 0deb5e6..ef42889 100644
|
||||
--- a/cmake/FindGD.cmake
|
||||
+++ b/cmake/FindGD.cmake
|
||||
@@ -1,3 +1,10 @@
|
||||
@@ -1,3 +1,11 @@
|
||||
+find_package(PkgConfig)
|
||||
+pkg_check_modules(GD gdlib IMPORTED_TARGET)
|
||||
+set(GD_LIBRARIES PkgConfig::GD)
|
||||
|
@ -18,24 +54,45 @@ diff --git a/cmake/FindGD.cmake b/cmake/FindGD.cmake
|
|||
+ set(HAVE_GD_${item} 1)
|
||||
+endforeach()
|
||||
+return()
|
||||
+
|
||||
find_path(GD_INCLUDE_DIR gd.h)
|
||||
find_library(GD_LIBRARY NAMES gd libgd)
|
||||
find_program(GD_RUNTIME_LIBRARY libgd.dll)
|
||||
diff --git a/cmake/FindGTS.cmake b/cmake/FindGTS.cmake
|
||||
index 8e544e9..88dd849 100644
|
||||
--- a/cmake/FindGTS.cmake
|
||||
+++ b/cmake/FindGTS.cmake
|
||||
@@ -1,5 +1,5 @@
|
||||
include(FindPackageHandleStandardArgs)
|
||||
-if(WIN32)
|
||||
+if(0)
|
||||
find_path(GTS_INCLUDE_DIR gts.h)
|
||||
find_path(GLIB_INCLUDE_DIR glib.h PATH_SUFFIXES glib-2.0)
|
||||
find_path(GLIBCONFIG_INCLUDE_DIR glibconfig.h
|
||||
@@ -40,7 +40,8 @@ if(WIN32)
|
||||
)
|
||||
else()
|
||||
find_package(PkgConfig)
|
||||
- pkg_check_modules(GTS gts)
|
||||
+ pkg_check_modules(GTS gts IMPORTED_TARGET)
|
||||
+ set(GTS_LINK_LIBRARIES PkgConfig::GTS)
|
||||
|
||||
find_package_handle_standard_args(GTS DEFAULT_MSG
|
||||
GTS_INCLUDE_DIRS
|
||||
diff --git a/cmake/FindLTDL.cmake b/cmake/FindLTDL.cmake
|
||||
index e955b74..046e9e8 100644
|
||||
--- a/cmake/FindLTDL.cmake
|
||||
+++ b/cmake/FindLTDL.cmake
|
||||
@@ -15,6 +15,9 @@ endif()
|
||||
mark_as_advanced(LTDL_INCLUDE_DIR LTDL_LIBRARY)
|
||||
|
||||
@@ -17,4 +17,7 @@ mark_as_advanced(LTDL_INCLUDE_DIR LTDL_LIBRARY)
|
||||
set(LTDL_INCLUDE_DIRS ${LTDL_INCLUDE_DIR})
|
||||
-if(NOT WIN32 OR MINGW)
|
||||
+if(1)
|
||||
if(NOT WIN32 OR MINGW)
|
||||
set(LTDL_LIBRARIES ${LTDL_LIBRARY})
|
||||
+ if(CMAKE_DL_LIBS AND NOT BUILD_SHARED_LIBS)
|
||||
+ set(LTDL_LIBRARIES "${LTDL_LIBRARIES};${CMAKE_DL_LIBS}")
|
||||
+ endif()
|
||||
endif()
|
||||
+if(CMAKE_DL_LIBS AND NOT BUILD_SHARED_LIBS)
|
||||
+ set(LTDL_LIBRARIES "${LTDL_LIBRARIES};${CMAKE_DL_LIBS}")
|
||||
+endif()
|
||||
diff --git a/cmake/FindPANGOCAIRO.cmake b/cmake/FindPANGOCAIRO.cmake
|
||||
index b92e5be..01c4cc7 100644
|
||||
--- a/cmake/FindPANGOCAIRO.cmake
|
||||
+++ b/cmake/FindPANGOCAIRO.cmake
|
||||
@@ -1,6 +1,6 @@
|
||||
|
@ -46,49 +103,52 @@ diff --git a/cmake/FindPANGOCAIRO.cmake b/cmake/FindPANGOCAIRO.cmake
|
|||
find_path(PANGOCAIRO_INCLUDE_DIR pango/pangocairo.h PATH_SUFFIXES pango-1.0)
|
||||
find_path(GLIB_INCLUDE_DIR glib.h PATH_SUFFIXES glib-2.0)
|
||||
find_path(GLIBCONFIG_INCLUDE_DIR glibconfig.h
|
||||
@@ -78,7 +78,8 @@ if(WIN32)
|
||||
@@ -78,7 +78,9 @@ if(WIN32)
|
||||
)
|
||||
else()
|
||||
find_package(PkgConfig)
|
||||
- pkg_check_modules(PANGOCAIRO pangocairo)
|
||||
+ pkg_check_modules(PANGOCAIRO pangocairo IMPORTED_TARGET)
|
||||
+ set(PANGOCAIRO_LIBRARIES PkgConfig::PANGOCAIRO)
|
||||
+ set(PANGOCAIRO_LINK_LIBRARIES PkgConfig::PANGOCAIRO) # https://gitlab.kitware.com/cmake/cmake/-/issues/16154
|
||||
|
||||
find_package_handle_standard_args(PANGOCAIRO DEFAULT_MSG
|
||||
PANGOCAIRO_INCLUDE_DIRS
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -114,7 +114,6 @@ endif()
|
||||
|
||||
find_package(GD)
|
||||
find_package(GS)
|
||||
-find_package(GTS)
|
||||
|
||||
if(enable_ltdl)
|
||||
find_package(LTDL)
|
||||
@@ -126,9 +125,10 @@ endif()
|
||||
find_package(PANGOCAIRO)
|
||||
find_package(PkgConfig)
|
||||
if(PkgConfig_FOUND)
|
||||
+ pkg_check_modules(GTS gts REQUIRED)
|
||||
pkg_check_modules(POPPLER poppler-glib)
|
||||
- pkg_check_modules(RSVG librsvg-2.0)
|
||||
- pkg_check_modules(WEBP libwebp)
|
||||
+ pkg_check_modules(librsvg REQUIRED IMPORTED_TARGET librsvg)
|
||||
+ # pkg_check_modules(WEBP libwebp)
|
||||
else()
|
||||
set(POPPLER_FOUND 0)
|
||||
set(RSVG_FOUND 0)
|
||||
diff --git a/cmd/dot/CMakeLists.txt b/cmd/dot/CMakeLists.txt
|
||||
index d2ea435..3b068b0 100644
|
||||
--- a/cmd/dot/CMakeLists.txt
|
||||
+++ b/cmd/dot/CMakeLists.txt
|
||||
@@ -88,7 +88,7 @@ endif()
|
||||
@@ -73,22 +73,20 @@ endif()
|
||||
|
||||
find_package(PkgConfig)
|
||||
if(PkgConfig_FOUND)
|
||||
- pkg_check_modules(GTS gts)
|
||||
if(GTS_FOUND)
|
||||
target_include_directories(dot_builtins SYSTEM PRIVATE ${GTS_INCLUDE_DIRS})
|
||||
target_link_libraries(dot_builtins PRIVATE ${GTS_LINK_LIBRARIES})
|
||||
endif()
|
||||
|
||||
pkg_check_modules(LASI lasi)
|
||||
- if(LASI_FOUND)
|
||||
+ if(TARGET gvplugin_lasi)
|
||||
target_link_libraries(dot_builtins PRIVATE gvplugin_lasi)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(PANGOCAIRO_FOUND)
|
||||
target_link_libraries(dot_builtins PRIVATE gvplugin_pango)
|
||||
if(PkgConfig_FOUND)
|
||||
- if(PkgConfig_FOUND)
|
||||
- pkg_check_modules(WEBP libwebp)
|
||||
+ # pkg_check_modules(WEBP libwebp)
|
||||
+ if(TARGET gvplugin_webp)
|
||||
if(WEBP_FOUND)
|
||||
target_link_libraries(dot_builtins PRIVATE gvplugin_webp)
|
||||
endif()
|
||||
@@ -96,7 +94,7 @@ if(PANGOCAIRO_FOUND)
|
||||
endif()
|
||||
|
||||
find_library(SOCKET socket)
|
||||
-if(SOCKET)
|
||||
+if(0)
|
||||
target_link_libraries(dot_builtins PRIVATE ${SOCKET})
|
||||
endif()
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
set(VCPKG_POLICY_DLLS_IN_STATIC_LIBRARY enabled) # for plugins
|
||||
set(VCPKG_POLICY_DLLS_WITHOUT_EXPORTS enabled) # kitty and vt plugin not ready yet?
|
||||
|
||||
vcpkg_from_gitlab(
|
||||
GITLAB_URL https://gitlab.com
|
||||
|
@ -8,11 +9,11 @@ vcpkg_from_gitlab(
|
|||
SHA512 1edcf6aa232d38d1861a344c1a4a88aac51fd4656d667783ca1608ac694025199595a72a293c4eee2f7c7326ce54f22b787a5b7f4c44946f2de6096bd8f0e79d
|
||||
HEAD_REF main
|
||||
PATCHES
|
||||
disable-pragma-lib.patch
|
||||
fix-dependencies.patch
|
||||
no-absolute-paths.patch
|
||||
select-plugins.patch
|
||||
static-linkage.patch
|
||||
cpp-error.patch
|
||||
)
|
||||
|
||||
if(VCPKG_TARGET_IS_OSX)
|
||||
|
@ -46,7 +47,6 @@ vcpkg_find_acquire_program(PYTHON3)
|
|||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
DISABLE_PARALLEL_CONFIGURE
|
||||
OPTIONS
|
||||
"-DVERSION=${VERSION}"
|
||||
"-DBISON_EXECUTABLE=${BISON}"
|
||||
|
@ -57,6 +57,7 @@ vcpkg_cmake_configure(
|
|||
"-DCMAKE_PROJECT_INCLUDE=${CMAKE_CURRENT_LIST_DIR}/cmake-project-include.cmake"
|
||||
-Dinstall_win_dependency_dlls=OFF
|
||||
-Duse_win_pre_inst_libs=OFF
|
||||
-Dwith_gvedit=OFF
|
||||
-Dwith_smyrna=OFF
|
||||
-DCMAKE_DISABLE_FIND_PACKAGE_ANN=ON
|
||||
-DCMAKE_REQUIRE_FIND_PACKAGE_CAIRO=ON
|
||||
|
@ -64,7 +65,6 @@ vcpkg_cmake_configure(
|
|||
-DCMAKE_REQUIRE_FIND_PACKAGE_GD=ON
|
||||
-DCMAKE_REQUIRE_FIND_PACKAGE_LTDL=ON
|
||||
-DCMAKE_REQUIRE_FIND_PACKAGE_PANGOCAIRO=ON
|
||||
-Dwith_gvedit=OFF
|
||||
${OPTIONS}
|
||||
MAYBE_UNUSED_VARIABLES
|
||||
install_win_dependency_dlls
|
||||
|
@ -91,36 +91,36 @@ vcpkg_copy_tools(
|
|||
bcomps
|
||||
ccomps
|
||||
circo
|
||||
cluster
|
||||
diffimg
|
||||
dijkstra
|
||||
dot
|
||||
dot_builtins
|
||||
edgepaint
|
||||
fdp
|
||||
gc
|
||||
gml2gv
|
||||
graphml2gv
|
||||
gv2gml
|
||||
gv2gxl
|
||||
gvcolor
|
||||
gvgen
|
||||
gvmap
|
||||
gvpack
|
||||
gvpr
|
||||
gxl2dot
|
||||
gxl2gv
|
||||
mm2gv
|
||||
neato
|
||||
nop
|
||||
osage
|
||||
patchwork
|
||||
prune
|
||||
sccmap
|
||||
sfdp
|
||||
tred
|
||||
twopi
|
||||
unflatten
|
||||
cluster
|
||||
dot_builtins
|
||||
gv2gxl
|
||||
gxl2dot
|
||||
prune
|
||||
AUTO_CLEAN
|
||||
)
|
||||
|
||||
|
|
|
@ -1,16 +1,21 @@
|
|||
diff --git a/plugin/CMakeLists.txt b/plugin/CMakeLists.txt
|
||||
index 6f40f27..420ad0f 100644
|
||||
index 3956102..d14bf9c 100644
|
||||
--- a/plugin/CMakeLists.txt
|
||||
+++ b/plugin/CMakeLists.txt
|
||||
@@ -1,4 +1,11 @@
|
||||
@@ -1,16 +1,10 @@
|
||||
add_subdirectory(core)
|
||||
+add_subdirectory(dot_layout)
|
||||
+add_subdirectory(gdiplus)
|
||||
+add_subdirectory(neato_layout)
|
||||
+add_subdirectory(pango)
|
||||
+add_subdirectory(quartz)
|
||||
+add_subdirectory(gd)
|
||||
+return()
|
||||
add_subdirectory(devil)
|
||||
-add_subdirectory(devil)
|
||||
add_subdirectory(dot_layout)
|
||||
add_subdirectory(gd)
|
||||
add_subdirectory(gdiplus)
|
||||
-add_subdirectory(gdk)
|
||||
-add_subdirectory(gs)
|
||||
-add_subdirectory(gtk)
|
||||
add_subdirectory(kitty)
|
||||
-add_subdirectory(lasi)
|
||||
add_subdirectory(neato_layout)
|
||||
add_subdirectory(pango)
|
||||
-add_subdirectory(poppler)
|
||||
add_subdirectory(quartz)
|
||||
add_subdirectory(rsvg)
|
||||
add_subdirectory(vt)
|
||||
|
|
|
@ -1,8 +1,52 @@
|
|||
diff --git a/cmd/dot/CMakeLists.txt b/cmd/dot/CMakeLists.txt
|
||||
index 3b068b0..4e3758f 100644
|
||||
--- a/cmd/dot/CMakeLists.txt
|
||||
+++ b/cmd/dot/CMakeLists.txt
|
||||
@@ -58,6 +58,7 @@ target_link_libraries(dot_builtins PRIVATE
|
||||
gvplugin_core
|
||||
gvplugin_dot_layout
|
||||
gvplugin_neato_layout
|
||||
+ ${GTS_LINK_LIBRARIES}
|
||||
pathplan
|
||||
xdot
|
||||
)
|
||||
diff --git a/cmd/gvmap/CMakeLists.txt b/cmd/gvmap/CMakeLists.txt
|
||||
index d5b0d42..9263b19 100644
|
||||
--- a/cmd/gvmap/CMakeLists.txt
|
||||
+++ b/cmd/gvmap/CMakeLists.txt
|
||||
@@ -26,6 +26,7 @@ if(with_sfdp)
|
||||
gvc
|
||||
ingraphs
|
||||
neatogen
|
||||
+ ${GTS_LINK_LIBRARIES}
|
||||
rbtree
|
||||
sfdpgen
|
||||
sparse
|
||||
@@ -92,6 +93,7 @@ if(with_sfdp)
|
||||
gvc
|
||||
ingraphs
|
||||
neatogen
|
||||
+ ${GTS_LINK_LIBRARIES}
|
||||
rbtree
|
||||
sfdpgen
|
||||
sparse
|
||||
diff --git a/cmd/tools/CMakeLists.txt b/cmd/tools/CMakeLists.txt
|
||||
index 6928bf6..5a4c308 100644
|
||||
--- a/cmd/tools/CMakeLists.txt
|
||||
+++ b/cmd/tools/CMakeLists.txt
|
||||
@@ -320,6 +320,7 @@ target_link_libraries(gvpack
|
||||
cgraph
|
||||
gvc
|
||||
gvplugin_neato_layout
|
||||
+ ${GTS_LINK_LIBRARIES}
|
||||
ingraphs
|
||||
)
|
||||
|
||||
diff --git a/plugin/gd/gvrender_gd.c b/plugin/gd/gvrender_gd.c
|
||||
index 960271c..2494e95 100644
|
||||
index 0085107..8879003 100644
|
||||
--- a/plugin/gd/gvrender_gd.c
|
||||
+++ b/plugin/gd/gvrender_gd.c
|
||||
@@ -259,7 +259,7 @@ static void gdgen_missingfont(char *fontreq) {
|
||||
@@ -240,7 +240,7 @@ static void gdgen_end_page(GVJ_t * job)
|
||||
#else
|
||||
#define GD_IMPORT
|
||||
#endif
|
||||
|
@ -12,7 +56,7 @@ index 960271c..2494e95 100644
|
|||
void gdgen_text(gdImagePtr im, pointf spf, pointf epf, int fontcolor, double fontsize, int fontdpi, double fontangle, char *fontname, char *str)
|
||||
{
|
||||
diff --git a/plugin/pango/CMakeLists.txt b/plugin/pango/CMakeLists.txt
|
||||
index 26749af..65d77e4 100644
|
||||
index aca7eec..901f118 100644
|
||||
--- a/plugin/pango/CMakeLists.txt
|
||||
+++ b/plugin/pango/CMakeLists.txt
|
||||
@@ -58,6 +58,7 @@ if(CAIRO_FOUND AND PANGOCAIRO_FOUND)
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"name": "graphviz",
|
||||
"version-semver": "9.0.0",
|
||||
"port-version": 1,
|
||||
"description": "Graph Visualization Tools",
|
||||
"homepage": "https://graphviz.org/",
|
||||
"license": "EPL-1.0",
|
||||
|
@ -24,6 +25,7 @@
|
|||
]
|
||||
},
|
||||
"librsvg",
|
||||
"libwebp",
|
||||
"pango",
|
||||
{
|
||||
"name": "pkgconf",
|
||||
|
|
|
@ -1,15 +1,9 @@
|
|||
cmake_minimum_required(VERSION 3.11)
|
||||
project(libcroco C)
|
||||
|
||||
find_package(Iconv REQUIRED)
|
||||
find_package(Intl REQUIRED)
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(GLIB2 glib-2.0 gobject-2.0 gmodule-2.0 gio-2.0 IMPORTED_TARGET)
|
||||
find_package(LibXml2 REQUIRED)
|
||||
if(NOT WIN32)
|
||||
find_package(Threads REQUIRED)
|
||||
endif()
|
||||
find_path(GLIB_INCLUDE_DIR glib.h)
|
||||
set(libcroco_pc_requires glib-2.0 libxml-2.0)
|
||||
pkg_check_modules(LIBCROCO_LINK_PUBLIC ${libcroco_pc_requires} IMPORTED_TARGET REQUIRED)
|
||||
|
||||
file(GLOB SOURCES
|
||||
src/cr-utils.c
|
||||
|
@ -67,18 +61,10 @@ file(GLOB SOURCES
|
|||
src/libcroco.def
|
||||
)
|
||||
|
||||
set(CMAKE_DEBUG_POSTFIX "d")
|
||||
|
||||
add_library(croco-0.6 ${SOURCES})
|
||||
|
||||
target_include_directories(croco-0.6 PRIVATE ${GLIB_INCLUDE_DIRS} ${LIBXML2_INCLUDE_DIR})
|
||||
target_link_libraries(croco-0.6 PRIVATE
|
||||
PkgConfig::GLIB2
|
||||
${LIBXML2_LIBRARIES} ${Intl_LIBRARIES} Iconv::Iconv
|
||||
)
|
||||
target_link_libraries(croco-0.6 PRIVATE PkgConfig::LIBCROCO_LINK_PUBLIC)
|
||||
|
||||
install(TARGETS croco-0.6
|
||||
EXPORT libcroco-targets
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib
|
||||
|
@ -113,26 +99,20 @@ install(FILES
|
|||
src/cr-parsing-location.h
|
||||
src/cr-string.h
|
||||
src/libcroco-config.h
|
||||
DESTINATION include/libcroco
|
||||
DESTINATION include/libcroco-0.6/libcroco
|
||||
)
|
||||
|
||||
install(
|
||||
EXPORT libcroco-targets
|
||||
NAMESPACE unofficial::libcroco::
|
||||
FILE unofficial-libcroco-targets.cmake
|
||||
DESTINATION share/unofficial-libcroco
|
||||
)
|
||||
string(REGEX MATCH "^([0-9]*)[.]([0-9]*)[.].*" unused "${VERSION}" )
|
||||
set(LIBCROCO_MAJOR_VERSION "${CMAKE_MATCH_1}")
|
||||
set(LIBCROCO_MINOR_VERSION "${CMAKE_MATCH_2}")
|
||||
|
||||
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/unofficial-libcroco-config.cmake "
|
||||
include(CMakeFindDependencyMacro)
|
||||
find_dependency(Intl)
|
||||
find_dependency(Iconv)
|
||||
find_dependency(PkgConfig)
|
||||
pkg_check_modules(GLIB2 glib-2.0 gobject-2.0 gmodule-2.0 gio-2.0 IMPORTED_TARGET)
|
||||
find_dependency(LibXml2)
|
||||
if(NOT WIN32)
|
||||
find_dependency(Threads)
|
||||
endif()
|
||||
include(\${CMAKE_CURRENT_LIST_DIR}/unofficial-libcroco-targets.cmake)
|
||||
")
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/unofficial-libcroco-config.cmake DESTINATION share/unofficial-libcroco)
|
||||
set(prefix "${CMAKE_INSTALL_PREFIX}")
|
||||
set(exec_prefix "\${prefix}")
|
||||
set(libdir "\${prefix}/lib")
|
||||
set(includedir "\${prefix}/include")
|
||||
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/libcroco.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/libcroco.pc" @ONLY)
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/libcroco.pc"
|
||||
DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig"
|
||||
RENAME "libcroco-${LIBCROCO_MAJOR_VERSION}.${LIBCROCO_MINOR_VERSION}.pc"
|
||||
)
|
||||
|
|
|
@ -19,15 +19,15 @@ vcpkg_find_acquire_program(PKGCONFIG)
|
|||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
"-DPKG_CONFIG_EXECUTABLE=${PKGCONFIG}"
|
||||
"-DVERSION=${VERSION}"
|
||||
"-DPKG_CONFIG_EXECUTABLE=${PKGCONFIG}"
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
vcpkg_copy_pdbs()
|
||||
vcpkg_fixup_pkgconfig()
|
||||
|
||||
vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-libcroco)
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
|
||||
# Handle copyright
|
||||
file(COPY "${CURRENT_PORT_DIR}/unofficial-libcroco-config.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/unofficial-libcroco")
|
||||
file(COPY "${CURRENT_PORT_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
||||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
file(READ "${CMAKE_CURRENT_LIST_DIR}/../libcroco/usage" usage)
|
||||
message(WARNING "find_package(unofficial-libcroco) is deprecated.\n${usage}")
|
||||
|
||||
include(CMakeFindDependencyMacro)
|
||||
find_dependency(PkgConfig)
|
||||
pkg_check_modules(VCPKG_LIBCROCO libcroco-0.6 IMPORTED_TARGET)
|
||||
if(NOT VCPKG_LIBCROCO_FOUND)
|
||||
set(${CMAKE_FIND_PACKAGE_NAME}_FOUND 0)
|
||||
elseif(NOT TARGET unofficial::libcroco::croco-0.6)
|
||||
add_library(unofficial::libcroco::croco-0.6 INTERFACE IMPORTED)
|
||||
set_target_properties(unofficial::libcroco::croco-0.6 PROPERTIES
|
||||
INTERFACE_LINK_LIBRARIES PkgConfig::VCPKG_LIBCROCO
|
||||
)
|
||||
endif()
|
|
@ -0,0 +1,5 @@
|
|||
libcroco can be imported via CMake FindPkgConfig module:
|
||||
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(LIBCROCO libcroco-0.6 IMPORTED_TARGET REQUIRED)
|
||||
target_link_libraries(main PRIVATE PkgConfig::LIBCROCO)
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "libcroco",
|
||||
"version": "0.6.13",
|
||||
"port-version": 5,
|
||||
"port-version": 6,
|
||||
"description": "A standalone css2 parsing and manipulation library",
|
||||
"license": "LGPL-2.0-only",
|
||||
"dependencies": [
|
||||
|
@ -10,10 +10,6 @@
|
|||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -4,29 +4,35 @@ project(librsvg C)
|
|||
set(RSVG_API_MAJOR_VERSION 2)
|
||||
set(RSVG_API_VERSION "2.0")
|
||||
Set(VERSION "2.40.20")
|
||||
set(targets "rsvg-${RSVG_API_MAJOR_VERSION}")
|
||||
set(LIBRSVG_TARGET "rsvg-${RSVG_API_MAJOR_VERSION}")
|
||||
|
||||
Set(prefix "${CMAKE_INSTALL_PREFIX}")
|
||||
Set(exec_prefix "\${prefix}")
|
||||
Set(libdir "\${prefix}/lib")
|
||||
Set(includedir "\${prefix}/include")
|
||||
|
||||
find_package(unofficial-libcroco CONFIG REQUIRED)
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(GLIB2 glib-2.0 gobject-2.0 gmodule-2 gio-2 IMPORTED_TARGET)
|
||||
pkg_check_modules(CAIRO cairo IMPORTED_TARGET)
|
||||
pkg_check_modules(GDK_PIXBUF gdk-pixbuf-2.0 IMPORTED_TARGET)
|
||||
pkg_check_modules(PANGO pango pangocairo IMPORTED_TARGET)
|
||||
find_package(LibXml2 REQUIRED)
|
||||
if(CMAKE_SYSTEM_NAME MATCHES "Windows")
|
||||
elseif(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
else()
|
||||
pkg_check_modules(PANGO2 pangoft2 pangofc IMPORTED_TARGET)
|
||||
set(PANGO_FT2_LIB PkgConfig::PANGO2)
|
||||
# Public required modules (cf. headers and librsvg.pc)
|
||||
set(librsvg_pc_requires glib-2.0 gio-2.0 gdk-pixbuf-2.0 cairo)
|
||||
# Other required modules from configure.ac
|
||||
set(librsvg_pc_requires_private
|
||||
libxml-2.0
|
||||
pangocairo
|
||||
pangoft2
|
||||
cairo-png
|
||||
libcroco-0.6
|
||||
gthread-2.0
|
||||
gmodule-2.0
|
||||
gobject-2.0
|
||||
gio-unix-2.0
|
||||
fontconfig
|
||||
)
|
||||
if(WIN32)
|
||||
string(REPLACE "gio-unix" "gio-windows" librsvg_pc_requires_private "${librsvg_pc_requires_private}")
|
||||
endif()
|
||||
|
||||
# Add include directories
|
||||
include_directories(${CAIRO_INCLUDE_DIRS} ${GDK_PIXBUF_INCLUDE_DIRS} ${GLIB2_INCLUDE_DIRS} ${PANGO_INCLUDE_DIRS} ${PANGO2_INCLUDE_DIRS})
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(LIBRSVG_LINK_PUBLIC ${librsvg_pc_requires} IMPORTED_TARGET REQUIRED)
|
||||
pkg_check_modules(LIBRSVG_LINK_PRIVATE ${librsvg_pc_requires_private} IMPORTED_TARGET REQUIRED)
|
||||
|
||||
set(LIBRSVG_SOURCES
|
||||
librsvg-features.c
|
||||
|
@ -81,82 +87,87 @@ set(LIBRSVG_SOURCES
|
|||
librsvg-enum-types.h
|
||||
)
|
||||
|
||||
set(PIXBUFLOADERSVG_SOURCES
|
||||
gdk-pixbuf-loader/io-svg.c
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.win32 ${CMAKE_CURRENT_SOURCE_DIR}/config.h COPYONLY)
|
||||
add_custom_command(OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/rsvg.def
|
||||
COMMAND echo "EXPORTS" > ${CMAKE_CURRENT_SOURCE_DIR}/rsvg.def
|
||||
COMMAND ${CMAKE_C_COMPILER} /EP ${CMAKE_CURRENT_SOURCE_DIR}/rsvg.symbols >> ${CMAKE_CURRENT_SOURCE_DIR}/rsvg.def)
|
||||
list(APPEND LIBRSVG_SOURCES rsvg.def)
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/config.h.win32" "${CMAKE_CURRENT_BINARY_DIR}/config.h" COPYONLY)
|
||||
file(READ "${CMAKE_CURRENT_SOURCE_DIR}/rsvg.symbols" rsvg_symbols)
|
||||
string(REGEX REPLACE "/[*][^*]*[*]/" "" rsvg_symbols "${rsvg_symbols}")
|
||||
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/rsvg.def" "EXPORTS\n${rsvg_symbols}")
|
||||
list(APPEND LIBRSVG_SOURCES "${CMAKE_CURRENT_BINARY_DIR}/rsvg.def")
|
||||
else()
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.linux ${CMAKE_CURRENT_SOURCE_DIR}/config.h COPYONLY)
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/config.h.linux" "${CMAKE_CURRENT_BINARY_DIR}/config.h" COPYONLY)
|
||||
list(APPEND LIBRSVG_SOURCES rsvg.symbols)
|
||||
endif()
|
||||
|
||||
add_library(${targets} ${LIBRSVG_SOURCES})
|
||||
add_library(pixbufloader-svg ${PIXBUFLOADERSVG_SOURCES})
|
||||
|
||||
target_compile_definitions(${targets} PRIVATE -DRSVG_COMPILATION -D_CRT_SECURE_NO_WARNINGS -DSRCDIR="${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
|
||||
target_include_directories(pixbufloader-svg PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
target_compile_definitions(pixbufloader-svg PRIVATE
|
||||
-DRSVG_COMPILATION
|
||||
add_library(${LIBRSVG_TARGET} ${LIBRSVG_SOURCES})
|
||||
target_compile_definitions(${LIBRSVG_TARGET} PRIVATE
|
||||
-DRSVG_COMPILATION
|
||||
-D_CRT_SECURE_NO_WARNINGS
|
||||
-DSRCDIR="${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
-DGDK_PIXBUF_ENABLE_BACKEND
|
||||
-DG_LOG_DOMAIN="libpixbufloader-svg")
|
||||
|
||||
target_link_libraries(${targets} PRIVATE
|
||||
PkgConfig::GLIB2
|
||||
${LIBXML2_LIBRARIES}
|
||||
PkgConfig::PANGO
|
||||
PkgConfig::GDK_PIXBUF
|
||||
${PANGO_FT2_LIB}
|
||||
unofficial::libcroco::croco-0.6
|
||||
-DSRCDIR=""
|
||||
$<$<BOOL:${MINGW}>:HAVE_STRTOK_R>
|
||||
)
|
||||
target_link_libraries(pixbufloader-svg PRIVATE
|
||||
${targets}
|
||||
PkgConfig::GLIB2
|
||||
PkgConfig::GDK_PIXBUF
|
||||
target_include_directories(${LIBRSVG_TARGET}
|
||||
PRIVATE
|
||||
"${CMAKE_CURRENT_BINARY_DIR}"
|
||||
PUBLIC
|
||||
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>"
|
||||
"$<INSTALL_INTERFACE:include/librsvg-${RSVG_API_VERSION}>"
|
||||
)
|
||||
|
||||
install(TARGETS ${targets} pixbufloader-svg
|
||||
EXPORT librsvg-targets
|
||||
target_link_libraries(${LIBRSVG_TARGET}
|
||||
PUBLIC
|
||||
PkgConfig::LIBRSVG_LINK_PUBLIC
|
||||
PRIVATE
|
||||
PkgConfig::LIBRSVG_LINK_PRIVATE
|
||||
)
|
||||
install(TARGETS ${LIBRSVG_TARGET}
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib
|
||||
)
|
||||
|
||||
install(
|
||||
EXPORT librsvg-targets
|
||||
NAMESPACE unofficial::librsvg::
|
||||
FILE unofficial-librsvg-targets.cmake
|
||||
DESTINATION share/unofficial-librsvg
|
||||
FILES
|
||||
rsvg.h
|
||||
rsvg-cairo.h
|
||||
librsvg-features.h
|
||||
librsvg-enum-types.h
|
||||
DESTINATION include/librsvg-${RSVG_API_VERSION}/librsvg
|
||||
)
|
||||
|
||||
install(FILES
|
||||
rsvg.h
|
||||
rsvg-cairo.h
|
||||
librsvg-features.h
|
||||
librsvg-enum-types.h
|
||||
DESTINATION include/librsvg-${RSVG_API_VERSION}
|
||||
|
||||
set(gdk_pixbuf_pc_requires_private gdk-pixbuf-2.0)
|
||||
pkg_check_modules(GDK_PIXBUF ${gdk_pixbuf_pc_requires_private} IMPORTED_TARGET REQUIRED)
|
||||
pkg_get_variable(GDK_PIXBUF_MODULEDIR ${gdk_pixbuf_pc_requires_private} gdk_pixbuf_moduledir)
|
||||
|
||||
set(PIXBUFLOADERSVG_SOURCES
|
||||
gdk-pixbuf-loader/io-svg.c
|
||||
)
|
||||
|
||||
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/unofficial-librsvg-config.cmake "
|
||||
include(CMakeFindDependencyMacro)
|
||||
find_dependency(PkgConfig)
|
||||
pkg_check_modules(GLIB2 glib-2.0 gobject-2.0 gmodule-2 gio-2 IMPORTED_TARGET)
|
||||
pkg_check_modules(CAIRO cairo IMPORTED_TARGET)
|
||||
pkg_check_modules(GDK_PIXBUF gdk-pixbuf IMPORTED_TARGET)
|
||||
pkg_check_modules(PANGO pango pangocairo IMPORTED_TARGET)
|
||||
find_dependency(unofficial-libcroco CONFIG)
|
||||
add_library(pixbufloader-svg MODULE ${PIXBUFLOADERSVG_SOURCES})
|
||||
target_include_directories(pixbufloader-svg
|
||||
PRIVATE
|
||||
"${CMAKE_CURRENT_BINARY_DIR}"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
)
|
||||
target_compile_definitions(pixbufloader-svg PRIVATE
|
||||
-DRSVG_COMPILATION
|
||||
-D_CRT_SECURE_NO_WARNINGS
|
||||
-DSRCDIR=""
|
||||
-DGDK_PIXBUF_ENABLE_BACKEND
|
||||
-DG_LOG_DOMAIN="libpixbufloader-svg"
|
||||
)
|
||||
target_link_libraries(pixbufloader-svg
|
||||
PRIVATE
|
||||
${LIBRSVG_TARGET}
|
||||
PkgConfig::GDK_PIXBUF
|
||||
)
|
||||
install(TARGETS pixbufloader-svg
|
||||
RUNTIME DESTINATION "${GDK_PIXBUF_MODULEDIR}"
|
||||
LIBRARY DESTINATION "${GDK_PIXBUF_MODULEDIR}"
|
||||
)
|
||||
|
||||
include(\${CMAKE_CURRENT_LIST_DIR}/unofficial-librsvg-targets.cmake)
|
||||
")
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/unofficial-librsvg-config.cmake DESTINATION share/unofficial-librsvg)
|
||||
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/librsvg.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/librsvg.pc" @ONLY)
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/librsvg.pc" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
|
||||
file(READ "${CMAKE_CURRENT_BINARY_DIR}/librsvg.pc" librsvg_pc)
|
||||
list(JOIN librsvg_pc_requires_private " " requires_private)
|
||||
string(REPLACE "Requires.private:" "Requires.private: ${requires_private}" librsvg_pc "${librsvg_pc}")
|
||||
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/librsvg.pc" "${librsvg_pc}")
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/librsvg.pc" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig" RENAME "librsvg-${RSVG_API_VERSION}.pc")
|
||||
|
|
|
@ -1,44 +1,40 @@
|
|||
# port update requires rust/cargo
|
||||
|
||||
string(REGEX REPLACE "^([0-9]*[.][0-9]*)[.].*" "\\1" MAJOR_MINOR "${VERSION}")
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URLS "https://download.gnome.org/sources/librsvg/2.40/librsvg-2.40.20.tar.xz"
|
||||
FILENAME "librsvg-2.40.20.tar.xz"
|
||||
URLS "https://download.gnome.org/sources/librsvg/${MAJOR_MINOR}/librsvg-${VERSION}.tar.xz"
|
||||
"https://www.mirrorservice.org/sites/ftp.gnome.org/pub/GNOME/sources/librsvg/${MAJOR_MINOR}/librsvg-${VERSION}.tar.xz"
|
||||
FILENAME "librsvg-${VERSION}.tar.xz"
|
||||
SHA512 cdd8224deb4c3786e29f48ed02c32ed9dff5cb15aba574a5ef845801ad3669cfcc3eedb9d359c22213dc7a29de24c363248825adad5877c40abf73b3688ff12f
|
||||
)
|
||||
|
||||
vcpkg_extract_source_archive(
|
||||
SOURCE_PATH
|
||||
ARCHIVE ${ARCHIVE}
|
||||
ARCHIVE "${ARCHIVE}"
|
||||
)
|
||||
|
||||
file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")
|
||||
configure_file("${CMAKE_CURRENT_LIST_DIR}/config.h.linux" "${SOURCE_PATH}/config.h.linux" COPYONLY)
|
||||
file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" "${CMAKE_CURRENT_LIST_DIR}/config.h.linux" DESTINATION "${SOURCE_PATH}")
|
||||
|
||||
vcpkg_find_acquire_program(PKGCONFIG)
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
DISABLE_PARALLEL_CONFIGURE
|
||||
OPTIONS
|
||||
-DPKG_CONFIG_EXECUTABLE=${PKGCONFIG}
|
||||
"-DPKG_CONFIG_EXECUTABLE=${PKGCONFIG}"
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-librsvg CONFIG_PATH share/unofficial-librsvg)
|
||||
|
||||
vcpkg_fixup_pkgconfig()
|
||||
|
||||
if(VCPKG_TARGET_IS_WINDOWS)
|
||||
if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
|
||||
file(GLOB_RECURSE pc_files "${CURRENT_PACKAGES_DIR}/*.pc")
|
||||
foreach(pc_file ${pc_files})
|
||||
foreach(pc_file IN LISTS pc_files)
|
||||
vcpkg_replace_string("${pc_file}" " -lm" "")
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
|
||||
file(COPY "${CURRENT_PORT_DIR}/unofficial-librsvg-config.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/unofficial-librsvg")
|
||||
file(COPY "${CURRENT_PORT_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
||||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")
|
||||
|
||||
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
file(READ "${CMAKE_CURRENT_LIST_DIR}/../librsvg/usage" usage)
|
||||
message(WARNING "find_package(unofficial-librsvg) is deprecated.\n${usage}")
|
||||
|
||||
include(CMakeFindDependencyMacro)
|
||||
find_dependency(PkgConfig)
|
||||
pkg_check_modules(VCPKG_LIBRSVG librsvg-2.0 IMPORTED_TARGET)
|
||||
if(NOT VCPKG_LIBRSVG_FOUND)
|
||||
set(${CMAKE_FIND_PACKAGE_NAME}_FOUND 0)
|
||||
elseif(NOT TARGET unofficial::librsvg::rsvg-2)
|
||||
add_library(unofficial::librsvg::rsvg-2 INTERFACE IMPORTED)
|
||||
set_target_properties(unofficial::librsvg::rsvg-2 PROPERTIES
|
||||
INTERFACE_LINK_LIBRARIES PkgConfig::VCPKG_LIBRSVG
|
||||
)
|
||||
endif()
|
|
@ -1,10 +1,5 @@
|
|||
librsvg can be imported via CMake FindPkgConfig module:
|
||||
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(librsvg REQUIRED IMPORTED_TARGET librsvg)
|
||||
target_link_libraries(main PkgConfig::librsvg)
|
||||
|
||||
vcpkg provides proprietary CMake targets:
|
||||
|
||||
find_package(unofficial-librsvg CONFIG REQUIRED)
|
||||
target_link_libraries(main PRIVATE unofficial::librsvg::rsvg-2 unofficial::librsvg::pixbufloader-svg)
|
||||
pkg_check_modules(LIBRSVG librsvg-2.0 IMPORTED_TARGET REQUIRED)
|
||||
target_link_libraries(main PRIVATE PkgConfig::LIBRSVG)
|
||||
|
|
|
@ -1,22 +1,24 @@
|
|||
{
|
||||
"name": "librsvg",
|
||||
"version": "2.40.20",
|
||||
"port-version": 9,
|
||||
"port-version": 10,
|
||||
"description": "A small library to render Scalable Vector Graphics (SVG)",
|
||||
"homepage": "https://gitlab.gnome.org/GNOME/librsvg",
|
||||
"license": "LGPL-2.0-or-later",
|
||||
"dependencies": [
|
||||
"cairo",
|
||||
"fontconfig",
|
||||
"gdk-pixbuf",
|
||||
"glib",
|
||||
"libcroco",
|
||||
{
|
||||
"name": "libxml2",
|
||||
"default-features": false
|
||||
},
|
||||
"pango",
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -3038,7 +3038,7 @@
|
|||
},
|
||||
"graphviz": {
|
||||
"baseline": "9.0.0",
|
||||
"port-version": 0
|
||||
"port-version": 1
|
||||
},
|
||||
"greatest": {
|
||||
"baseline": "1.5.0",
|
||||
|
@ -4038,7 +4038,7 @@
|
|||
},
|
||||
"libcroco": {
|
||||
"baseline": "0.6.13",
|
||||
"port-version": 5
|
||||
"port-version": 6
|
||||
},
|
||||
"libcsv": {
|
||||
"baseline": "3.0.3",
|
||||
|
@ -4598,7 +4598,7 @@
|
|||
},
|
||||
"librsvg": {
|
||||
"baseline": "2.40.20",
|
||||
"port-version": 9
|
||||
"port-version": 10
|
||||
},
|
||||
"librsync": {
|
||||
"baseline": "2.3.2",
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "ba712eb597e2f6b4cd9113689ccb72cb95025d6f",
|
||||
"version-semver": "9.0.0",
|
||||
"port-version": 1
|
||||
},
|
||||
{
|
||||
"git-tree": "a1450baf722dffefe9e4e4c4b5939ed1933ba269",
|
||||
"version-semver": "9.0.0",
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "fb00cde342d5aad9f925f36c471d4e047a1dca23",
|
||||
"version": "0.6.13",
|
||||
"port-version": 6
|
||||
},
|
||||
{
|
||||
"git-tree": "c6962c2f97aca37a74b56870cc7ff032605cfba2",
|
||||
"version": "0.6.13",
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "ba6e6aad1557505c8ede7b320d554bd2cab6bb7d",
|
||||
"version": "2.40.20",
|
||||
"port-version": 10
|
||||
},
|
||||
{
|
||||
"git-tree": "c75d4ca281d1bba78571abdb035e025ded217c00",
|
||||
"version": "2.40.20",
|
||||
|
|
Загрузка…
Ссылка в новой задаче