summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@gnome.org>2023-04-19 20:54:53 -0600
committerFederico Mena Quintero <federico@gnome.org>2023-04-19 20:56:05 -0600
commit6250b391244f9f51ce041afcb75125bca2edbc36 (patch)
tree9d55cddd02b088f832976e52af0a1ed54f0495df
parent3172020631e93380a7a933e9bc11aacd7a534216 (diff)
downloadlibrsvg-6250b391244f9f51ce041afcb75125bca2edbc36.tar.gz
autotools: Make rsvg-convert build
* Rename the librsvg-c project's library back to "librsvg_c". Rust will then build target/whatever/liblibrsvg_c.a. * Build librsvg_c as an rlib too, so rsvg-convert can use it. Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/822>
-rw-r--r--Makefile.am2
-rw-r--r--librsvg-c/Cargo.toml3
-rw-r--r--rsvg-convert/src/main.rs2
3 files changed, 3 insertions, 4 deletions
diff --git a/Makefile.am b/Makefile.am
index adf9b432..4ee177de 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -157,7 +157,7 @@ cargo_verbose_1 = --verbose
LIBRSVG_BUILD_DIR=@abs_top_builddir@
CARGO_TARGET_DIR=$(LIBRSVG_BUILD_DIR)/target
-RUST_LIB=$(CARGO_TARGET_DIR)/$(RUST_TARGET_SUBDIR)/librsvg.a
+RUST_LIB=$(CARGO_TARGET_DIR)/$(RUST_TARGET_SUBDIR)/liblibrsvg_c.a
check-local:
cd $(srcdir) && \
diff --git a/librsvg-c/Cargo.toml b/librsvg-c/Cargo.toml
index 1bbe56a5..1f229be7 100644
--- a/librsvg-c/Cargo.toml
+++ b/librsvg-c/Cargo.toml
@@ -26,5 +26,4 @@ regex = "1.7.1"
librsvg = { path = "../rsvg", features = ["c-api", "test-utils"] }
[lib]
-name = "rsvg"
-crate-type = [ "staticlib" ]
+crate-type = [ "staticlib", "rlib" ]
diff --git a/rsvg-convert/src/main.rs b/rsvg-convert/src/main.rs
index dc1cb396..4c63dcb5 100644
--- a/rsvg-convert/src/main.rs
+++ b/rsvg-convert/src/main.rs
@@ -21,7 +21,7 @@ use self::windows_imports::*;
use cssparser::{_cssparser_internal_to_lowercase, match_ignore_ascii_case};
-use librsvg_c::c_api::{handle::PathOrUrl, sizing::LegacySize};
+use librsvg_c::{handle::PathOrUrl, sizing::LegacySize};
use rsvg::rsvg_convert_only::{
AspectRatio, CssLength, Horizontal, Length, Normalize, NormalizeParams, Parse, Signed, ULength,
Unsigned, Validate, Vertical, ViewBox,