Fixes for Apple Silicon

This commit is contained in:
Luke Street 2021-01-06 20:46:56 -05:00
parent ced84a1eb8
commit fe9e74561e
4 changed files with 9 additions and 9 deletions

2
hecl/extern/athena vendored

@ -1 +1 @@
Subproject commit f298113c4ee410f561731921f4cabacdb8ddc232
Subproject commit 385392349a6b7647a155e3743a6fb35e61dc4d3c

2
hecl/extern/boo vendored

@ -1 +1 @@
Subproject commit 6ae9e93d31f74c6e7168a49ccf85d4fda31205e7
Subproject commit 6faff77f86381dee6ace365aa2f8105cae4c5cd1

View File

@ -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)

View File

@ -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