File tree Expand file tree Collapse file tree 1 file changed +6
-11
lines changed Expand file tree Collapse file tree 1 file changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -28,19 +28,10 @@ fn main() {
28
28
29
29
// Build libui if needed. Otherwise, assume it's in lib/
30
30
let mut dst;
31
- let mut msvc = false ;
32
31
if cfg ! ( feature = "build" ) {
33
- dst = Config :: new ( "libui" ) . build_target ( "" ) . build ( ) ;
34
- // Deterimine if we're building for MSVC
35
- let target = env:: var ( "TARGET" ) . unwrap ( ) ;
36
- msvc = target. contains ( "msvc" ) ;
32
+ dst = Config :: new ( "libui" ) . build_target ( "" ) . profile ( "release" ) . build ( ) ;
37
33
38
- let mut postfix = Path :: new ( "build" ) . join ( "out" ) ;
39
- if msvc {
40
- postfix = postfix. join (
41
- if cfg ! ( debug_assertions) { "Debug" } else { "Release" }
42
- ) ;
43
- }
34
+ let postfix = Path :: new ( "build" ) . join ( "out" ) ;
44
35
dst = dst. join ( & postfix) ;
45
36
} else {
46
37
dst = env:: current_dir ( )
@@ -49,6 +40,10 @@ fn main() {
49
40
}
50
41
println ! ( "cargo:rustc-link-search=native={}" , dst. display( ) ) ;
51
42
43
+ // Deterimine if we're building for MSVC
44
+ let target = env:: var ( "TARGET" ) . unwrap ( ) ;
45
+ let msvc = target. contains ( "msvc" ) ;
46
+
52
47
let libname;
53
48
if msvc {
54
49
libname = "libui" ;
You can’t perform that action at this time.
0 commit comments