From e55359ddc139c2a6296b67990dee47478a4fadc8 Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Fri, 12 Jul 2024 12:00:43 -0400 Subject: [PATCH] Enable C++ exceptions even when building with QtMultimedia This is also needed in blurhash.cpp, which breaks in certain system configurations that don't enable exceptions by default. Now it's turned on regardless of the USE_QTMULTIMEDIA CMake option. I also added a note for future people to discover why this is turned on. --- src/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index bca2cc094..73a8345ed 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -361,9 +361,11 @@ else() utils/mpvplayer.h ) target_link_libraries(tokodon_static PUBLIC MpvQt::MpvQt) - target_compile_options(tokodon_static PRIVATE -fexceptions) endif() +# NOTE: Needed for MPV, but also for blurhash.cpp. We can look into making this more selective lter. +target_compile_options(tokodon_static PRIVATE -fexceptions) + if (USE_QTWEBVIEW) qt_target_qml_sources(tokodon_static QML_FILES -- GitLab