fix: compiling on windows requires cosmic-icons in project root

crabtime provides crabtime::WORKSPACE_PATH to refer to the
CARGO_MANIFEST_DIR of the top level crate being built, which means when
building libcosmic directly, crabtime::WORKSPACE_PATH will work, but
when building it as a dependency of another crate,
crabtime::WORKSPACE_PATH will no longer refer to the path to libcosmic.

I don't think there's a good workaround, since when in the context of
crabtime, CARGO_MANIFEST_DIR refers to the path to the crate generated
by crabtime rather than to libcosmic.

This replaces crabtime with a simple build.rs script that generates a
file in OUT_DIR.
This commit is contained in:
Kyle Scheuing 2025-11-27 02:37:56 -05:00
parent 62f661e077
commit e776db863d
No known key found for this signature in database
GPG key ID: 72CE2DDCDA12B906
3 changed files with 55 additions and 45 deletions

View file

@ -107,8 +107,6 @@ cctk = { git = "https://github.com/pop-os/cosmic-protocols", package = "cosmic-c
chrono = "0.4.42"
cosmic-config = { path = "cosmic-config" }
cosmic-settings-config = { git = "https://github.com/pop-os/cosmic-settings-daemon", optional = true }
# Compile-time generation of code
crabtime = "1.1.4"
# Internationalization
i18n-embed = { version = "0.16.0", features = [
"fluent-system",