Browse Source

stupid macos

lizzie/ios-port-sud
lizzie 2 weeks ago
parent
commit
ab77cb7537
  1. 1
      .ci/ios/build.sh
  2. 2
      externals/cmake-modules/DetectPlatform.cmake
  3. 6
      src/common/host_memory.cpp

1
.ci/ios/build.sh

@ -13,6 +13,7 @@ fi
cmake -G Xcode -B build \ cmake -G Xcode -B build \
-DCMAKE_TOOLCHAIN_FILE="$WORK_DIR/.ci/ios/ios-toolchain.cmake" \ -DCMAKE_TOOLCHAIN_FILE="$WORK_DIR/.ci/ios/ios-toolchain.cmake" \
-DPLATFORM=OS64 \ -DPLATFORM=OS64 \
-DDEPLOYMENT_TARGET=16.0 \
-DCOCOA_LIBRARY="$IOS_SDK/System/Library/Frameworks/Cocoa.framework" \ -DCOCOA_LIBRARY="$IOS_SDK/System/Library/Frameworks/Cocoa.framework" \
-DENABLE_LIBUSB=OFF \ -DENABLE_LIBUSB=OFF \
-DENABLE_UPDATE_CHECKER=OFF \ -DENABLE_UPDATE_CHECKER=OFF \

2
externals/cmake-modules/DetectPlatform.cmake

@ -53,7 +53,7 @@ endif()
# This fixes some quirks with xcrun or weird iOS toolchain cmake files # This fixes some quirks with xcrun or weird iOS toolchain cmake files
if (IOS) if (IOS)
unser(CXX_CLANG)
unset(CXX_CLANG)
set(CXX_APPLE ON) set(CXX_APPLE ON)
endif() endif()

6
src/common/host_memory.cpp

@ -27,11 +27,15 @@
#include <sys/random.h> #include <sys/random.h>
#elif defined(__APPLE__) #elif defined(__APPLE__)
#include <sys/types.h> #include <sys/types.h>
#include <sys/random.h>
#include <mach/vm_map.h> #include <mach/vm_map.h>
#include <mach/mach.h> #include <mach/mach.h>
#endif #endif
// Not available on iOS for some fucking stupid reason...
#if defined(__APPLE__) && TARGET_OS_MAC
#include <sys/random.h>
#endif
// FreeBSD // FreeBSD
#ifndef MAP_NORESERVE #ifndef MAP_NORESERVE
#define MAP_NORESERVE 0 #define MAP_NORESERVE 0

Loading…
Cancel
Save