cmake: Enable exceptions when building with KDE support
authorManuel Nickschas <sputnick@quassel-irc.org>
Tue, 17 Jul 2018 21:03:13 +0000 (23:03 +0200)
committerManuel Nickschas <sputnick@quassel-irc.org>
Tue, 17 Jul 2018 21:03:13 +0000 (23:03 +0200)
The KDE cmake integration disables exceptions by default. Enable
exceptions explicitly in the build system so our code builds.

CMakeLists.txt

index a59ab82..d968a68 100644 (file)
@@ -571,7 +571,7 @@ if (KDE4_FOUND)
     set(EMBED_DATA OFF)
 
     # Better have the compile flags global, even for the core, to avoid problems with linking the mono client
     set(EMBED_DATA OFF)
 
     # Better have the compile flags global, even for the core, to avoid problems with linking the mono client
-    add_definitions(-DHAVE_KDE -DHAVE_KDE4 ${KDE4_DEFINITIONS})
+    add_definitions(-DHAVE_KDE -DHAVE_KDE4 ${KDE4_DEFINITIONS} ${KDE4_ENABLE_EXCEPTIONS})
     set(WITH_KDE4 TRUE)
 endif()
 
     set(WITH_KDE4 TRUE)
 endif()
 
@@ -583,6 +583,7 @@ if (USE_QT5 AND WITH_KDE)
     include(KDECompilerSettings)
     include(KDECMakeSettings)
 
     include(KDECompilerSettings)
     include(KDECMakeSettings)
 
+    kde_enable_exceptions()
     add_definitions(-DHAVE_KDE -DHAVE_KF5)
     set(WITH_KF5 TRUE)
 endif()
     add_definitions(-DHAVE_KDE -DHAVE_KF5)
     set(WITH_KF5 TRUE)
 endif()