mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-08 13:44:56 +00:00
Fixes for Apple Silicon
This commit is contained in:
2
hecl/extern/athena
vendored
2
hecl/extern/athena
vendored
Submodule hecl/extern/athena updated: f298113c4e...385392349a
2
hecl/extern/boo
vendored
2
hecl/extern/boo
vendored
Submodule hecl/extern/boo updated: 6ae9e93d31...6faff77f86
7
hecl/extern/libpng/CMakeLists.txt
vendored
7
hecl/extern/libpng/CMakeLists.txt
vendored
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user