Add ability to compile on iOS

This commit is contained in:
The-SamminAter committed 2023-06-24 17:19:46 -07:00
1 parent 043ff257c4
commit 9f87b6dd9c
6 files changed
+40 -4

No files matched your search

+7 -1
View File
@@ -380,7 +380,13 @@ message(STATUS "CMAKE_SYSTEM_PROCESSOR := ${CMAKE_SYSTEM_PROCESSOR}")
if (APPLE)
message(STATUS "Apple device detected.")
set(ADDITIONAL_SRC ${PM3_ROOT}/client/src/util_darwin.h ${PM3_ROOT}/client/src/util_darwin.m ${ADDITIONAL_SRC})
set(ADDITIONAL_LNK "-framework Foundation" "-framework AppKit")
if (EXISTS /private/var/mobile)
message(STATUS "iOS detected.")
set(ADDITIONAL_LNK "-framework Foundation" "-framework UIKit")
else
message(STATUS "macOS detected.")
set(ADDITIONAL_LNK "-framework Foundation" "-framework AppKit")
endif (EXISTS /private/var/mobile)
endif (APPLE)
if ((NOT SKIPQT EQUAL 1) AND (Qt5_FOUND))
+7 -1
View File
@@ -434,7 +434,13 @@ LDFLAGS += $(MYLDFLAGS)
PM3LDFLAGS = $(LDFLAGS)
ifeq ($(platform),Darwin)
PM3LDFLAGS += -framework Foundation -framework AppKit
ifeq ($(shell uname -p),arm64)
# The platform is iOS
PM3LDFLAGS += -framework Foundation -framework UIKit
else
# M* macOS devices return arm
PM3LDFLAGS += -framework Foundation -framework AppKit
endif
endif
###################
+3
View File
@@ -22,6 +22,9 @@ endif
ifneq ($(findstring aarch64, $(cpu_arch)), )
IS_SIMD_ARCH=arm64
endif
ifneq ($(findstring iP, $(cpu_arch)), )
IS_SIMD_ARCH=arm64
endif
ifneq ($(IS_SIMD_ARCH), )
MULTIARCHSRCS = hardnested_bf_core.c hardnested_bitarray_core.c
+7 -1
View File
@@ -380,7 +380,13 @@ message(STATUS "CMAKE_SYSTEM_PROCESSOR := ${CMAKE_SYSTEM_PROCESSOR}")
if (APPLE)
message(STATUS "Apple device detected.")
set(ADDITIONAL_SRC ${PM3_ROOT}/client/src/util_darwin.h ${PM3_ROOT}/client/src/util_darwin.m ${ADDITIONAL_SRC})
set(ADDITIONAL_LNK "-framework Foundation" "-framework AppKit")
if (EXISTS /private/var/mobile)
message(STATUS "iOS detected.")
set(ADDITIONAL_LNK "-framework Foundation" "-framework UIKit")
else
message(STATUS "macOS detected.")
set(ADDITIONAL_LNK "-framework Foundation" "-framework AppKit")
endif (EXISTS /private/var/mobile)
endif (APPLE)
if ((NOT SKIPQT EQUAL 1) AND (Qt5_FOUND))