Commit graph

3 commits

Author SHA1 Message Date
Bryan Hyland
aabc8dcda5
build(windows): change icon path separator for native windows builds 2025-12-09 20:01:57 +01:00
Kyle Scheuing
54934a961f fix: cross compiling for windows from linux
#[cfg(not(unix))] applies to the host machine (since that's where the
build script is running) rather than the compilation target. Instead,
environment variables are available to provide the information relevant
to the build target at the build script's runtime.
2025-12-04 11:28:39 -07:00
Kyle Scheuing
80875d5962
fix: compiling on windows requires cosmic-icons in project root
* 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.

* fix: do not generate icon bundle for unix targets

---------

Co-authored-by: Michael Aaron Murphy <michael@mmurphy.dev>
2025-12-04 17:31:47 +01:00