Skip to content

Commit

Permalink
Use cargo workspace features
Browse files Browse the repository at this point in the history
  • Loading branch information
bilelmoussaoui committed Jan 25, 2024
1 parent 68ba1c0 commit 7602a3b
Show file tree
Hide file tree
Showing 15 changed files with 296 additions and 213 deletions.
25 changes: 25 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,28 @@ members = [
]

exclude = ["checker", "gir", "book/listings"]

[workspace.package]
authors = ["The gtk-rs Project Developers"]
categories = ["api-bindings", "gui"]
edition = "2021"
homepage = "https://gtk-rs.org/gtk4-rs"
license = "MIT"
repository = "https://github.com/gtk-rs/gtk4-rs"
rust-version = "1.70"
version = "0.8.0"

[workspace.metadata.docs.rs]
all-features = true
rustc-args = ["--cfg", "docsrs"]
rustdoc-args = ["--cfg", "docsrs", "--generate-link-to-definition"]

[workspace.dependencies]
cairo-rs = {git = "https://github.com/gtk-rs/gtk-rs-core", version = "0.19", features = ["use_glib"]}
gdk-pixbuf = {git = "https://github.com/gtk-rs/gtk-rs-core", version = "0.19"}
gio = {git = "https://github.com/gtk-rs/gtk-rs-core", version = "0.19", features = ["v2_66"]}
glib = {git = "https://github.com/gtk-rs/gtk-rs-core", version = "0.19", features = ["v2_66"]}
graphene = {package = "graphene-rs", git = "https://github.com/gtk-rs/gtk-rs-core", version = "0.19"}
libc = "0.2"
pango = {git = "https://github.com/gtk-rs/gtk-rs-core", version = "0.19", features = ["v1_46"]}
gir-format-check = "^0.1"
6 changes: 3 additions & 3 deletions examples/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[package]
name = "gtk4-rs-examples"
version = "0.1.0"
authors = ["The gtk-rs Project Developers"]
edition = "2021"
edition.workspace = true
version.workspace = true
authors.workspace = true

[dependencies]
chrono = "0.4"
Expand Down
30 changes: 13 additions & 17 deletions gdk4-wayland/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
[package]
authors = ["The gtk-rs Project Developers"]
name = "gdk4-wayland"
description = "Rust bindings of the GDK 4 Wayland library"
documentation = "https://gtk-rs.org/gtk4-rs/stable/latest/docs/gdk4_wayland/"
edition = "2021"
homepage = "https://gtk-rs.org/"
keywords = ["gdk4", "gdk4-wayland", "gtk-rs", "gnome", "GUI"]
license = "MIT"
name = "gdk4-wayland"
readme = "README.md"
repository = "https://github.com/gtk-rs/gtk4-rs"
version = "0.8.0"
rust-version = "1.70"
authors.workspace = true
categories.workspace = true
edition.workspace = true
homepage.workspace = true
license.workspace = true
repository.workspace = true
rust-version.workspace = true
version.workspace = true

[features]
v4_4 = ["ffi/v4_4", "gdk/v4_4"]
Expand All @@ -19,20 +20,15 @@ v4_12 = ["ffi/v4_12", "v4_10", "gdk/v4_12"]
wayland_crate = ["wayland-client", "wayland-backend"]
egl = ["khronos-egl"]

[package.metadata.docs.rs]
all-features = true
rustc-args = ["--cfg", "docsrs"]
rustdoc-args = ["--cfg", "docsrs", "--generate-link-to-definition"]

[dependencies]
ffi = {path = "./sys", package = "gdk4-wayland-sys", version = "0.8"}
gdk = {path = "../gdk4", package = "gdk4", version = "0.8"}
gio = {git = "https://github.com/gtk-rs/gtk-rs-core", version = "0.19", features = ["v2_66"]}
glib = {git = "https://github.com/gtk-rs/gtk-rs-core", version = "0.19", features = ["v2_66"]}
libc = "0.2"
gio.workspace = true
glib.workspace = true
libc.workspace = true
wayland-client = {version = "0.31.0", optional = true}
wayland-backend = {version = "0.3.0", optional = true, features = ["client_system"]}
khronos-egl = {version = "6.0", optional = true}

[dev-dependencies]
gir-format-check = "^0.1"
gir-format-check.workspace = true
35 changes: 26 additions & 9 deletions gdk4-wayland/sys/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,33 @@
[package]
authors = ["The gtk-rs Project Developers"]
name = "gdk4-wayland-sys"
build = "build.rs"
description = "FFI bindings of GDK4 Wayland"
documentation = "https://gtk-rs.org/gtk4-rs/stable/latest/docs/gdk4_wayland_sys/"
edition = "2021"
homepage = "https://gtk-rs.org/"
keywords = ["gdk4", "gdk4-wayland", "ffi", "gtk-rs", "gnome"]
license = "MIT"
name = "gdk4-wayland-sys"
repository = "https://github.com/gtk-rs/gtk4-rs"
version = "0.8.0"
rust-version = "1.70"

[package.authors]
workspace = true

[package.categories]
workspace = true

[package.edition]
workspace = true

[package.homepage]
workspace = true

[package.license]
workspace = true

[package.repository]
workspace = true

[package.rust-version]
workspace = true

[package.version]
workspace = true

[package.metadata.system-deps.gtk4_wayland]
name = "gtk4-wayland"
Expand All @@ -26,9 +43,9 @@ version = "4.10"
version = "4.11"

[package.metadata.docs.rs]
all-features = true
rustc-args = ["--cfg", "docsrs"]
rustdoc-args = ["--cfg", "docsrs", "--generate-link-to-definition"]
all-features = true

[lib]
name = "gdk4_wayland_sys"
Expand Down
55 changes: 15 additions & 40 deletions gdk4-win32/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,22 +1,18 @@
[package]
authors = ["The gtk-rs Project Developers"]
name = "gdk4-win32"
description = "Rust bindings of the GDK4 Win32 library"
documentation = "https://gtk-rs.org/gtk4-rs/stable/latest/docs/gdk4_win32/"
edition = "2021"
homepage = "https://gtk-rs.org/"
keywords = ["gdk4", "gdk4-win32", "gtk-rs", "gnome", "GUI"]
license = "MIT"
name = "gdk4-win32"
readme = "README.md"
repository = "https://github.com/gtk-rs/gtk4-rs"
version = "0.8.0"
rust-version = "1.70"
build = "build.rs"

[package.metadata.docs.rs]
all-features = true
rustc-args = ["--cfg", "docsrs"]
rustdoc-args = ["--cfg", "docsrs", "--generate-link-to-definition"]
authors.workspace = true
categories.workspace = true
edition.workspace = true
homepage.workspace = true
license.workspace = true
repository.workspace = true
rust-version.workspace = true
version.workspace = true

[package.metadata.system-deps.gtk4_win32]
name = "gtk4-win32"
Expand All @@ -28,37 +24,16 @@ egl = ["khronos-egl"]
win32 = ["windows"]

[dependencies]
libc = "0.2"
libc.workspace = true
khronos-egl = {version = "6.0", optional = true}
windows = { version = "0.52", features = [
"Win32_Foundation",
"Win32_UI_WindowsAndMessaging",
], optional = true }

[dependencies.ffi]
path = "./sys"
package = "gdk4-win32-sys"
version = "0.8"

[dependencies.gdk]
path = "../gdk4"
package = "gdk4"
version = "0.8"

[dependencies.gio]
git = "https://github.com/gtk-rs/gtk-rs-core"
version = "0.19"
features = ["v2_66"]

[dependencies.glib]
git = "https://github.com/gtk-rs/gtk-rs-core"
version = "0.19"
features = ["v2_66"]
ffi = { path = "./sys", version = "0.8", package = "gdk4-win32-sys"}
gdk = { path = "../gdk4", package = "gdk4", version = "0.8"}
gio.workspace = true
glib.workspace = true

[dev-dependencies]
gir-format-check = "^0.1"
shell-words = "1.0.0"
tempfile = "3"

[build-dependencies]
system-deps = "6"
gir-format-check.workspace = true
35 changes: 26 additions & 9 deletions gdk4-win32/sys/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,33 @@
[package]
authors = ["The gtk-rs Project Developers"]
name = "gdk4-win32-sys"
build = "build.rs"
description = "FFI bindings of GDK4 Win32"
documentation = "https://gtk-rs.org/gtk4-rs/git/docs/gdk4_win32_sys/"
edition = "2021"
homepage = "https://gtk-rs.org/"
keywords = ["gdk4", "gdk4-win32", "ffi", "gtk-rs", "gnome"]
license = "MIT"
name = "gdk4-win32-sys"
repository = "https://github.com/gtk-rs/gtk4-rs"
version = "0.8.0"
rust-version = "1.70"

[package.authors]
workspace = true

[package.categories]
workspace = true

[package.edition]
workspace = true

[package.homepage]
workspace = true

[package.license]
workspace = true

[package.repository]
workspace = true

[package.rust-version]
workspace = true

[package.version]
workspace = true

[package.metadata.system-deps.gtk4_win32]
name = "gtk4-win32"
Expand All @@ -23,9 +40,9 @@ version = "4.4"
version = "4.8"

[package.metadata.docs.rs]
all-features = true
rustc-args = ["--cfg", "docsrs"]
rustdoc-args = ["--cfg", "docsrs", "--generate-link-to-definition"]
all-features = true

[lib]
name = "gdk4_win32_sys"
Expand Down
31 changes: 14 additions & 17 deletions gdk4-x11/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,35 +1,32 @@
[package]
authors = ["The gtk-rs Project Developers"]
name = "gdk4-x11"
description = "Rust bindings of the GDK4 X11 library"
documentation = "https://gtk-rs.org/gtk4-rs/stable/latest/docs/gdk4_x11/"
edition = "2021"
homepage = "https://gtk-rs.org/"
keywords = ["gdk4", "gdk4-x11", "gtk-rs", "gnome", "GUI"]
license = "MIT"
name = "gdk4-x11"
readme = "README.md"
repository = "https://github.com/gtk-rs/gtk4-rs"
version = "0.8.0"
rust-version = "1.70"
authors.workspace = true
categories.workspace = true
edition.workspace = true
homepage.workspace = true
license.workspace = true
repository.workspace = true
rust-version.workspace = true
version.workspace = true

[features]
v4_4 = ["ffi/v4_4", "gdk/v4_4"]
v4_10 = ["ffi/v4_10", "v4_4", "gdk/v4_10"]
egl = ["khronos-egl"]
xlib = ["x11"]

[package.metadata.docs.rs]
all-features = true
rustc-args = ["--cfg", "docsrs"]
rustdoc-args = ["--cfg", "docsrs", "--generate-link-to-definition"]

[dependencies]
ffi = {path = "./sys", package = "gdk4-x11-sys", version = "0.8"}
gdk = {path = "../gdk4", package = "gdk4", version = "0.8"}
gio = {git = "https://github.com/gtk-rs/gtk-rs-core", version = "0.19", features = ["v2_66"]}
glib = {git = "https://github.com/gtk-rs/gtk-rs-core", version = "0.19", features = ["v2_66"]}
libc = "0.2"
gio.workspace = true
glib.workspace = true
libc.workspace = true
x11 = {version = "2.20", optional = true }
khronos-egl = {version = "6.0", optional = true}

[dev-dependencies]
gir-format-check = "^0.1"
gir-format-check.workspace = true
35 changes: 26 additions & 9 deletions gdk4-x11/sys/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,33 @@
[package]
authors = ["The gtk-rs Project Developers"]
name = "gdk4-x11-sys"
build = "build.rs"
description = "FFI bindings of GDK4 X11"
documentation = "https://gtk-rs.org/gtk4-rs/git/docs/gdk4_x11_sys/"
edition = "2021"
homepage = "https://gtk-rs.org/"
keywords = ["gdk4", "gdk4-x11", "ffi", "gtk-rs", "gnome"]
license = "MIT"
name = "gdk4-x11-sys"
repository = "https://github.com/gtk-rs/gtk4-rs"
version = "0.8.0"
rust-version = "1.70"

[package.authors]
workspace = true

[package.categories]
workspace = true

[package.edition]
workspace = true

[package.homepage]
workspace = true

[package.license]
workspace = true

[package.repository]
workspace = true

[package.rust-version]
workspace = true

[package.version]
workspace = true

[package.metadata.system-deps.gtk4_x11]
name = "gtk4-x11"
Expand All @@ -23,9 +40,9 @@ version = "4.4"
version = "4.10"

[package.metadata.docs.rs]
all-features = true
rustc-args = ["--cfg", "docsrs"]
rustdoc-args = ["--cfg", "docsrs", "--generate-link-to-definition"]
all-features = true

[lib]
name = "gdk4_x11_sys"
Expand Down
Loading

0 comments on commit 7602a3b

Please sign in to comment.