File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff 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+ // Ensure that a link name has been set
111+ if self . manifest . link_name . is_empty ( ) {
112+ panic ! ( "The links key must be set when exporting with CXX-Qt-build" ) ;
113+ }
114+
110115 self . write_exported_include_directories ( ) ;
111116
112117 // We automatically reexport all qt_modules and downstream dependencies
Original file line number Diff line number Diff 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 ! [ ] ,
You can’t perform that action at this time.
0 commit comments