[macOS] Build infrastructure and portability fixes

Build system:
- Enable ObjC++, macOS deployment target, framework linking
- Fix AppleClang detection
- macOS platform name for output directories
- Skip Vulkan on macOS, null graphics without Vulkan dependency
- macOS SDL2 framework detection and discord-rpc macOS sources

Portability fixes:
- mach_absolute_time for macOS tick counting
- _NSGetExecutablePath for macOS
- guard MAP_FIXED_NOREPLACE, ftruncate64->ftruncate
- guard Vulkan include/usage, fix data root for all POSIX
This commit is contained in:
Herman S.
2026-03-27 02:28:34 +09:00
parent 1af96481b2
commit 57c4051eca
8 changed files with 95 additions and 16 deletions

View File

@@ -121,6 +121,12 @@ if(WIN32)
discord-rpc/src/connection_win.cpp
discord-rpc/src/discord_register_win.cpp
)
elseif(APPLE)
target_sources(discord-rpc PRIVATE
discord-rpc/src/connection_unix.cpp
discord-rpc/src/discord_register_osx.m
)
target_link_libraries(discord-rpc PRIVATE "-framework AppKit")
elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
target_sources(discord-rpc PRIVATE
discord-rpc/src/connection_unix.cpp