Skip to content

Commit dbe3464

Browse files
committed
WIP: cxx-qt-build: somewhere we need to handle links correctly
1 parent 26978aa commit dbe3464

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

crates/cxx-qt-build/src/interface.rs

+5
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,11 @@ impl Interface {
107107
/// Export the manifest for this crate so that is can be used by downstream
108108
/// crates or CMake
109109
pub fn export(mut self) {
110+
// TODO: somewhere we need to detect this correctly
111+
if self.manifest.link_name.is_empty() {
112+
panic!("The links key must be set when exporting");
113+
}
114+
110115
self.write_exported_include_directories();
111116

112117
// We automatically reexport all qt_modules and downstream dependencies

crates/cxx-qt-build/src/lib.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1123,8 +1123,7 @@ extern "C" bool {init_fun}() {{
11231123
Interface {
11241124
manifest: Manifest {
11251125
name: crate_name(),
1126-
link_name: link_name()
1127-
.expect("The links key must be set when creating a library with CXX-Qt-build!"),
1126+
link_name: link_name().unwrap_or_default(),
11281127
initializers: vec![public_initializer.strip_file()],
11291128
qt_modules: qt_modules.into_iter().collect(),
11301129
exported_include_prefixes: vec![],

0 commit comments

Comments
 (0)