Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmake: fix build with ninja generator #807

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

abouvier
Copy link
Contributor

@abouvier abouvier commented Dec 28, 2024

Fix this error when using Ninja generator and Rust backend cmake -G Ninja -D BUILD_RUST_LIBS=ON ...

ninja: error: '/build/cubeb/src/cubeb-pulse-rs/target/release/libcubeb_pulse.a', needed by 'libcubeb.so.0.0.0', missing and no known rule to make it

Because of this and that.

@@ -345,6 +345,7 @@ if(USE_PULSE AND USE_PULSE_RUST)
DOWNLOAD_COMMAND ""
CONFIGURE_COMMAND ""
BUILD_COMMAND cargo build --features=gecko-in-tree COMMAND cargo build --release --features=gecko-in-tree
BUILD_BYPRODUCTS "${PROJECT_SOURCE_DIR}/src/cubeb-pulse-rs/target/$<IF:$<CONFIG:Debug>,debug,release>/libcubeb_pulse.a"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

drive-by: will this work if libcubeb-pulse is cross-compiled for a different architecture?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(also, thanks for the patch!)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

drive-by: will this work if libcubeb-pulse is cross-compiled for a different architecture?

Why not? It's the same file that is referenced by the target_link_libraries call below.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah right, thanks for pointing that out. I think that's broken, too (cross-compiled rust would live in target/arch-triple/{debug,release}, if i recall correctly), so this won't make it broken in any new ways.

@mutexlox-signal
Copy link
Contributor

cc @kinetiknz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants