@@ -18,6 +18,8 @@ pub struct Interface {
1818 pub ( crate ) reexport_links : HashSet < String > ,
1919 pub ( crate ) exported_include_prefixes : Vec < String > ,
2020 pub ( crate ) exported_include_directories : Vec < ( PathBuf , String ) > ,
21+ pub ( crate ) manifest : Manifest ,
22+ pub ( crate ) dependencies : Vec < Dependency > ,
2123 // TODO: In future, we want to also set up the include paths so that you can include anything
2224 // from the crates source directory.
2325 // Once this is done, this flag should indicate whether or not to export our own crates source
@@ -31,6 +33,8 @@ impl Default for Interface {
3133 reexport_links : HashSet :: new ( ) ,
3234 exported_include_prefixes : vec ! [ super :: crate_name( ) ] ,
3335 exported_include_directories : Vec :: new ( ) ,
36+ manifest : Manifest :: default ( ) ,
37+ dependencies : Vec :: new ( ) ,
3438 }
3539 }
3640}
@@ -100,20 +104,20 @@ impl Interface {
100104 self
101105 }
102106
103- pub ( crate ) fn export ( self , mut manifest : Manifest , dependencies : & [ Dependency ] ) {
107+ pub ( crate ) fn export ( mut self ) {
104108 self . write_exported_include_directories ( ) ;
105109
106110 // We automatically reexport all qt_modules and downstream dependencies
107111 // as they will always need to be enabled in the final binary.
108112 // However, we only reexport the headers of libraries that
109113 // are marked as re-export.
110- let dependencies = reexported_dependencies ( & self , & dependencies) ;
114+ let dependencies = reexported_dependencies ( & self , & self . dependencies ) ;
111115
112- manifest. exported_include_prefixes = all_include_prefixes ( & self , & dependencies) ;
116+ self . manifest . exported_include_prefixes = all_include_prefixes ( & self , & dependencies) ;
113117
114118 let manifest_path = dir:: crate_target ( ) . join ( "manifest.json" ) ;
115- let manifest_json =
116- serde_json :: to_string_pretty ( & manifest ) . expect ( "Failed to convert Manifest to JSON!" ) ;
119+ let manifest_json = serde_json :: to_string_pretty ( & self . manifest )
120+ . expect ( "Failed to convert Manifest to JSON!" ) ;
117121 std:: fs:: write ( & manifest_path, manifest_json) . expect ( "Failed to write manifest.json!" ) ;
118122 println ! (
119123 "cargo::metadata=CXX_QT_MANIFEST_PATH={}" ,
0 commit comments