mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-05-12 17:35:49 -04:00
Improves app shutdown in a few ways, including separating out different pieces of the OBSBasic close handler into their own functions. Removes the crash handler sentinel earlier when the main window is closed, preventing unclean shutdown warnings when a plugin causes issues. While not ideal, the dialog is not useful when we cannot specify which plugin caused the problem. Increases shutdown priority of the main application so that when OBS interrupts the session ending, CEF is not closed at the same time. This fixes a crash. Additional safeguards and event handling to try to ensure a smoother shutdown.
35 lines
990 B
CMake
35 lines
990 B
CMake
include(cmake/feature-sparkle.cmake)
|
|
|
|
target_sources(
|
|
obs-studio
|
|
PRIVATE
|
|
dialogs/OBSPermissions.cpp
|
|
dialogs/OBSPermissions.hpp
|
|
forms/OBSPermissions.ui
|
|
utility/CrashHandler_MacOS.mm
|
|
utility/NativeEventFilter.cpp
|
|
utility/platform-osx.mm
|
|
utility/system-info-macos.mm
|
|
)
|
|
target_compile_options(obs-studio PRIVATE -Wno-quoted-include-in-framework-header -Wno-comma)
|
|
|
|
list(APPEND _frontend_objcxx_compile_options -fobjc-arc -fmodules -fcxx-modules)
|
|
|
|
set_property(
|
|
SOURCE utility/platform-osx.mm utility/CrashHandler_MacOS.mm
|
|
APPEND
|
|
PROPERTY COMPILE_OPTIONS ${_frontend_objcxx_compile_options}
|
|
)
|
|
|
|
if(CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 14.0.3)
|
|
target_compile_options(obs-studio PRIVATE -Wno-error=unqualified-std-cast-call)
|
|
endif()
|
|
|
|
target_link_libraries(
|
|
obs-studio
|
|
PRIVATE
|
|
"$<LINK_LIBRARY:FRAMEWORK,AppKit.framework>"
|
|
"$<LINK_LIBRARY:FRAMEWORK,ApplicationServices.framework>"
|
|
"$<LINK_LIBRARY:FRAMEWORK,AVFoundation.framework>"
|
|
)
|