Skip to content

Commit

Permalink
Define -DFLECS_NO_OS_API_IMPL when appropriate (#190)
Browse files Browse the repository at this point in the history
When `flecs_os_api_impl` is not defined, pass `-DFLECS_NO_OS_API_IMPL`
to the C compiler.
  • Loading branch information
waywardmonkeys authored Oct 23, 2024
1 parent 0dc17e5 commit 4cf34b6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions flecs_ecs_sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,11 @@ fn generate_bindings() {
bindings = bindings.clang_arg("-DFLECS_OS_API_IMPL");
}

#[cfg(not(feature = "flecs_os_api_impl"))]
{
bindings = bindings.clang_arg("-DFLECS_NO_OS_API_IMPL");
}

#[cfg(feature = "flecs_http")]
{
bindings = bindings.clang_arg("-DFLECS_HTTP");
Expand Down

0 comments on commit 4cf34b6

Please sign in to comment.