Xcode 14.3 and the macOS 13.3 platform SDK introduced a few breaking changes: * Updated AppleClang emits warnings about unqualified std cast calls when using C++ - as `move` is too broad a word, developers are to use `std::move` to make this explicit. Alas this is exactly what `json11` uses and because that library is archived, there is no possibility of an upstream update. * Apple guarded calls to old screen capture APIs as "available but deprecated", but seems to have chosen the wrong lower version boundary: The calls are flagged as being available for macOS 13 and macOS 14 only. To fix this, the existing macOS platform SDK header is replaced by a local copy that uses macOS 11 as the lower boundary (the oldest macOS version supported by obs-studio anyway)
21 lines
917 B
CMake
21 lines
917 B
CMake
if(NOT XCODE)
|
|
target_add_resource(obs-studio "${CMAKE_CURRENT_SOURCE_DIR}/cmake/macos/Assets.xcassets")
|
|
endif()
|
|
|
|
find_library(APPKIT Appkit)
|
|
find_library(AVFOUNDATION AVFoundation)
|
|
find_library(APPLICATIONSERVICES ApplicationServices)
|
|
mark_as_advanced(APPKIT AVFOUNDATION APPLICATIONSERVICES)
|
|
|
|
target_sources(obs-studio PRIVATE platform-osx.mm forms/OBSPermissions.ui window-permissions.cpp window-permissions.hpp)
|
|
|
|
set_source_files_properties(platform-osx.mm PROPERTIES COMPILE_FLAGS -fobjc-arc)
|
|
|
|
target_link_libraries(obs-studio PRIVATE ${APPKIT} ${AVFOUNDATION} ${APPLICATIONSERVICES})
|
|
|
|
target_compile_options(obs-studio PRIVATE -Wno-error=float-conversion -Wno-error=implicit-int-conversion
|
|
-Wno-error=shorten-64-to-32)
|
|
|
|
if(CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 14.0.3)
|
|
target_compile_options(obs-studio PRIVATE -Wno-error=unqualified-std-cast-call)
|
|
endif()
|