mirror of
https://github.com/ARMSX2/ARMSX2.git
synced 2026-08-24 16:50:16 -07:00
Gate all macOS-only system APIs behind TARGET_OS_IPHONE checks across the shared core: ApplicationServices, IOKit, mouse APIs, AppKit, MetalFX, CDVD Darwin sources, USB, discord-rpc, cubeb CoreAudio HAL, and BSD networking headers in DEV9. Port TARGET_OS_IPHONE guards for DEV9 AdapterUtils with iOS fallbacks for sockaddr_dl, rt_msghdr, and sysctl. Add ARMSX2_ROOT to the include path for the frontend's common include style. Drop the global _M_ARM64 define that triggered fast_float MSVC intrin.h inclusion since __aarch64__ covers the core paths. Gate MTLFeatureSet_macOS_GPUFamily1_v1 behind !TARGET_OS_IPHONE. Fix missing unistd.h and gate pthread_jit_write_protect_np which is unavailable on iOS. Add stubs for DarwinMisc JIT diagnostics, Achievements stats and info APIs, Discord_Register, Host capture callbacks, and the host hotkeys map so the frontend links cleanly. Merge upstream master.
42 lines
961 B
CMake
42 lines
961 B
CMake
set(SRCS
|
|
include/discord_register.h
|
|
include/discord_rpc.h
|
|
src/backoff.h
|
|
src/connection.h
|
|
src/discord_rpc.cpp
|
|
src/msg_queue.h
|
|
src/rpc_connection.cpp
|
|
src/rpc_connection.h
|
|
src/serialization.cpp
|
|
src/serialization.h
|
|
)
|
|
|
|
add_library(discord-rpc ${SRCS})
|
|
target_include_directories(discord-rpc PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include")
|
|
target_link_libraries(discord-rpc rapidjson)
|
|
|
|
# Needed for macOS compile.
|
|
set_property(TARGET discord-rpc PROPERTY CXX_STANDARD 17)
|
|
set_property(TARGET discord-rpc PROPERTY CXX_STANDARD_REQUIRED ON)
|
|
|
|
if(WIN32)
|
|
target_sources(discord-rpc PRIVATE
|
|
src/connection_win.cpp
|
|
src/discord_register_win.cpp
|
|
)
|
|
elseif(APPLE AND IOS)
|
|
target_sources(discord-rpc PRIVATE
|
|
src/connection_unix.cpp
|
|
)
|
|
elseif(APPLE)
|
|
target_sources(discord-rpc PRIVATE
|
|
src/connection_unix.cpp
|
|
src/discord_register_osx.m
|
|
)
|
|
elseif(UNIX)
|
|
target_sources(discord-rpc PRIVATE
|
|
src/connection_unix.cpp
|
|
src/discord_register_linux.cpp
|
|
)
|
|
endif()
|