Compare commits

..

No commits in common. "7cbb5a1510edc6f9877ba3d366410f6add0b7780" and "5389062d4436c70ce92cb85d12ee5c8d0ff2211d" have entirely different histories.

2 changed files with 5 additions and 42 deletions

View File

@ -73,16 +73,6 @@ target_compile_definitions(
-DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT
)
file(
GENERATE
OUTPUT link.txt
CONTENT
"$<TARGET_PROPERTY:Qt5::Core,IMPORTED_LOCATION_RELEASE>
$<TARGET_PROPERTY:Qt5::Widgets,IMPORTED_LOCATION_RELEASE>
$<TARGET_PROPERTY:Qt5::Gui,IMPORTED_LOCATION_RELEASE>"
)
install(TARGETS maraiah-tycho-hermes)
install(FILES ${CMAKE_BINARY_DIR}/link.txt TYPE SYSCONF)
## EOF

View File

@ -1,14 +1,8 @@
use rust_qt_binding_generator::*;
use std::{io::prelude::*, path::PathBuf};
use std::path::PathBuf;
fn main()
{
let (lty, dty, qtpre, cxx) = if cfg!(target_os = "macos") {
("framework", "framework", "Qt", "c++")
} else {
("dylib", "native", "Qt5", "stdc++")
};
let out_dir = PathBuf::from(std::env::var("OUT_DIR").unwrap());
let mut config = configuration::parse("bindings.json").unwrap();
@ -27,34 +21,13 @@ fn main()
let out_dir = config.build();
let lib_dir = out_dir.join("lib");
let etc_dir = out_dir.join("etc");
println!("cargo:rustc-link-search=native={}", lib_dir.display());
println!("cargo:rustc-link-lib=static=maraiah-tycho-hermes");
let fp = std::fs::File::open(etc_dir.join("link.txt")).unwrap();
let fp = std::io::BufReader::new(fp);
for ln in fp.lines() {
let ln = ln.unwrap();
let path = PathBuf::from(&ln);
let path = path.parent().unwrap();
let path = if cfg!(target_os = "macos") {
path.parent().unwrap()
} else {
path
};
println!("cargo:rustc-link-search={}={}", dty, path.display());
}
println!("cargo:rustc-link-lib={}={}Core", lty, qtpre);
println!("cargo:rustc-link-lib={}={}Widgets", lty, qtpre);
println!("cargo:rustc-link-lib={}={}Gui", lty, qtpre);
println!("cargo:rustc-link-lib=dylib={}", cxx);
println!("cargo:rustc-link-lib=dylib=Qt5Core");
println!("cargo:rustc-link-lib=dylib=Qt5Widgets");
println!("cargo:rustc-link-lib=dylib=Qt5Gui");
println!("cargo:rustc-link-lib=dylib=stdc++");
}
// EOF