File tree Expand file tree Collapse file tree 1 file changed +28
-2
lines changed Expand file tree Collapse file tree 1 file changed +28
-2
lines changed Original file line number Diff line number Diff line change @@ -281,7 +281,7 @@ fn gen_rgui() {
281
281
#[ cfg( target_os = "windows" ) ]
282
282
{
283
283
cc:: Build :: new ( )
284
- . files ( vec ! [ "binding/rgui_wrapper.cpp" , "binding/utils_log.cpp" ] )
284
+ . files ( vec ! [ "binding/rgui_wrapper.cpp" ] )
285
285
. include ( "binding" )
286
286
. warnings ( false )
287
287
// .flag("-std=c99")
@@ -291,7 +291,7 @@ fn gen_rgui() {
291
291
#[ cfg( not( target_os = "windows" ) ) ]
292
292
{
293
293
cc:: Build :: new ( )
294
- . files ( vec ! [ "binding/rgui_wrapper.c" , "binding/utils_log.c" ] )
294
+ . files ( vec ! [ "binding/rgui_wrapper.c" ] )
295
295
. include ( "binding" )
296
296
. warnings ( false )
297
297
// .flag("-std=c99")
@@ -313,6 +313,30 @@ fn gen_imgui() {
313
313
. compile ( "rlImGui" ) ;
314
314
}
315
315
316
+ fn gen_utils ( ) {
317
+ // Compile the code and link with cc crate
318
+ #[ cfg( target_os = "windows" ) ]
319
+ {
320
+ cc:: Build :: new ( )
321
+ . files ( vec ! [ "binding/utils_log.cpp" ] )
322
+ . include ( "binding" )
323
+ . warnings ( false )
324
+ // .flag("-std=c99")
325
+ . extra_warnings ( false )
326
+ . compile ( "rgui" ) ;
327
+ }
328
+ #[ cfg( not( target_os = "windows" ) ) ]
329
+ {
330
+ cc:: Build :: new ( )
331
+ . files ( vec ! [ "binding/utils_log.c" ] )
332
+ . include ( "binding" )
333
+ . warnings ( false )
334
+ // .flag("-std=c99")
335
+ . extra_warnings ( false )
336
+ . compile ( "rgui" ) ;
337
+ }
338
+ }
339
+
316
340
#[ cfg( feature = "nobuild" ) ]
317
341
fn link ( _platform : Platform , _platform_os : PlatformOS ) { }
318
342
@@ -401,6 +425,8 @@ fn main() {
401
425
402
426
#[ cfg( feature = "imgui" ) ]
403
427
gen_imgui ( ) ;
428
+
429
+ gen_utils ( ) ;
404
430
}
405
431
406
432
#[ must_use]
You can’t perform that action at this time.
0 commit comments