File tree 1 file changed +9
-5
lines changed
1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -4,8 +4,12 @@ use std::env;
4
4
use std:: path:: PathBuf ;
5
5
6
6
pub fn main ( ) {
7
+ let devkitpro_path = env:: var ( "DEVKITPRO" ) . unwrap ( ) ;
8
+ let devkitarm_path = env:: var ( "DEVKITARM" ) . unwrap ( ) ;
9
+
7
10
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
+
9
13
// The bindgen::Builder is the main entry point
10
14
// to bindgen, and lets you build up options for
11
15
// the resulting bindings.
@@ -18,10 +22,10 @@ pub fn main() {
18
22
19
23
. header ( "wrapper.h" )
20
24
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
+
25
29
// .whitelist_function("consoleInit")
26
30
// .whitelist_function("hidKeysDown")
27
31
. bitfield_enum ( "HidMouseButton" )
You can’t perform that action at this time.
0 commit comments