From 6bd7a84ddd72da73478e2354923ac3ce60c6d48a Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Thu, 10 Aug 2023 00:26:45 -0500 Subject: [PATCH] [ox] Cleanup, fix GBA build --- deps/ox/src/ox/CMakeLists.txt | 13 +++++++++++-- deps/ox/src/ox/fs/CMakeLists.txt | 2 +- deps/ox/src/ox/logconn/CMakeLists.txt | 2 +- deps/ox/src/ox/std/CMakeLists.txt | 4 ++-- 4 files changed, 15 insertions(+), 6 deletions(-) diff --git a/deps/ox/src/ox/CMakeLists.txt b/deps/ox/src/ox/CMakeLists.txt index 0a4e3ed0..4a9985f6 100644 --- a/deps/ox/src/ox/CMakeLists.txt +++ b/deps/ox/src/ox/CMakeLists.txt @@ -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) diff --git a/deps/ox/src/ox/fs/CMakeLists.txt b/deps/ox/src/ox/fs/CMakeLists.txt index 0a91c7ed..54a8a62c 100644 --- a/deps/ox/src/ox/fs/CMakeLists.txt +++ b/deps/ox/src/ox/fs/CMakeLists.txt @@ -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 diff --git a/deps/ox/src/ox/logconn/CMakeLists.txt b/deps/ox/src/ox/logconn/CMakeLists.txt index da2a1427..e505fdb6 100644 --- a/deps/ox/src/ox/logconn/CMakeLists.txt +++ b/deps/ox/src/ox/logconn/CMakeLists.txt @@ -20,7 +20,7 @@ target_link_libraries( OxLogConn PUBLIC OxStd OxMetalClaw - $<$:pthread> + $<$:pthread> ) install( diff --git a/deps/ox/src/ox/std/CMakeLists.txt b/deps/ox/src/ox/std/CMakeLists.txt index cc05670c..e87462f9 100644 --- a/deps/ox/src/ox/std/CMakeLists.txt +++ b/deps/ox/src/ox/std/CMakeLists.txt @@ -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