File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -4,8 +4,12 @@ use std::env;
44use std:: path:: PathBuf ;
55
66pub fn main ( ) {
7+ let devkitpro_path = env:: var ( "DEVKITPRO" ) . unwrap ( ) ;
8+ let devkitarm_path = env:: var ( "DEVKITARM" ) . unwrap ( ) ;
9+
710 println ! ( "cargo:rustc-link-lib=static=nx" ) ;
8- println ! ( "cargo:rustc-link-search=native=/opt/devkitpro/libnx/lib" ) ;
11+ println ! ( "cargo:rustc-link-search=native={}/libnx/lib" , devkitpro_path) ;
12+
913 // The bindgen::Builder is the main entry point
1014 // to bindgen, and lets you build up options for
1115 // the resulting bindings.
@@ -18,10 +22,10 @@ pub fn main() {
1822
1923 . header ( "wrapper.h" )
2024
21- . clang_arg ( "-I/opt/devkitpro/ libnx/include" )
22- . clang_arg ( "-I/opt/devkitpro/devkitA64/ aarch64-none-elf/include" )
23-
24- . clang_arg ( "-I/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/7.3.0/include" )
25+ . clang_arg ( format ! ( "-I{}/ libnx/include" , devkitpro_path ) )
26+ . clang_arg ( format ! ( "-I{}/ aarch64-none-elf/include" , devkitarm_path ) )
27+ . clang_arg ( format ! ( "-I{}/lib/gcc/aarch64-none-elf/7.3.0/include" , devkitarm_path ) )
28+
2529 // .whitelist_function("consoleInit")
2630 // .whitelist_function("hidKeysDown")
2731 . bitfield_enum ( "HidMouseButton" )
You can’t perform that action at this time.
0 commit comments