[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:
@@ -1,7 +1,11 @@
|
||||
add_library(xenia-gpu-null STATIC)
|
||||
xe_platform_sources(xenia-gpu-null ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
target_include_directories(xenia-gpu-null PRIVATE
|
||||
${PROJECT_SOURCE_DIR}/third_party/Vulkan-Headers/include
|
||||
)
|
||||
target_link_libraries(xenia-gpu-null PUBLIC xenia-base xenia-gpu xenia-ui xenia-ui-vulkan xxhash)
|
||||
if(APPLE)
|
||||
target_link_libraries(xenia-gpu-null PUBLIC xenia-base xenia-gpu xenia-ui xxhash)
|
||||
else()
|
||||
target_include_directories(xenia-gpu-null PRIVATE
|
||||
${PROJECT_SOURCE_DIR}/third_party/Vulkan-Headers/include
|
||||
)
|
||||
target_link_libraries(xenia-gpu-null PUBLIC xenia-base xenia-gpu xenia-ui xenia-ui-vulkan xxhash)
|
||||
endif()
|
||||
xe_target_defaults(xenia-gpu-null)
|
||||
|
||||
@@ -10,7 +10,9 @@
|
||||
#include "xenia/gpu/null/null_graphics_system.h"
|
||||
|
||||
#include "xenia/gpu/null//null_command_processor.h"
|
||||
#if !XE_PLATFORM_MAC
|
||||
#include "xenia/ui/vulkan/vulkan_provider.h"
|
||||
#endif
|
||||
#include "xenia/xbox.h"
|
||||
|
||||
namespace xe {
|
||||
@@ -25,9 +27,13 @@ X_STATUS NullGraphicsSystem::Setup(cpu::Processor* processor,
|
||||
kernel::KernelState* kernel_state,
|
||||
ui::WindowedAppContext* app_context,
|
||||
bool with_presentation) {
|
||||
#if XE_PLATFORM_MAC
|
||||
provider_ = nullptr;
|
||||
#else
|
||||
// This is a null graphics system, but we still setup vulkan because UI needs
|
||||
// it through us :|
|
||||
provider_ = xe::ui::vulkan::VulkanProvider::Create(false, with_presentation);
|
||||
#endif
|
||||
return GraphicsSystem::Setup(processor, kernel_state, app_context,
|
||||
with_presentation);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user