File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,12 @@ use std::env;
22use std:: path:: PathBuf ;
33
44fn main ( ) {
5- let qulacs_path = PathBuf :: from ( env:: var ( "LIBQULACS_PATH" ) . unwrap ( ) ) ;
5+ let qulacs_path = PathBuf :: from ( env:: var ( "QULACS_PATH" ) . unwrap ( ) ) ;
6+ let mut qulacs_lib = qulacs_path. clone ( ) ;
7+ qulacs_lib. push ( "/lib" ) ;
8+
9+ let mut qulacs_include = qulacs_path. clone ( ) ;
10+ qulacs_include. push ( "/include" ) ;
611 println ! (
712 "cargo:rustc-link-search={}" ,
813 qulacs_path
@@ -18,6 +23,7 @@ fn main() {
1823 let eigen = pkg_config:: probe_library ( "eigen3" ) . unwrap ( ) ;
1924 cxx_build:: bridge ( "src/lib.rs" )
2025 . file ( "src/qulacs-bridge.cc" )
26+ . include ( qulacs_include)
2127 . includes ( eigen. include_paths )
2228 . flag ( "-fext-numeric-literals" )
2329 . flag ( "-fopenmp" ) // todo: better way to do this?
Original file line number Diff line number Diff line change 33 qulacs = pkgs . callPackage ./nix/qulacs.nix { } ;
44in {
55 env = {
6- LIBQULACS_PATH = "${ qulacs } /lib " ;
6+ QULACS_PATH = "${ qulacs } " ;
77 LIBCLANG_PATH = "${ pkgs . libclang . lib } /lib" ;
88 } ;
99
You can’t perform that action at this time.
0 commit comments