Skip to content

Commit

Permalink
Cleanup compiler options
Browse files Browse the repository at this point in the history
  • Loading branch information
nicbarker committed Oct 7, 2024
1 parent f579690 commit 9a87757
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bindings/odin/build-clay-lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cp ../../clay.h clay.c;
# Intel Mac
clang -c -DCLAY_IMPLEMENTATION -o clay.o -static -target x86_64-apple-darwin clay.c -fPIC && ar r clay-odin/macos/clay.a clay.o;
# ARM Mac
clang -c -DCLAY_IMPLEMENTATION -DCLAY_DEBUG -o clay.o -static clay.c && ar r clay-odin/macos-arm64/clay.a clay.o;
clang -c -DCLAY_IMPLEMENTATION -o clay.o -static clay.c -fPIC && ar r clay-odin/macos-arm64/clay.a clay.o;
# x64 Windows
clang -c -DCLAY_IMPLEMENTATION -o clay-odin/windows/clay.lib -target x86_64-pc-windows-msvc -fuse-ld=llvm-lib -static clay.c;
# Linux
Expand Down
3 changes: 2 additions & 1 deletion bindings/odin/clay-odin/clay.odin
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ SizingType :: enum EnumBackingType {
FIT,
GROW,
PERCENT,
FIXED,
}

SizingConstraintsMinMax :: struct {
Expand Down Expand Up @@ -398,7 +399,7 @@ SizingGrow :: proc(sizeMinMax: SizingConstraintsMinMax) -> SizingAxis {
}

SizingFixed :: proc(size: c.float) -> SizingAxis {
return SizingAxis{type = SizingType.FIT, constraints = {sizeMinMax = {size, size}}}
return SizingAxis{type = SizingType.FIXED, constraints = {sizeMinMax = {size, size}}}
}

SizingPercent :: proc(sizePercent: c.float) -> SizingAxis {
Expand Down
Binary file modified bindings/odin/clay-odin/linux/clay.a
Binary file not shown.
Binary file modified bindings/odin/clay-odin/macos-arm64/clay.a
Binary file not shown.
Binary file modified bindings/odin/clay-odin/macos/clay.a
Binary file not shown.
Binary file modified bindings/odin/clay-odin/windows/clay.lib
Binary file not shown.
2 changes: 1 addition & 1 deletion examples/raylib-sidebar-scrolling-container/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ FetchContent_MakeAvailable(raylib)

add_executable(clay_examples_raylib_sidebar_scrolling_container main.c multi-compilation-unit.c)

target_compile_options(clay_examples_raylib_sidebar_scrolling_container PUBLIC -DCLAY_DEBUG -Wall -Werror -Wno-unknown-pragmas)
target_compile_options(clay_examples_raylib_sidebar_scrolling_container PUBLIC -Wall -Werror -Wno-unknown-pragmas)
target_include_directories(clay_examples_raylib_sidebar_scrolling_container PUBLIC .)

target_link_libraries(clay_examples_raylib_sidebar_scrolling_container PUBLIC raylib)
Expand Down

0 comments on commit 9a87757

Please sign in to comment.