[ox] Cleanup, fix GBA build

This commit is contained in:
Gary Talent 2023-08-10 00:26:45 -05:00
parent f4ef762952
commit 6bd7a84ddd
4 changed files with 15 additions and 6 deletions

View File

@ -1,5 +1,14 @@
set(OX_FREEBSD ${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
set(OX_LINUX ${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
if(${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
set(OX_OS_FREEBSD TRUE)
else()
set(OX_OS_FREEBSD FALSE)
endif()
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
set(OX_OS_LINUX TRUE)
else()
set(OX_OS_LINUX FALSE)
endif()
if(OX_USE_STDLIB)
add_subdirectory(oc)

View File

@ -16,7 +16,7 @@ if(NOT MSVC)
endif()
if(NOT OX_BARE_METAL)
if(NOT APPLE AND NOT MSVC AND NOT ${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
if(NOT APPLE AND NOT MSVC AND NOT ${OX_OS_FREEBSD})
target_link_libraries(
OxFS PUBLIC
stdc++fs

View File

@ -20,7 +20,7 @@ target_link_libraries(
OxLogConn PUBLIC
OxStd
OxMetalClaw
$<$<BOOL:OX_FREEBSD>:pthread>
$<$<BOOL:${OX_OS_FREEBSD}>:pthread>
)
install(

View File

@ -44,10 +44,10 @@ add_library(
if(NOT MSVC)
target_compile_options(OxStd PRIVATE -Wsign-conversion)
target_compile_options(OxStd PRIVATE -Wconversion)
if(${OX_LINUX})
if(${OX_OS_LINUX})
target_compile_options(OxStd PUBLIC -export-dynamic)
#target_link_options(OxStd PUBLIC -W1,-E)
elseif(${OX_FREEBSD})
elseif(${OX_OS_FREEBSD})
target_link_libraries(
OxStd PUBLIC
execinfo