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() {
281281 #[ cfg( target_os = "windows" ) ]
282282 {
283283 cc:: Build :: new ( )
284- . files ( vec ! [ "binding/rgui_wrapper.cpp" , "binding/utils_log.cpp" ] )
284+ . files ( vec ! [ "binding/rgui_wrapper.cpp" ] )
285285 . include ( "binding" )
286286 . warnings ( false )
287287 // .flag("-std=c99")
@@ -291,7 +291,7 @@ fn gen_rgui() {
291291 #[ cfg( not( target_os = "windows" ) ) ]
292292 {
293293 cc:: Build :: new ( )
294- . files ( vec ! [ "binding/rgui_wrapper.c" , "binding/utils_log.c" ] )
294+ . files ( vec ! [ "binding/rgui_wrapper.c" ] )
295295 . include ( "binding" )
296296 . warnings ( false )
297297 // .flag("-std=c99")
@@ -313,6 +313,30 @@ fn gen_imgui() {
313313 . compile ( "rlImGui" ) ;
314314}
315315
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+
316340#[ cfg( feature = "nobuild" ) ]
317341fn link ( _platform : Platform , _platform_os : PlatformOS ) { }
318342
@@ -401,6 +425,8 @@ fn main() {
401425
402426 #[ cfg( feature = "imgui" ) ]
403427 gen_imgui ( ) ;
428+
429+ gen_utils ( ) ;
404430}
405431
406432#[ must_use]
You can’t perform that action at this time.
0 commit comments