Files
obs-studio/frontend/cmake/os-macos.cmake
Warchamp7 14572498dc frontend: Adjust application shutdown logic
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.
2025-12-01 16:40:34 -05:00

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>"
)