Browse Source

libobs: Add prerequisites for Metal and Swift support

PatTheMav 2 years ago
parent
commit
4dab2c51b8
2 changed files with 2 additions and 1 deletions
  1. 1 1
      libobs/cmake/os-macos.cmake
  2. 1 0
      libobs/graphics/graphics.h

+ 1 - 1
libobs/cmake/os-macos.cmake

@@ -26,7 +26,7 @@ target_sources(
     util/threading-posix.h
 )
 
-target_compile_options(libobs PUBLIC -Wno-strict-prototypes -Wno-shorten-64-to-32)
+target_compile_options(libobs PUBLIC "$<$<NOT:$<COMPILE_LANGUAGE:Swift>>:-Wno-strict-prototypes;-Wno-shorten-64-to-32>")
 
 set_property(SOURCE obs-cocoa.m util/platform-cocoa.m PROPERTY COMPILE_OPTIONS -fobjc-arc)
 set_property(TARGET libobs PROPERTY FRAMEWORK TRUE)

+ 1 - 0
libobs/graphics/graphics.h

@@ -500,6 +500,7 @@ struct gs_init_data {
 
 #define GS_DEVICE_OPENGL 1
 #define GS_DEVICE_DIRECT3D_11 2
+#define GS_DEVICE_METAL 3
 
 EXPORT const char *gs_get_device_name(void);
 EXPORT const char *gs_get_driver_version(void);