Skip to content

Commit 0f66a22

Browse files
committed
fix: use target variable to set the target depending on the os
1 parent 34a0827 commit 0f66a22

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

stm32cubeprogrammer-sys/justfile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ bindgen_output := if os() == 'windows' {
1515
"src/bindings_unix.rs"
1616
}
1717

18+
target := if os() == 'windows' {
19+
x86_64-pc-windows-msvc
20+
} else {
21+
x86_64-unknown-linux-gnu
22+
}
23+
1824
# Generate bindings for the CubeProgrammer API dynamic library
1925
generate-bindings:
20-
bindgen {{source_directory()}}/{{bindgen_header}} --dynamic-loading CubeProgrammer_API --output {{source_directory()}}/{{bindgen_output}} -- -x c++ -target x86_64-pc-windows-msvc
26+
bindgen {{source_directory()}}/{{bindgen_header}} --dynamic-loading CubeProgrammer_API --output {{source_directory()}}/{{bindgen_output}} -- -x c++ -target {{target}}

0 commit comments

Comments
 (0)