[ox/claw] Make Claw build in GBA builds, only without OC

This commit is contained in:
Gary Talent 2021-03-02 23:38:43 -06:00
parent 5d5917566f
commit dde4fb017e
4 changed files with 11 additions and 3 deletions

View File

@ -1,8 +1,8 @@
if(OX_USE_STDLIB)
add_subdirectory(claw)
add_subdirectory(oc)
endif()
add_subdirectory(clargs)
add_subdirectory(claw)
add_subdirectory(fs)
add_subdirectory(mc)
add_subdirectory(ptrarith)

View File

@ -8,7 +8,9 @@ add_library(
target_link_libraries(
OxClaw PUBLIC
OxMetalClaw
OxOrganicClaw
$<$<BOOL:OX_USE_STDLIB>:OxOrganicClaw>
)
add_subdirectory(test)
if(OX_RUN_TESTS)
add_subdirectory(test)
endif()

View File

@ -9,7 +9,9 @@
#pragma once
#include <ox/mc/read.hpp>
#ifdef OX_USE_STDLIB
#include <ox/oc/read.hpp>
#endif
#include <ox/std/string.hpp>
#include <ox/std/vector.hpp>
@ -43,11 +45,13 @@ Error readClaw(char *buff, std::size_t buffLen, T *val) {
MetalClawReader reader(bit_cast<uint8_t*>(header.value.data), buffLen);
return model(&reader, val);
}
#ifdef OX_USE_STDLIB
case ClawFormat::Organic:
{
OrganicClawReader reader(bit_cast<uint8_t*>(header.value.data), buffLen);
return model(&reader, val);
}
#endif
case ClawFormat::None:
return OxError(1);
}

View File

@ -9,7 +9,9 @@
#pragma once
#include <ox/mc/write.hpp>
#ifdef OX_USE_STDLIB
#include <ox/oc/write.hpp>
#endif
#include <ox/std/string.hpp>
#include <ox/std/vector.hpp>