From a00057a45e5df8994fa89aba7fc22a8f32e1dd7f Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Sun, 28 Feb 2021 11:25:42 +0400 Subject: [PATCH 1/7] Add external_glibmm module --- external/CMakeLists.txt | 1 + external/glibmm/CMakeLists.txt | 40 ++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 external/glibmm/CMakeLists.txt diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt index e1a3f1b..f004227 100644 --- a/external/CMakeLists.txt +++ b/external/CMakeLists.txt @@ -26,6 +26,7 @@ endif() add_checked_subdirectory(ffmpeg) if (LINUX) add_checked_subdirectory(glib) + add_checked_subdirectory(glibmm) endif() add_checked_subdirectory(gsl) if (LINUX AND NOT DESKTOP_APP_DISABLE_DBUS_INTEGRATION) diff --git a/external/glibmm/CMakeLists.txt b/external/glibmm/CMakeLists.txt new file mode 100644 index 0000000..8c53c5e --- /dev/null +++ b/external/glibmm/CMakeLists.txt @@ -0,0 +1,40 @@ +# This file is part of Desktop App Toolkit, +# a set of libraries for developing nice desktop applications. +# +# For license and copyright information please follow this link: +# https://github.com/desktop-app/legal/blob/master/LEGAL + +add_library(external_glibmm INTERFACE IMPORTED GLOBAL) +add_library(desktop-app::external_glibmm ALIAS external_glibmm) + +find_package(PkgConfig REQUIRED) +pkg_check_modules(GLIBMM REQUIRED IMPORTED_TARGET glibmm-2.4) +pkg_check_modules(GIOMM REQUIRED IMPORTED_TARGET giomm-2.4) + +if (DESKTOP_APP_USE_PACKAGED) + target_link_libraries(external_glibmm + INTERFACE + PkgConfig::GIOMM + PkgConfig::GLIBMM + ) +else() + target_include_directories(external_glibmm + INTERFACE + ${GIOMM_INCLUDE_DIRS} + ${GLIBMM_INCLUDE_DIRS} + ) + + target_link_static_libraries(external_glibmm + INTERFACE + giomm-2.4 + glibmm-2.4 + sigc-2.0 + ) + + target_link_libraries(external_glibmm + INTERFACE + gio-2.0 + gobject-2.0 + glib-2.0 + ) +endif() From 80e188984ac4f2a40ff615deb1faa4ef8f6b73fe Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Mon, 1 Mar 2021 11:40:00 +0400 Subject: [PATCH 2/7] Add gio_unix include path to external_glib --- external/glib/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/external/glib/CMakeLists.txt b/external/glib/CMakeLists.txt index 55c277e..05b51eb 100644 --- a/external/glib/CMakeLists.txt +++ b/external/glib/CMakeLists.txt @@ -11,10 +11,12 @@ find_package(PkgConfig REQUIRED) pkg_check_modules(GLIB2 REQUIRED IMPORTED_TARGET glib-2.0) pkg_check_modules(GOBJECT REQUIRED IMPORTED_TARGET gobject-2.0) pkg_check_modules(GIO REQUIRED IMPORTED_TARGET gio-2.0) +pkg_check_modules(GIO_UNIX REQUIRED IMPORTED_TARGET gio-unix-2.0) if (DESKTOP_APP_USE_PACKAGED) target_link_libraries(external_glib INTERFACE + PkgConfig::GIO_UNIX PkgConfig::GIO PkgConfig::GOBJECT PkgConfig::GLIB2 @@ -22,6 +24,7 @@ if (DESKTOP_APP_USE_PACKAGED) else() target_include_directories(external_glib INTERFACE + ${GIO_UNIX_INCLUDE_DIRS} ${GIO_INCLUDE_DIRS} ${GOBJECT_INCLUDE_DIRS} ${GLIB2_INCLUDE_DIRS} From 3a985882d75c2cbe8648317c05b6388c1e7bdf1a Mon Sep 17 00:00:00 2001 From: John Preston Date: Tue, 2 Mar 2021 17:09:45 +0400 Subject: [PATCH 3/7] Add WebKit framework on macOS. --- options_mac.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/options_mac.cmake b/options_mac.cmake index 6411cc8..ba1b16f 100644 --- a/options_mac.cmake +++ b/options_mac.cmake @@ -74,6 +74,7 @@ INTERFACE QuartzCore AppKit CoreWLAN + WebKit IOKit GSS ) From 03346be7c54177485441734d9c017d4a9fcf630f Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Wed, 3 Mar 2021 22:41:31 +0400 Subject: [PATCH 4/7] Build with QT_NO_KEYWORDS --- options.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/options.cmake b/options.cmake index 9a8729f..7a9c252 100644 --- a/options.cmake +++ b/options.cmake @@ -10,6 +10,7 @@ add_library(desktop-app::common_options ALIAS common_options) target_compile_definitions(common_options INTERFACE $,_DEBUG,NDEBUG> + QT_NO_KEYWORDS QT_NO_CAST_FROM_BYTEARRAY ) From 2f4cbdd1263ad350776413633bb01e8122147274 Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Thu, 4 Mar 2021 00:21:53 +0400 Subject: [PATCH 5/7] Add new fcitx5-qt sources --- external/fcitx5_qt5/CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/external/fcitx5_qt5/CMakeLists.txt b/external/fcitx5_qt5/CMakeLists.txt index 128e0a1..e2e9517 100644 --- a/external/fcitx5_qt5/CMakeLists.txt +++ b/external/fcitx5_qt5/CMakeLists.txt @@ -24,6 +24,12 @@ else() PRIVATE qfcitxplatforminputcontext.cpp qfcitxplatforminputcontext.h + fcitxcandidatewindow.cpp + fcitxcandidatewindow.h + fcitxtheme.cpp + fcitxtheme.h + font.cpp + font.h qtkey.cpp main.cpp main.h From 25f0733a602f8b44a31d555f2410e10e10b0dfe5 Mon Sep 17 00:00:00 2001 From: Nicholas Guriev Date: Thu, 4 Mar 2021 18:58:03 +0300 Subject: [PATCH 6/7] Do not enforce NDEBUG macro It affects WebRTC classes which may vary their size that eventually leads to memory corruption and crashes. CMake already defines the macro for production build types. One can use a custom build type which does not imply NDEBUG. Please note, tg_owt and tdesktop must be build with the same CMAKE_BUILD_TYPE. --- options.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/options.cmake b/options.cmake index 7a9c252..82fb6e3 100644 --- a/options.cmake +++ b/options.cmake @@ -9,7 +9,7 @@ add_library(desktop-app::common_options ALIAS common_options) target_compile_definitions(common_options INTERFACE - $,_DEBUG,NDEBUG> + $<$:_DEBUG> QT_NO_KEYWORDS QT_NO_CAST_FROM_BYTEARRAY ) From bd9c097fea8b1f9deefa5b541a288e628ec732f5 Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Wed, 17 Mar 2021 12:33:50 +0300 Subject: [PATCH 7/7] Added option to disable PDB file generation. --- options_win.cmake | 1 + variables.cmake | 1 + 2 files changed, 2 insertions(+) diff --git a/options_win.cmake b/options_win.cmake index 362dd4e..bd43547 100644 --- a/options_win.cmake +++ b/options_win.cmake @@ -35,6 +35,7 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") target_link_options(common_options INTERFACE $,/NODEFAULTLIB:LIBCMT,/DEBUG;/OPT:REF> + $<$:/DEBUG:NONE> ) if (build_win64) diff --git a/variables.cmake b/variables.cmake index d90bddc..7e683a7 100644 --- a/variables.cmake +++ b/variables.cmake @@ -42,6 +42,7 @@ option(DESKTOP_APP_DISABLE_CRASH_REPORTS "Disable crash report generation." ${no option(DESKTOP_APP_DISABLE_AUTOUPDATE "Disable autoupdate." ${disable_autoupdate}) option(DESKTOP_APP_USE_HUNSPELL_ONLY "Disable system spellchecker and use bundled Hunspell only. (For debugging purposes)" OFF) option(DESKTOP_APP_USE_ENCHANT "Use Enchant instead of bundled Hunspell. (Linux only)" OFF) +option(DESKTOP_APP_NO_PDB "Disable PDB file generation. (Windows only)" OFF) set(DESKTOP_APP_QTWAYLANDCLIENT_PRIVATE_HEADERS "" CACHE STRING "QtWaylandClient headers location.") set(dont_bundle_fonts 0)