Skip to content

Commit 3b5da73

Browse files
authored
[build] oops we still wanna build the utils_log stuff (#189)
1 parent dac9060 commit 3b5da73

File tree

1 file changed

+28
-2
lines changed

1 file changed

+28
-2
lines changed

raylib-sys/build.rs

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff 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")]
317341
fn 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]

0 commit comments

Comments
 (0)