From fe9e74561e2309d6c3d02bb41326c9fb3eae52f1 Mon Sep 17 00:00:00 2001 From: Luke Street Date: Wed, 6 Jan 2021 20:46:56 -0500 Subject: [PATCH] Fixes for Apple Silicon --- hecl/extern/athena | 2 +- hecl/extern/boo | 2 +- hecl/extern/libpng/CMakeLists.txt | 7 +++++-- hecl/lib/Runtime/FileStoreManager.cpp | 7 ++----- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/hecl/extern/athena b/hecl/extern/athena index f298113c4..385392349 160000 --- a/hecl/extern/athena +++ b/hecl/extern/athena @@ -1 +1 @@ -Subproject commit f298113c4ee410f561731921f4cabacdb8ddc232 +Subproject commit 385392349a6b7647a155e3743a6fb35e61dc4d3c diff --git a/hecl/extern/boo b/hecl/extern/boo index 6ae9e93d3..6faff77f8 160000 --- a/hecl/extern/boo +++ b/hecl/extern/boo @@ -1 +1 @@ -Subproject commit 6ae9e93d31f74c6e7168a49ccf85d4fda31205e7 +Subproject commit 6faff77f86381dee6ace365aa2f8105cae4c5cd1 diff --git a/hecl/extern/libpng/CMakeLists.txt b/hecl/extern/libpng/CMakeLists.txt index 48c71d942..d3ba5e867 100644 --- a/hecl/extern/libpng/CMakeLists.txt +++ b/hecl/extern/libpng/CMakeLists.txt @@ -3,13 +3,13 @@ find_library(PNG_LIB NAMES png libpng) endif() if(NOT PNG_LIB) message(STATUS "Using HECL's built-in libpng") -if(NX) +if("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "arm(64)?") set(INTRINSICS arm/arm_init.c arm/filter_neon.S arm/filter_neon_intrinsics.c arm/palette_neon_intrinsics.c) -else() +elseif(${CMAKE_SYSTEM_PROCESSOR} STREQUAL x86_64) set(INTRINSICS intel/filter_sse2_intrinsics.c intel/intel_init.c) @@ -39,6 +39,9 @@ add_library(png pngwtran.c pngwutil.c ${INTRINSICS}) +if(APPLE) + target_compile_options(png PRIVATE -Wno-implicit-fallthrough) +endif() target_link_libraries(png PUBLIC ${ZLIB_LIBRARIES}) target_include_directories(png PUBLIC ${ZLIB_INCLUDE_DIR}) set(PNG_LIBRARIES png CACHE PATH "PNG libraries" FORCE) diff --git a/hecl/lib/Runtime/FileStoreManager.cpp b/hecl/lib/Runtime/FileStoreManager.cpp index dd4048412..1dfe59a59 100644 --- a/hecl/lib/Runtime/FileStoreManager.cpp +++ b/hecl/lib/Runtime/FileStoreManager.cpp @@ -49,12 +49,9 @@ FileStoreManager::FileStoreManager(SystemStringView domain) : m_domain(domain) { path = home; path += "/.local/share"; } - path += "/hecl"; - if (mkdir(path.c_str(), 0755) && errno != EEXIST) - Log.report(logvisor::Fatal, FMT_STRING("unable to mkdir at {}"), path); - path += '/'; + path += "/hecl/"; path += domain.data(); - if (mkdir(path.c_str(), 0755) && errno != EEXIST) + if (RecursiveMakeDir(path.c_str()) != 0) Log.report(logvisor::Fatal, FMT_STRING("unable to mkdir at {}"), path); m_storeRoot = path; #endif