1
0
Fork 0

Updated cmake sources to TDesktop version 3.5.2+95e806c

This commit is contained in:
Eric Kotato 2022-02-15 02:33:25 +03:00
commit edd3374526
44 changed files with 1447 additions and 1471 deletions

View file

@ -5,6 +5,9 @@
# https://github.com/desktop-app/legal/blob/master/LEGAL
add_subdirectory(external)
if (LINUX)
add_subdirectory(linux_jemalloc_helper)
endif()
if (LINUX AND NOT DESKTOP_APP_USE_PACKAGED)
add_subdirectory(linux_xcb_helper)
endif()

View file

@ -14,9 +14,6 @@ endmacro()
add_checked_subdirectory(angle)
add_checked_subdirectory(auto_updates)
add_checked_subdirectory(crash_reports)
if (LINUX AND NOT DESKTOP_APP_DISABLE_DBUS_INTEGRATION)
add_checked_subdirectory(dbusmenu_qt)
endif()
if (LINUX)
add_checked_subdirectory(dispatch)
endif()
@ -60,11 +57,9 @@ add_checked_subdirectory(qr_code_generator)
add_checked_subdirectory(ranges)
add_checked_subdirectory(rlottie)
add_checked_subdirectory(rnnoise)
if (LINUX AND NOT DESKTOP_APP_DISABLE_DBUS_INTEGRATION)
add_checked_subdirectory(statusnotifieritem)
endif()
add_checked_subdirectory(ton)
add_checked_subdirectory(variant)
add_checked_subdirectory(vpx)
add_checked_subdirectory(webrtc)
if (LINUX AND NOT DESKTOP_APP_DISABLE_X11_INTEGRATION)
add_checked_subdirectory(xcb)

View file

@ -24,9 +24,4 @@ else()
INTERFACE
lzma
)
target_link_libraries(external_xz
INTERFACE
${CMAKE_DL_LIBS}
)
endif()

View file

@ -1,82 +0,0 @@
# 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_dbusmenu_qt INTERFACE IMPORTED GLOBAL)
add_library(desktop-app::external_dbusmenu_qt ALIAS external_dbusmenu_qt)
if (DESKTOP_APP_USE_PACKAGED AND NOT DESKTOP_APP_QT6)
if (DESKTOP_APP_USE_PACKAGED_LAZY)
find_package(dbusmenu-qt5 QUIET)
else()
find_package(dbusmenu-qt5)
endif()
if (dbusmenu-qt5_FOUND)
target_link_libraries(external_dbusmenu_qt INTERFACE dbusmenu-qt5)
endif()
endif()
if (NOT dbusmenu-qt5_FOUND)
add_library(external_dbusmenu_qt_bundled STATIC)
init_target(external_dbusmenu_qt_bundled "(external)")
set(dbusmenu_qt_VERSION_MAJOR 0)
set(dbusmenu_qt_VERSION_MINOR 9)
set(dbusmenu_qt_VERSION_PATCH 2)
set(dbusmenu_qt_loc ${third_party_loc}/libdbusmenu-qt/src)
set_target_properties(external_dbusmenu_qt_bundled PROPERTIES AUTOMOC ON)
# QIcon::name was introduced in Qt 4.7.
set(HAVE_QICON_NAME ON)
configure_file(${dbusmenu_qt_loc}/dbusmenu_config.h.in "${CMAKE_CURRENT_BINARY_DIR}/dbusmenu_config.h" @ONLY)
configure_file(${dbusmenu_qt_loc}/dbusmenu_version.h.in "${CMAKE_CURRENT_BINARY_DIR}/dbusmenu_version.h")
nice_target_sources(external_dbusmenu_qt_bundled ${dbusmenu_qt_loc}
PRIVATE
dbusmenu_p.cpp
dbusmenuexporter.cpp
dbusmenuexporterdbus_p.cpp
dbusmenuimporter.cpp
dbusmenutypes_p.cpp
dbusmenushortcut_p.cpp
utils.cpp
)
if (DESKTOP_APP_QT6)
qt6_add_dbus_adaptor(dbusmenu_adaptor
${dbusmenu_qt_loc}/com.canonical.dbusmenu.xml
${dbusmenu_qt_loc}/dbusmenuexporterdbus_p.h
DBusMenuExporterDBus
)
else()
qt5_add_dbus_adaptor(dbusmenu_adaptor
${dbusmenu_qt_loc}/com.canonical.dbusmenu.xml
${dbusmenu_qt_loc}/dbusmenuexporterdbus_p.h
DBusMenuExporterDBus
)
endif()
target_sources(external_dbusmenu_qt_bundled PRIVATE ${dbusmenu_adaptor})
target_include_directories(external_dbusmenu_qt_bundled
PUBLIC
${dbusmenu_qt_loc}
"${CMAKE_CURRENT_BINARY_DIR}"
)
target_link_libraries(external_dbusmenu_qt_bundled
PRIVATE
desktop-app::external_qt
)
target_link_libraries(external_dbusmenu_qt
INTERFACE
external_dbusmenu_qt_bundled
)
endif()

View file

@ -61,7 +61,6 @@ INTERFACE
target_link_libraries(external_dispatch_bundled
INTERFACE
${dispatch_binary_dir}/src/BlocksRuntime/libBlocksRuntime.a
pthread
)
target_link_libraries(external_dispatch

View file

@ -16,12 +16,11 @@ if (DESKTOP_APP_USE_PACKAGED)
if (tl-expected_FOUND)
target_link_libraries(external_expected INTERFACE tl::expected)
return()
endif()
endif()
if (NOT tl-expected_FOUND)
target_include_directories(external_expected SYSTEM
INTERFACE
${third_party_loc}/expected/include
)
endif()
target_include_directories(external_expected SYSTEM
INTERFACE
${third_party_loc}/expected/include
)

View file

@ -7,79 +7,80 @@
if (DESKTOP_APP_USE_PACKAGED AND NOT DESKTOP_APP_USE_PACKAGED_LAZY)
add_library(external_fcitx5_qt INTERFACE IMPORTED GLOBAL)
add_library(desktop-app::external_fcitx5_qt ALIAS external_fcitx5_qt)
return()
endif()
add_library(external_fcitx5_qt STATIC)
add_library(desktop-app::external_fcitx5_qt ALIAS external_fcitx5_qt)
init_target(external_fcitx5_qt "(external)")
set(fcitx5_qt_loc ${third_party_loc}/fcitx5-qt)
if (DESKTOP_APP_QT6)
set(fcitx5_qt_src ${fcitx5_qt_loc}/qt6/platforminputcontext)
else()
add_library(external_fcitx5_qt STATIC)
add_library(desktop-app::external_fcitx5_qt ALIAS external_fcitx5_qt)
init_target(external_fcitx5_qt "(external)")
set(fcitx5_qt_src ${fcitx5_qt_loc}/qt5/platforminputcontext)
endif()
set(fcitx5_qt_loc ${third_party_loc}/fcitx5-qt)
set_target_properties(external_fcitx5_qt PROPERTIES AUTOMOC ON)
set(FCITX5_QT_EXTRA_PLUGIN_NAME "")
if (DESKTOP_APP_QT6)
set(fcitx5_qt_src ${fcitx5_qt_loc}/qt6/platforminputcontext)
else()
set(fcitx5_qt_src ${fcitx5_qt_loc}/qt5/platforminputcontext)
endif()
configure_file("${fcitx5_qt_src}/fcitx5.json.in" "${CMAKE_CURRENT_BINARY_DIR}/fcitx5.json")
set_target_properties(external_fcitx5_qt PROPERTIES AUTOMOC ON)
set(FCITX5_QT_EXTRA_PLUGIN_NAME "")
nice_target_sources(external_fcitx5_qt ${fcitx5_qt_src}
PRIVATE
qfcitxplatforminputcontext.cpp
qfcitxplatforminputcontext.h
fcitxcandidatewindow.cpp
fcitxcandidatewindow.h
fcitxtheme.cpp
fcitxtheme.h
font.cpp
font.h
qtkey.cpp
main.cpp
main.h
)
configure_file("${fcitx5_qt_src}/fcitx5.json.in" "${CMAKE_CURRENT_BINARY_DIR}/fcitx5.json")
target_include_directories(external_fcitx5_qt
PRIVATE
${fcitx5_qt_src}
${fcitx5_qt_loc}/common
)
nice_target_sources(external_fcitx5_qt ${fcitx5_qt_src}
PRIVATE
qfcitxplatforminputcontext.cpp
qfcitxplatforminputcontext.h
fcitxcandidatewindow.cpp
fcitxcandidatewindow.h
fcitxtheme.cpp
fcitxtheme.h
font.cpp
font.h
qtkey.cpp
main.cpp
main.h
)
target_compile_definitions(external_fcitx5_qt
PRIVATE
QT_STATICPLUGIN
FCITX_PLUGIN_DATA_FILE_PATH="${CMAKE_CURRENT_BINARY_DIR}/fcitx5.json"
)
target_include_directories(external_fcitx5_qt
PRIVATE
${fcitx5_qt_src}
${fcitx5_qt_loc}/common
)
add_subdirectory(fcitx5_qt_dbusaddons)
target_link_libraries(external_fcitx5_qt
PRIVATE
desktop-app::external_fcitx5_qt_dbusaddons
desktop-app::external_qt
desktop-app::external_xcb
)
target_compile_definitions(external_fcitx5_qt
PRIVATE
QT_STATICPLUGIN
FCITX_PLUGIN_DATA_FILE_PATH="${CMAKE_CURRENT_BINARY_DIR}/fcitx5.json"
)
if (DESKTOP_APP_USE_PACKAGED)
find_package(PkgConfig REQUIRED)
pkg_check_modules(XKBCOMMON REQUIRED IMPORTED_TARGET xkbcommon)
add_subdirectory(fcitx5_qt_dbusaddons)
target_link_libraries(external_fcitx5_qt
PRIVATE
desktop-app::external_fcitx5_qt_dbusaddons
desktop-app::external_qt
desktop-app::external_xcb
PkgConfig::XKBCOMMON
)
else()
find_package(PkgConfig REQUIRED)
pkg_check_modules(XKBCOMMON REQUIRED xkbcommon)
target_include_directories(external_fcitx5_qt SYSTEM
PUBLIC
${XKBCOMMON_INCLUDE_DIRS}
)
if (DESKTOP_APP_USE_PACKAGED)
find_package(PkgConfig REQUIRED)
pkg_check_modules(XKBCOMMON REQUIRED IMPORTED_TARGET xkbcommon)
target_link_libraries(external_fcitx5_qt
PRIVATE
PkgConfig::XKBCOMMON
)
else()
find_package(PkgConfig REQUIRED)
pkg_check_modules(XKBCOMMON REQUIRED xkbcommon)
target_include_directories(external_fcitx5_qt SYSTEM
PUBLIC
${XKBCOMMON_INCLUDE_DIRS}
)
target_link_static_libraries(external_fcitx5_qt
PRIVATE
xkbcommon
)
endif()
target_link_static_libraries(external_fcitx5_qt
PRIVATE
xkbcommon
)
endif()

View file

@ -7,59 +7,60 @@
if (DESKTOP_APP_USE_PACKAGED AND NOT DESKTOP_APP_USE_PACKAGED_LAZY)
add_library(external_fcitx5_qt_dbusaddons INTERFACE IMPORTED GLOBAL)
add_library(desktop-app::external_fcitx5_qt_dbusaddons ALIAS external_fcitx5_qt_dbusaddons)
return()
endif()
add_library(external_fcitx5_qt_dbusaddons STATIC)
add_library(desktop-app::external_fcitx5_qt_dbusaddons ALIAS external_fcitx5_qt_dbusaddons)
init_target(external_fcitx5_qt_dbusaddons "(external)")
set(fcitx5_qt_loc ${third_party_loc}/fcitx5-qt)
if (DESKTOP_APP_QT6)
set(fcitx5_qt_dbusaddons_src ${fcitx5_qt_loc}/qt6/dbusaddons)
else()
add_library(external_fcitx5_qt_dbusaddons STATIC)
add_library(desktop-app::external_fcitx5_qt_dbusaddons ALIAS external_fcitx5_qt_dbusaddons)
init_target(external_fcitx5_qt_dbusaddons "(external)")
set(fcitx5_qt_dbusaddons_src ${fcitx5_qt_loc}/qt5/dbusaddons)
endif()
set(fcitx5_qt_loc ${third_party_loc}/fcitx5-qt)
set_target_properties(external_fcitx5_qt_dbusaddons PROPERTIES AUTOMOC ON)
if (DESKTOP_APP_QT6)
set(fcitx5_qt_dbusaddons_src ${fcitx5_qt_loc}/qt6/dbusaddons)
else()
set(fcitx5_qt_dbusaddons_src ${fcitx5_qt_loc}/qt5/dbusaddons)
endif()
nice_target_sources(external_fcitx5_qt_dbusaddons ${fcitx5_qt_dbusaddons_src}
PRIVATE
fcitxqtwatcher.cpp
fcitxqtwatcher.h
fcitxqtdbustypes.cpp
fcitxqtdbustypes.h
fcitxqtinputcontextproxy.cpp
fcitxqtinputcontextproxy.h
fcitxqtinputcontextproxyimpl.cpp
fcitxqtinputmethodproxy.cpp
fcitxqtinputmethodproxy.h
fcitxqtcontrollerproxy.cpp
fcitxqtcontrollerproxy.h
)
set_target_properties(external_fcitx5_qt_dbusaddons PROPERTIES AUTOMOC ON)
include(GenerateExportHeader)
nice_target_sources(external_fcitx5_qt_dbusaddons ${fcitx5_qt_dbusaddons_src}
if (DESKTOP_APP_QT6)
generate_export_header(external_fcitx5_qt_dbusaddons BASE_NAME Fcitx5Qt6DBusAddons)
else()
generate_export_header(external_fcitx5_qt_dbusaddons BASE_NAME Fcitx5Qt5DBusAddons)
endif()
target_include_directories(external_fcitx5_qt_dbusaddons
PUBLIC
${fcitx5_qt_dbusaddons_src}
"${CMAKE_CURRENT_BINARY_DIR}"
)
if (NOT DESKTOP_APP_QT6)
target_compile_definitions(external_fcitx5_qt_dbusaddons
PRIVATE
fcitxqtwatcher.cpp
fcitxqtwatcher.h
fcitxqtdbustypes.cpp
fcitxqtdbustypes.h
fcitxqtinputcontextproxy.cpp
fcitxqtinputcontextproxy.h
fcitxqtinputcontextproxyimpl.cpp
fcitxqtinputmethodproxy.cpp
fcitxqtinputmethodproxy.h
fcitxqtcontrollerproxy.cpp
fcitxqtcontrollerproxy.h
)
include(GenerateExportHeader)
if (DESKTOP_APP_QT6)
generate_export_header(external_fcitx5_qt_dbusaddons BASE_NAME Fcitx5Qt6DBusAddons)
else()
generate_export_header(external_fcitx5_qt_dbusaddons BASE_NAME Fcitx5Qt5DBusAddons)
endif()
target_include_directories(external_fcitx5_qt_dbusaddons
PUBLIC
${fcitx5_qt_dbusaddons_src}
"${CMAKE_CURRENT_BINARY_DIR}"
)
if (NOT DESKTOP_APP_QT6)
target_compile_definitions(external_fcitx5_qt_dbusaddons
PRIVATE
FCITX5QT5DBUSADDONS_STATIC_DEFINE
)
endif()
target_link_libraries(external_fcitx5_qt_dbusaddons
PRIVATE
desktop-app::external_qt
FCITX5QT5DBUSADDONS_STATIC_DEFINE
)
endif()
target_link_libraries(external_fcitx5_qt_dbusaddons
PRIVATE
desktop-app::external_qt
)

View file

@ -7,82 +7,83 @@
if (DESKTOP_APP_USE_PACKAGED AND NOT DESKTOP_APP_USE_PACKAGED_LAZY)
add_library(external_fcitx_qt5 INTERFACE IMPORTED GLOBAL)
add_library(desktop-app::external_fcitx_qt5 ALIAS external_fcitx_qt5)
return()
endif()
add_library(external_fcitx_qt5 STATIC)
add_library(desktop-app::external_fcitx_qt5 ALIAS external_fcitx_qt5)
init_target(external_fcitx_qt5 "(external)")
set(fcitx_qt5_loc ${third_party_loc}/fcitx-qt5)
if (DESKTOP_APP_QT6)
set(fcitx_qt5_src ${fcitx_qt5_loc}/qt6/platforminputcontext)
else()
add_library(external_fcitx_qt5 STATIC)
add_library(desktop-app::external_fcitx_qt5 ALIAS external_fcitx_qt5)
init_target(external_fcitx_qt5 "(external)")
set(fcitx_qt5_src ${fcitx_qt5_loc}/qt5/platforminputcontext)
endif()
set(fcitx_qt5_loc ${third_party_loc}/fcitx-qt5)
set_target_properties(external_fcitx_qt5 PROPERTIES AUTOMOC ON)
if (DESKTOP_APP_QT6)
set(fcitx_qt5_src ${fcitx_qt5_loc}/qt6/platforminputcontext)
else()
set(fcitx_qt5_src ${fcitx_qt5_loc}/qt5/platforminputcontext)
endif()
nice_target_sources(external_fcitx_qt5 ${fcitx_qt5_src}
PRIVATE
fcitxinputcontextproxy.cpp
fcitxqtdbustypes.cpp
fcitxwatcher.cpp
qfcitxplatforminputcontext.cpp
main.cpp
qtkey.cpp
)
set_target_properties(external_fcitx_qt5 PROPERTIES AUTOMOC ON)
set_source_files_properties(${fcitx_qt5_src}/org.fcitx.Fcitx.InputContext.xml PROPERTIES
INCLUDE ${fcitx_qt5_src}/fcitxqtdbustypes.h)
set_source_files_properties(${fcitx_qt5_src}/org.fcitx.Fcitx.InputContext1.xml PROPERTIES
INCLUDE ${fcitx_qt5_src}/fcitxqtdbustypes.h)
set_source_files_properties(${fcitx_qt5_src}/org.fcitx.Fcitx.InputMethod.xml PROPERTIES
INCLUDE ${fcitx_qt5_src}/fcitxqtdbustypes.h)
set_source_files_properties(${fcitx_qt5_src}/org.fcitx.Fcitx.InputMethod1.xml PROPERTIES
INCLUDE ${fcitx_qt5_src}/fcitxqtdbustypes.h)
nice_target_sources(external_fcitx_qt5 ${fcitx_qt5_src}
PRIVATE
fcitxinputcontextproxy.cpp
fcitxqtdbustypes.cpp
fcitxwatcher.cpp
qfcitxplatforminputcontext.cpp
main.cpp
qtkey.cpp
)
if (DESKTOP_APP_QT6)
qt6_add_dbus_interface(fcitx_qt5_adaptors ${fcitx_qt5_src}/org.fcitx.Fcitx.InputContext.xml inputcontextproxy)
qt6_add_dbus_interface(fcitx_qt5_adaptors ${fcitx_qt5_src}/org.fcitx.Fcitx.InputContext1.xml inputcontext1proxy)
qt6_add_dbus_interface(fcitx_qt5_adaptors ${fcitx_qt5_src}/org.fcitx.Fcitx.InputMethod.xml inputmethodproxy)
qt6_add_dbus_interface(fcitx_qt5_adaptors ${fcitx_qt5_src}/org.fcitx.Fcitx.InputMethod1.xml inputmethod1proxy)
else()
qt5_add_dbus_interface(fcitx_qt5_adaptors ${fcitx_qt5_src}/org.fcitx.Fcitx.InputContext.xml inputcontextproxy)
qt5_add_dbus_interface(fcitx_qt5_adaptors ${fcitx_qt5_src}/org.fcitx.Fcitx.InputContext1.xml inputcontext1proxy)
qt5_add_dbus_interface(fcitx_qt5_adaptors ${fcitx_qt5_src}/org.fcitx.Fcitx.InputMethod.xml inputmethodproxy)
qt5_add_dbus_interface(fcitx_qt5_adaptors ${fcitx_qt5_src}/org.fcitx.Fcitx.InputMethod1.xml inputmethod1proxy)
endif()
set_source_files_properties(${fcitx_qt5_src}/org.fcitx.Fcitx.InputContext.xml PROPERTIES
INCLUDE ${fcitx_qt5_src}/fcitxqtdbustypes.h)
set_source_files_properties(${fcitx_qt5_src}/org.fcitx.Fcitx.InputContext1.xml PROPERTIES
INCLUDE ${fcitx_qt5_src}/fcitxqtdbustypes.h)
set_source_files_properties(${fcitx_qt5_src}/org.fcitx.Fcitx.InputMethod.xml PROPERTIES
INCLUDE ${fcitx_qt5_src}/fcitxqtdbustypes.h)
set_source_files_properties(${fcitx_qt5_src}/org.fcitx.Fcitx.InputMethod1.xml PROPERTIES
INCLUDE ${fcitx_qt5_src}/fcitxqtdbustypes.h)
target_sources(external_fcitx_qt5 PRIVATE ${fcitx_qt5_adaptors})
if (DESKTOP_APP_QT6)
qt6_add_dbus_interface(fcitx_qt5_adaptors ${fcitx_qt5_src}/org.fcitx.Fcitx.InputContext.xml inputcontextproxy)
qt6_add_dbus_interface(fcitx_qt5_adaptors ${fcitx_qt5_src}/org.fcitx.Fcitx.InputContext1.xml inputcontext1proxy)
qt6_add_dbus_interface(fcitx_qt5_adaptors ${fcitx_qt5_src}/org.fcitx.Fcitx.InputMethod.xml inputmethodproxy)
qt6_add_dbus_interface(fcitx_qt5_adaptors ${fcitx_qt5_src}/org.fcitx.Fcitx.InputMethod1.xml inputmethod1proxy)
else()
qt5_add_dbus_interface(fcitx_qt5_adaptors ${fcitx_qt5_src}/org.fcitx.Fcitx.InputContext.xml inputcontextproxy)
qt5_add_dbus_interface(fcitx_qt5_adaptors ${fcitx_qt5_src}/org.fcitx.Fcitx.InputContext1.xml inputcontext1proxy)
qt5_add_dbus_interface(fcitx_qt5_adaptors ${fcitx_qt5_src}/org.fcitx.Fcitx.InputMethod.xml inputmethodproxy)
qt5_add_dbus_interface(fcitx_qt5_adaptors ${fcitx_qt5_src}/org.fcitx.Fcitx.InputMethod1.xml inputmethod1proxy)
endif()
target_include_directories(external_fcitx_qt5
PRIVATE
${fcitx_qt5_src}
"${CMAKE_CURRENT_BINARY_DIR}"
)
target_sources(external_fcitx_qt5 PRIVATE ${fcitx_qt5_adaptors})
target_compile_definitions(external_fcitx_qt5
PRIVATE
QT_STATICPLUGIN
)
target_include_directories(external_fcitx_qt5
PRIVATE
${fcitx_qt5_src}
"${CMAKE_CURRENT_BINARY_DIR}"
)
target_link_libraries(external_fcitx_qt5
PRIVATE
desktop-app::external_qt
)
target_compile_definitions(external_fcitx_qt5
PRIVATE
QT_STATICPLUGIN
)
if (DESKTOP_APP_USE_PACKAGED)
find_package(PkgConfig REQUIRED)
pkg_check_modules(XKBCOMMON REQUIRED IMPORTED_TARGET xkbcommon)
target_link_libraries(external_fcitx_qt5
PRIVATE
desktop-app::external_qt
PkgConfig::XKBCOMMON
)
else()
target_link_static_libraries(external_fcitx_qt5
PRIVATE
xkbcommon
)
if (DESKTOP_APP_USE_PACKAGED)
find_package(PkgConfig REQUIRED)
pkg_check_modules(XKBCOMMON REQUIRED IMPORTED_TARGET xkbcommon)
target_link_libraries(external_fcitx_qt5
PRIVATE
PkgConfig::XKBCOMMON
)
else()
target_link_static_libraries(external_fcitx_qt5
PRIVATE
xkbcommon
)
endif()
endif()

View file

@ -39,25 +39,14 @@ else()
${ffmpeg_lib_loc}/libswresample/libswresample.a
${ffmpeg_lib_loc}/libswscale/libswscale.a
${ffmpeg_lib_loc}/libavutil/libavutil.a
$<LINK_ONLY:desktop-app::external_opus>
$<TARGET_FILE:desktop-app::external_opus>
$<LINK_ONLY:desktop-app::external_vpx>
$<TARGET_FILE:desktop-app::external_vpx>
)
if (LINUX)
target_link_static_libraries(external_ffmpeg
INTERFACE
lzma
va-x11
va-drm
va
vdpau
Xv
Xext
Xfixes
drm
)
target_link_libraries(external_ffmpeg
INTERFACE
X11
pthread
)
if (APPLE)
target_link_libraries(external_ffmpeg INTERFACE bz2)
elseif (LINUX)
target_link_static_libraries(external_ffmpeg INTERFACE lzma)
endif()
endif()

View file

@ -16,12 +16,11 @@ if (DESKTOP_APP_USE_PACKAGED)
if (Microsoft.GSL_FOUND)
target_link_libraries(external_gsl INTERFACE Microsoft.GSL::GSL)
return()
endif()
endif()
if (NOT Microsoft.GSL_FOUND)
target_include_directories(external_gsl SYSTEM
INTERFACE
${third_party_loc}/GSL/include
)
endif()
target_include_directories(external_gsl SYSTEM
INTERFACE
${third_party_loc}/GSL/include
)

View file

@ -7,38 +7,39 @@
if (DESKTOP_APP_USE_PACKAGED AND NOT DESKTOP_APP_USE_PACKAGED_LAZY)
add_library(external_hime_qt INTERFACE IMPORTED GLOBAL)
add_library(desktop-app::external_hime_qt ALIAS external_hime_qt)
else()
add_library(external_hime_qt STATIC)
add_library(desktop-app::external_hime_qt ALIAS external_hime_qt)
init_target(external_hime_qt "(external)")
set(hime_loc ${third_party_loc}/hime)
set(hime_qt_src ${hime_loc}/src/qt5-im)
set_target_properties(external_hime_qt PROPERTIES AUTOMOC ON)
nice_target_sources(external_hime_qt ${hime_qt_src}
PRIVATE
hime-imcontext-qt.cpp
hime-imcontext-qt.h
hime-qt.cpp
hime-qt.h
)
target_include_directories(external_hime_qt
PRIVATE
${hime_qt_src}
)
target_compile_definitions(external_hime_qt
PRIVATE
QT_STATICPLUGIN
)
add_subdirectory(hime_im_client)
target_link_libraries(external_hime_qt
PRIVATE
desktop-app::external_hime_im_client
desktop-app::external_qt
)
return()
endif()
add_library(external_hime_qt STATIC)
add_library(desktop-app::external_hime_qt ALIAS external_hime_qt)
init_target(external_hime_qt "(external)")
set(hime_loc ${third_party_loc}/hime)
set(hime_qt_src ${hime_loc}/src/qt5-im)
set_target_properties(external_hime_qt PROPERTIES AUTOMOC ON)
nice_target_sources(external_hime_qt ${hime_qt_src}
PRIVATE
hime-imcontext-qt.cpp
hime-imcontext-qt.h
hime-qt.cpp
hime-qt.h
)
target_include_directories(external_hime_qt
PRIVATE
${hime_qt_src}
)
target_compile_definitions(external_hime_qt
PRIVATE
QT_STATICPLUGIN
)
add_subdirectory(hime_im_client)
target_link_libraries(external_hime_qt
PRIVATE
desktop-app::external_hime_im_client
desktop-app::external_qt
)

View file

@ -7,34 +7,30 @@
if (DESKTOP_APP_USE_PACKAGED AND NOT DESKTOP_APP_USE_PACKAGED_LAZY)
add_library(external_hime_im_client INTERFACE IMPORTED GLOBAL)
add_library(desktop-app::external_hime_im_client ALIAS external_hime_im_client)
else()
add_library(external_hime_im_client STATIC)
add_library(desktop-app::external_hime_im_client ALIAS external_hime_im_client)
init_target(external_hime_im_client "(external)")
set(hime_loc ${third_party_loc}/hime)
set(hime_im_client_src ${hime_loc}/src/im-client)
nice_target_sources(external_hime_im_client ${CMAKE_CURRENT_SOURCE_DIR}
PRIVATE
hime_im_client_helper.cpp
)
target_include_directories(external_hime_im_client
PUBLIC
${hime_im_client_src}
)
find_package(PkgConfig REQUIRED)
pkg_check_modules(X11 REQUIRED x11)
target_include_directories(external_hime_im_client SYSTEM
PRIVATE
${X11_INCLUDE_DIRS}
)
target_link_libraries(external_hime_im_client
PRIVATE
${CMAKE_DL_LIBS}
)
return()
endif()
add_library(external_hime_im_client STATIC)
add_library(desktop-app::external_hime_im_client ALIAS external_hime_im_client)
init_target(external_hime_im_client "(external)")
set(hime_loc ${third_party_loc}/hime)
set(hime_im_client_src ${hime_loc}/src/im-client)
nice_target_sources(external_hime_im_client ${CMAKE_CURRENT_SOURCE_DIR}
PRIVATE
hime_im_client_helper.cpp
)
target_include_directories(external_hime_im_client
PUBLIC
${hime_im_client_src}
)
find_package(PkgConfig REQUIRED)
pkg_check_modules(X11 REQUIRED x11)
target_include_directories(external_hime_im_client SYSTEM
PRIVATE
${X11_INCLUDE_DIRS}
)

View file

@ -13,59 +13,58 @@ if (DESKTOP_APP_USE_PACKAGED)
if (HUNSPELL_FOUND)
target_link_libraries(external_hunspell INTERFACE PkgConfig::HUNSPELL)
return()
endif()
endif()
if (NOT HUNSPELL_FOUND)
add_library(external_hunspell_bundled STATIC)
init_target(external_hunspell_bundled "(external)")
add_library(external_hunspell_bundled STATIC)
init_target(external_hunspell_bundled "(external)")
set(hunspell_loc ${third_party_loc}/hunspell)
set(hunspell_src ${hunspell_loc}/src)
set(hunspell_loc ${third_party_loc}/hunspell)
set(hunspell_src ${hunspell_loc}/src)
nice_target_sources(external_hunspell_bundled ${hunspell_src}
PRIVATE
hunspell/affentry.cxx
hunspell/affentry.hxx
hunspell/affixmgr.cxx
hunspell/affixmgr.hxx
hunspell/atypes.hxx
hunspell/baseaffix.hxx
hunspell/csutil.cxx
hunspell/csutil.hxx
hunspell/filemgr.cxx
hunspell/filemgr.hxx
hunspell/hashmgr.cxx
hunspell/hashmgr.hxx
hunspell/htypes.hxx
hunspell/hunspell.cxx
hunspell/hunspell.h
hunspell/hunspell.hxx
hunspell/hunvisapi.h
hunspell/hunzip.cxx
hunspell/hunzip.hxx
hunspell/phonet.cxx
hunspell/phonet.hxx
hunspell/replist.cxx
hunspell/replist.hxx
hunspell/suggestmgr.cxx
hunspell/suggestmgr.hxx
hunspell/utf_info.hxx
)
nice_target_sources(external_hunspell_bundled ${hunspell_src}
PRIVATE
hunspell/affentry.cxx
hunspell/affentry.hxx
hunspell/affixmgr.cxx
hunspell/affixmgr.hxx
hunspell/atypes.hxx
hunspell/baseaffix.hxx
hunspell/csutil.cxx
hunspell/csutil.hxx
hunspell/filemgr.cxx
hunspell/filemgr.hxx
hunspell/hashmgr.cxx
hunspell/hashmgr.hxx
hunspell/htypes.hxx
hunspell/hunspell.cxx
hunspell/hunspell.h
hunspell/hunspell.hxx
hunspell/hunvisapi.h
hunspell/hunzip.cxx
hunspell/hunzip.hxx
hunspell/phonet.cxx
hunspell/phonet.hxx
hunspell/replist.cxx
hunspell/replist.hxx
hunspell/suggestmgr.cxx
hunspell/suggestmgr.hxx
hunspell/utf_info.hxx
)
target_include_directories(external_hunspell_bundled
PUBLIC
${hunspell_src}
)
target_include_directories(external_hunspell_bundled
PUBLIC
${hunspell_src}
)
target_compile_definitions(external_hunspell_bundled
PUBLIC
HUNSPELL_STATIC
MAXSUGGESTION=5
)
target_compile_definitions(external_hunspell_bundled
PUBLIC
HUNSPELL_STATIC
MAXSUGGESTION=5
)
target_link_libraries(external_hunspell
INTERFACE
external_hunspell_bundled
)
endif()
target_link_libraries(external_hunspell
INTERFACE
external_hunspell_bundled
)

View file

@ -13,22 +13,23 @@ endif()
if (DESKTOP_APP_USE_PACKAGED)
find_package(PkgConfig REQUIRED)
pkg_check_modules(JEMALLOC IMPORTED_TARGET jemalloc)
pkg_check_modules(JEMALLOC jemalloc)
if (JEMALLOC_FOUND)
target_include_directories(external_jemalloc SYSTEM
INTERFACE
${JEMALLOC_INCLUDE_DIRS}
)
target_link_libraries(external_jemalloc
INTERFACE
-Wl,--no-as-needed
PkgConfig::JEMALLOC
${JEMALLOC_LINK_LIBRARIES}
-Wl,--as-needed
-Wl,--push-state,--no-as-needed,${JEMALLOC_LINK_LIBRARIES},--pop-state
)
return()
endif()
endif()
add_library(external_jemalloc_bundled STATIC IMPORTED)
include(ExternalProject)
ExternalProject_Add(jemalloc
URL ${third_party_loc}/jemalloc
@ -42,27 +43,14 @@ ExternalProject_Add(jemalloc
ExternalProject_Get_property(jemalloc SOURCE_DIR)
file(MAKE_DIRECTORY "${SOURCE_DIR}/include")
set_target_properties(external_jemalloc_bundled PROPERTIES
IMPORTED_LOCATION "${SOURCE_DIR}/lib/libjemalloc.a"
)
target_include_directories(external_jemalloc_bundled SYSTEM
target_include_directories(external_jemalloc SYSTEM
INTERFACE
${SOURCE_DIR}/include
)
target_link_libraries(external_jemalloc_bundled
INTERFACE
${CMAKE_DL_LIBS}
pthread
)
add_dependencies(external_jemalloc_bundled jemalloc-build)
target_link_libraries(external_jemalloc
INTERFACE
-Wl,--whole-archive
$<TARGET_FILE:external_jemalloc_bundled>
-Wl,--no-whole-archive
external_jemalloc_bundled
-Wl,--push-state,--whole-archive,${SOURCE_DIR}/lib/libjemalloc.a,--pop-state,-ldl
)
add_dependencies(external_jemalloc jemalloc-build)

View file

@ -18,12 +18,69 @@ endif()
add_library(external_kwayland_bundled STATIC IMPORTED)
include(ExternalProject)
ExternalProject_Add(extra-cmake-modules
URL ${third_party_loc}/extra-cmake-modules
CMAKE_GENERATOR Ninja
CMAKE_ARGS
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_INSTALL_PREFIX=<BINARY_DIR>
-DCMAKE_INSTALL_DATADIR=share
-DBUILD_TESTING=OFF
BUILD_COMMAND ${CMAKE_COMMAND} --build <BINARY_DIR>
COMMAND ${CMAKE_COMMAND} --install <BINARY_DIR>
STEP_TARGETS build
EXCLUDE_FROM_ALL TRUE
BUILD_BYPRODUCTS <BINARY_DIR>/share/ECM/cmake/ECMConfig.cmake
)
ExternalProject_Get_property(extra-cmake-modules BINARY_DIR)
set(extra_cmake_modules_binary_dir ${BINARY_DIR})
ExternalProject_Add(wayland-protocols
URL ${third_party_loc}/wayland-protocols
CONFIGURE_COMMAND meson
--prefix=<BINARY_DIR>
--libdir=lib
--buildtype=release
-Dtests=false
<BINARY_DIR> <SOURCE_DIR>
BUILD_COMMAND meson compile -C <BINARY_DIR>
COMMAND meson install -C <BINARY_DIR>
STEP_TARGETS build
EXCLUDE_FROM_ALL TRUE
BUILD_BYPRODUCTS <BINARY_DIR>/share/pkgconfig/wayland-protocols.pc
)
ExternalProject_Get_property(wayland-protocols BINARY_DIR)
set(wayland_protocols_binary_dir ${BINARY_DIR})
ExternalProject_Add(plasma-wayland-protocols
URL ${third_party_loc}/plasma-wayland-protocols
CMAKE_GENERATOR Ninja
CMAKE_ARGS
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_INSTALL_PREFIX=<BINARY_DIR>
-DCMAKE_INSTALL_LIBDIR=lib
-DECM_DIR=${extra_cmake_modules_binary_dir}/share/ECM/cmake
BUILD_COMMAND ${CMAKE_COMMAND} --build <BINARY_DIR>
COMMAND ${CMAKE_COMMAND} --install <BINARY_DIR>
STEP_TARGETS build
EXCLUDE_FROM_ALL TRUE
BUILD_BYPRODUCTS <BINARY_DIR>/lib/cmake/PlasmaWaylandProtocols/PlasmaWaylandProtocolsConfig.cmake
)
ExternalProject_Add_StepDependencies(plasma-wayland-protocols configure extra-cmake-modules-build)
ExternalProject_Get_property(plasma-wayland-protocols BINARY_DIR)
set(plasma_wayland_protocols_binary_dir ${BINARY_DIR})
set(kwayland_patch_command)
if (DESKTOP_APP_QT6)
set(kwayland_patch_command PATCH_COMMAND patch -p1 < ${CMAKE_CURRENT_SOURCE_DIR}/kwayland-qt6.patch)
endif()
include(ExternalProject)
ExternalProject_Add(kwayland
URL ${third_party_loc}/kwayland
CMAKE_GENERATOR Ninja
@ -31,6 +88,9 @@ ExternalProject_Add(kwayland
-DCMAKE_BUILD_TYPE=Release
-DBUILD_SHARED_LIBS=OFF
-DBUILD_TESTING=OFF
-DCMAKE_PREFIX_PATH=${wayland_protocols_binary_dir}
-DECM_DIR=${extra_cmake_modules_binary_dir}/share/ECM/cmake
-DPlasmaWaylandProtocols_DIR=${plasma_wayland_protocols_binary_dir}/lib/cmake/PlasmaWaylandProtocols
${kwayland_patch_command}
BUILD_COMMAND ${CMAKE_COMMAND} --build <BINARY_DIR> --target KF5WaylandClient
STEP_TARGETS build
@ -38,6 +98,10 @@ ExternalProject_Add(kwayland
BUILD_BYPRODUCTS <BINARY_DIR>/lib/libKF5WaylandClient.a
)
ExternalProject_Add_StepDependencies(kwayland configure extra-cmake-modules-build)
ExternalProject_Add_StepDependencies(kwayland configure wayland-protocols-build)
ExternalProject_Add_StepDependencies(kwayland configure plasma-wayland-protocols-build)
ExternalProject_Get_property(kwayland SOURCE_DIR)
ExternalProject_Get_property(kwayland BINARY_DIR)
@ -64,11 +128,7 @@ if (DESKTOP_APP_USE_PACKAGED)
pkg_check_modules(WAYLAND_CLIENT REQUIRED IMPORTED_TARGET wayland-client)
target_link_libraries(external_kwayland_bundled INTERFACE PkgConfig::WAYLAND_CLIENT)
else()
target_link_libraries(external_kwayland_bundled
INTERFACE
desktop-app::linux_wayland_helper
$<TARGET_FILE:desktop-app::linux_wayland_helper>
)
target_link_libraries(external_kwayland_bundled INTERFACE desktop-app::linux_wayland_helper)
endif()
add_dependencies(external_kwayland_bundled kwayland-build)

View file

@ -13,35 +13,34 @@ if (DESKTOP_APP_USE_PACKAGED)
if (LZ4_FOUND)
target_link_libraries(external_lz4 INTERFACE PkgConfig::LZ4)
return()
endif()
endif()
if (NOT LZ4_FOUND)
add_library(external_lz4_bundled STATIC)
init_target(external_lz4_bundled "(external)")
add_library(external_lz4_bundled STATIC)
init_target(external_lz4_bundled "(external)")
set(lz4_loc ${third_party_loc}/lz4/lib)
set(lz4_loc ${third_party_loc}/lz4/lib)
target_sources(external_lz4_bundled
PRIVATE
${lz4_loc}/lz4.c
${lz4_loc}/lz4.h
${lz4_loc}/lz4frame.c
${lz4_loc}/lz4frame.h
${lz4_loc}/lz4frame_static.h
${lz4_loc}/lz4hc.c
${lz4_loc}/lz4hc.h
${lz4_loc}/xxhash.c
${lz4_loc}/xxhash.h
)
target_sources(external_lz4_bundled
PRIVATE
${lz4_loc}/lz4.c
${lz4_loc}/lz4.h
${lz4_loc}/lz4frame.c
${lz4_loc}/lz4frame.h
${lz4_loc}/lz4frame_static.h
${lz4_loc}/lz4hc.c
${lz4_loc}/lz4hc.h
${lz4_loc}/xxhash.c
${lz4_loc}/xxhash.h
)
target_include_directories(external_lz4_bundled
PUBLIC
${lz4_loc}
)
target_include_directories(external_lz4_bundled
PUBLIC
${lz4_loc}
)
target_link_libraries(external_lz4
INTERFACE
external_lz4_bundled
)
endif()
target_link_libraries(external_lz4
INTERFACE
external_lz4_bundled
)

View file

@ -13,40 +13,40 @@ if (DESKTOP_APP_USE_PACKAGED)
if (MINIZIP_FOUND)
target_link_libraries(external_minizip INTERFACE PkgConfig::MINIZIP)
return()
endif()
endif()
if (NOT MINIZIP_FOUND)
if (NOT WIN32)
add_library(external_minizip_bundled STATIC)
init_target(external_minizip_bundled "(external)")
set(minizip_loc ${third_party_loc}/minizip)
target_sources(external_minizip_bundled
PRIVATE
${minizip_loc}/crypt.h
${minizip_loc}/ioapi.c
${minizip_loc}/ioapi.h
${minizip_loc}/zip.c
${minizip_loc}/zip.h
${minizip_loc}/unzip.c
${minizip_loc}/unzip.h
)
target_include_directories(external_minizip_bundled SYSTEM
PUBLIC
${minizip_loc}
)
target_link_libraries(external_minizip
INTERFACE
external_minizip_bundled
)
else()
target_include_directories(external_minizip SYSTEM
INTERFACE
${libs_loc}/zlib/contrib/minizip
)
endif()
if (WIN32)
target_include_directories(external_minizip SYSTEM
INTERFACE
${libs_loc}/zlib/contrib/minizip
)
return()
endif()
add_library(external_minizip_bundled STATIC)
init_target(external_minizip_bundled "(external)")
set(minizip_loc ${third_party_loc}/minizip)
target_sources(external_minizip_bundled
PRIVATE
${minizip_loc}/crypt.h
${minizip_loc}/ioapi.c
${minizip_loc}/ioapi.h
${minizip_loc}/zip.c
${minizip_loc}/zip.h
${minizip_loc}/unzip.c
${minizip_loc}/unzip.h
)
target_include_directories(external_minizip_bundled SYSTEM
PUBLIC
${minizip_loc}
)
target_link_libraries(external_minizip
INTERFACE
external_minizip_bundled
)

View file

@ -7,44 +7,44 @@
if (DESKTOP_APP_USE_PACKAGED AND NOT DESKTOP_APP_USE_PACKAGED_LAZY)
add_library(external_nimf_qt5 INTERFACE IMPORTED GLOBAL)
add_library(desktop-app::external_nimf_qt5 ALIAS external_nimf_qt5)
else()
add_library(external_nimf_qt5 STATIC)
add_library(desktop-app::external_nimf_qt5 ALIAS external_nimf_qt5)
init_target(external_nimf_qt5 "(external)")
set(nimf_loc ${third_party_loc}/nimf)
set(libnimf_src ${nimf_loc}/libnimf)
set(nimf_qt5_src ${nimf_loc}/modules/clients/qt5)
set_target_properties(external_nimf_qt5 PROPERTIES AUTOMOC ON)
nice_target_sources(external_nimf_qt5 ${nimf_qt5_src}
PRIVATE
im-nimf-qt5.cpp
)
find_package(PkgConfig REQUIRED)
pkg_check_modules(GIO REQUIRED gio-2.0)
target_include_directories(external_nimf_qt5
PRIVATE
${nimf_qt5_src}
${libnimf_src}
${GIO_INCLUDE_DIRS}
)
target_compile_definitions(external_nimf_qt5
PRIVATE
QT_STATICPLUGIN
QT_NO_KEYWORDS
G_LOG_DOMAIN="nimf"
NIMF_COMPILATION
USE_DLFCN
)
target_link_libraries(external_nimf_qt5
PRIVATE
desktop-app::external_qt
${CMAKE_DL_LIBS}
)
return()
endif()
add_library(external_nimf_qt5 STATIC)
add_library(desktop-app::external_nimf_qt5 ALIAS external_nimf_qt5)
init_target(external_nimf_qt5 "(external)")
set(nimf_loc ${third_party_loc}/nimf)
set(libnimf_src ${nimf_loc}/libnimf)
set(nimf_qt5_src ${nimf_loc}/modules/clients/qt5)
set_target_properties(external_nimf_qt5 PROPERTIES AUTOMOC ON)
nice_target_sources(external_nimf_qt5 ${nimf_qt5_src}
PRIVATE
im-nimf-qt5.cpp
)
find_package(PkgConfig REQUIRED)
pkg_check_modules(GIO REQUIRED gio-2.0)
target_include_directories(external_nimf_qt5
PRIVATE
${nimf_qt5_src}
${libnimf_src}
${GIO_INCLUDE_DIRS}
)
target_compile_definitions(external_nimf_qt5
PRIVATE
QT_STATICPLUGIN
QT_NO_KEYWORDS
G_LOG_DOMAIN="nimf"
NIMF_COMPILATION
USE_DLFCN
)
target_link_libraries(external_nimf_qt5
PRIVATE
desktop-app::external_qt
)

View file

@ -12,11 +12,12 @@ if (DESKTOP_APP_USE_PACKAGED)
if (OPENAL_FOUND)
target_include_directories(external_openal SYSTEM INTERFACE ${OPENAL_INCLUDE_DIR})
target_link_libraries(external_openal INTERFACE ${OPENAL_LIBRARY})
else()
find_package(PkgConfig REQUIRED)
pkg_check_modules(OPENAL REQUIRED IMPORTED_TARGET openal)
target_link_libraries(external_openal INTERFACE PkgConfig::OPENAL)
return()
endif()
find_package(OpenAL REQUIRED CONFIG)
target_link_libraries(external_openal INTERFACE OpenAL::OpenAL)
return()
elseif (WIN32)
target_include_directories(external_openal SYSTEM
INTERFACE
@ -47,16 +48,9 @@ else()
INTERFACE
openal
)
target_link_libraries(external_openal
INTERFACE
${CMAKE_DL_LIBS}
pthread
)
endif()
if (NOT DESKTOP_APP_USE_PACKAGED)
target_compile_definitions(external_openal
INTERFACE
AL_LIBTYPE_STATIC
)
endif()
target_compile_definitions(external_openal
INTERFACE
AL_LIBTYPE_STATIC
)

View file

@ -19,12 +19,4 @@ if (NOT DESKTOP_APP_USE_PACKAGED)
${libs_loc}/openssl/include
)
endif()
if (LINUX)
target_link_libraries(external_openssl_common
INTERFACE
${CMAKE_DL_LIBS}
pthread
)
endif()
endif()

View file

@ -10,22 +10,23 @@ if (DESKTOP_APP_USE_PACKAGED)
find_package(OpenSSL REQUIRED)
target_link_libraries(external_openssl_crypto INTERFACE OpenSSL::Crypto)
else()
add_library(external_openssl_crypto STATIC IMPORTED GLOBAL)
add_library(desktop-app::external_openssl_crypto ALIAS external_openssl_crypto)
return()
endif()
add_library(external_openssl_crypto STATIC IMPORTED GLOBAL)
add_library(desktop-app::external_openssl_crypto ALIAS external_openssl_crypto)
set_target_properties(external_openssl_crypto PROPERTIES
IMPORTED_LOCATION "${openssl_lib_loc}/libcrypto.${openssl_lib_ext}"
)
if (WIN32)
set_target_properties(external_openssl_crypto PROPERTIES
IMPORTED_LOCATION "${openssl_lib_loc}/libcrypto.${openssl_lib_ext}"
)
if (WIN32)
set_target_properties(external_openssl_crypto PROPERTIES
IMPORTED_LOCATION_DEBUG "${openssl_lib_loc}.dbg/libcrypto.${openssl_lib_ext}"
)
endif()
target_link_libraries(external_openssl_crypto
INTERFACE
desktop-app::external_openssl_common
IMPORTED_LOCATION_DEBUG "${openssl_lib_loc}.dbg/libcrypto.${openssl_lib_ext}"
)
endif()
target_link_libraries(external_openssl_crypto
INTERFACE
desktop-app::external_openssl_common
)

View file

@ -10,22 +10,23 @@ if (DESKTOP_APP_USE_PACKAGED)
find_package(OpenSSL REQUIRED)
target_link_libraries(external_openssl_ssl INTERFACE OpenSSL::SSL)
else()
add_library(external_openssl_ssl STATIC IMPORTED GLOBAL)
add_library(desktop-app::external_openssl_ssl ALIAS external_openssl_ssl)
return()
endif()
add_library(external_openssl_ssl STATIC IMPORTED GLOBAL)
add_library(desktop-app::external_openssl_ssl ALIAS external_openssl_ssl)
set_target_properties(external_openssl_ssl PROPERTIES
IMPORTED_LOCATION "${openssl_lib_loc}/libssl.${openssl_lib_ext}"
)
if (WIN32)
set_target_properties(external_openssl_ssl PROPERTIES
IMPORTED_LOCATION "${openssl_lib_loc}/libssl.${openssl_lib_ext}"
)
if (WIN32)
set_target_properties(external_openssl_ssl PROPERTIES
IMPORTED_LOCATION_DEBUG "${openssl_lib_loc}.dbg/libssl.${openssl_lib_ext}"
)
endif()
target_link_libraries(external_openssl_ssl
INTERFACE
desktop-app::external_openssl_common
IMPORTED_LOCATION_DEBUG "${openssl_lib_loc}.dbg/libssl.${openssl_lib_ext}"
)
endif()
target_link_libraries(external_openssl_ssl
INTERFACE
desktop-app::external_openssl_common
)

View file

@ -12,36 +12,37 @@ if (DESKTOP_APP_USE_PACKAGED)
pkg_check_modules(OPUS IMPORTED_TARGET opus)
target_link_libraries(external_opus INTERFACE PkgConfig::OPUS)
else()
add_library(external_opus STATIC IMPORTED GLOBAL)
add_library(desktop-app::external_opus ALIAS external_opus)
if (WIN32)
target_include_directories(external_opus SYSTEM
INTERFACE
${libs_loc}/opus/include
)
set(opus_lib_loc ${libs_loc}/opus/out)
set_target_properties(external_opus PROPERTIES
IMPORTED_LOCATION "${opus_lib_loc}/Release/opus.lib"
IMPORTED_LOCATION_DEBUG "${opus_lib_loc}/Debug/opus.lib"
)
elseif (APPLE)
target_include_directories(external_opus SYSTEM
INTERFACE
${libs_loc}/local/include/opus
)
set_target_properties(external_opus PROPERTIES
IMPORTED_LOCATION ${libs_loc}/local/lib/libopus.a
)
else()
target_include_directories(external_opus SYSTEM
INTERFACE
/usr/local/include/opus
)
find_library(OPUS_LIBRARY libopus.a)
set_target_properties(external_opus PROPERTIES
IMPORTED_LOCATION "${OPUS_LIBRARY}"
)
endif()
return()
endif()
add_library(external_opus STATIC IMPORTED GLOBAL)
add_library(desktop-app::external_opus ALIAS external_opus)
if (WIN32)
target_include_directories(external_opus SYSTEM
INTERFACE
${libs_loc}/opus/include
)
set(opus_lib_loc ${libs_loc}/opus/out)
set_target_properties(external_opus PROPERTIES
IMPORTED_LOCATION "${opus_lib_loc}/Release/opus.lib"
IMPORTED_LOCATION_DEBUG "${opus_lib_loc}/Debug/opus.lib"
)
elseif (APPLE)
target_include_directories(external_opus SYSTEM
INTERFACE
${libs_loc}/local/include/opus
)
set_target_properties(external_opus PROPERTIES
IMPORTED_LOCATION ${libs_loc}/local/lib/libopus.a
)
else()
target_include_directories(external_opus SYSTEM
INTERFACE
/usr/local/include/opus
)
find_library(OPUS_LIBRARY libopus.a REQUIRED)
set_target_properties(external_opus PROPERTIES
IMPORTED_LOCATION "${OPUS_LIBRARY}"
)
endif()

View file

@ -14,29 +14,28 @@ if (DESKTOP_APP_USE_PACKAGED)
if (QRCODE_LIBRARIES AND QRCODE_INCLUDE_DIRS)
target_include_directories(external_qr_code_generator SYSTEM INTERFACE ${QRCODE_INCLUDE_DIRS})
target_link_libraries(external_qr_code_generator INTERFACE ${QRCODE_LIBRARIES})
return()
endif()
endif()
if (NOT QRCODE_LIBRARIES OR NOT QRCODE_INCLUDE_DIRS)
add_library(external_qr_code_generator_bundled STATIC)
init_target(external_qr_code_generator_bundled "(external)")
add_library(external_qr_code_generator_bundled STATIC)
init_target(external_qr_code_generator_bundled "(external)")
set(qr_loc ${third_party_loc}/QR)
set(qr_src ${qr_loc}/cpp)
set(qr_loc ${third_party_loc}/QR)
set(qr_src ${qr_loc}/cpp)
nice_target_sources(external_qr_code_generator_bundled ${qr_src}
PRIVATE
qrcodegen.cpp
qrcodegen.hpp
)
nice_target_sources(external_qr_code_generator_bundled ${qr_src}
PRIVATE
qrcodegen.cpp
qrcodegen.hpp
)
target_include_directories(external_qr_code_generator_bundled
PUBLIC
${qr_src}
)
target_include_directories(external_qr_code_generator_bundled
PUBLIC
${qr_src}
)
target_link_libraries(external_qr_code_generator
INTERFACE
external_qr_code_generator_bundled
)
endif()
target_link_libraries(external_qr_code_generator
INTERFACE
external_qr_code_generator_bundled
)

View file

@ -27,6 +27,7 @@ if (DESKTOP_APP_USE_PACKAGED)
INTERFACE
${Qt5Core_PRIVATE_INCLUDE_DIRS}
${Qt5Gui_PRIVATE_INCLUDE_DIRS}
${Qt5Widgets_PRIVATE_INCLUDE_DIRS}
)
if (Qt5DBus_FOUND)
@ -50,263 +51,262 @@ if (DESKTOP_APP_USE_PACKAGED)
${Qt5WaylandClient_PRIVATE_INCLUDE_DIRS}
)
endif()
else()
return()
endif()
target_include_directories(external_qt SYSTEM
INTERFACE
${qt_loc}/include
${qt_loc}/include/QtCore
${qt_loc}/include/QtGui
${qt_loc}/include/QtWidgets
${qt_loc}/include/QtSvg
${qt_loc}/include/QtCore/${qt_version}
${qt_loc}/include/QtGui/${qt_version}
${qt_loc}/include/QtCore/${qt_version}/QtCore
${qt_loc}/include/QtGui/${qt_version}/QtGui
)
if (Qt5DBus_FOUND)
target_include_directories(external_qt SYSTEM
INTERFACE
${qt_loc}/include
${qt_loc}/include/QtCore
${qt_loc}/include/QtGui
${qt_loc}/include/QtWidgets
${qt_loc}/include/QtSvg
${qt_loc}/include/QtCore/${qt_version}
${qt_loc}/include/QtGui/${qt_version}
${qt_loc}/include/QtCore/${qt_version}/QtCore
${qt_loc}/include/QtGui/${qt_version}/QtGui
${qt_loc}/include/QtDBus
)
endif()
if (Qt5DBus_FOUND)
target_include_directories(external_qt SYSTEM
INTERFACE
${qt_loc}/include/QtDBus
)
endif()
if (Qt5XkbCommonSupport_FOUND)
target_include_directories(external_qt SYSTEM
INTERFACE
${qt_loc}/include/QtXkbCommonSupport
${qt_loc}/include/QtXkbCommonSupport/${qt_version}
${qt_loc}/include/QtXkbCommonSupport/${qt_version}/QtXkbCommonSupport
)
endif()
if (Qt5XkbCommonSupport_FOUND)
target_include_directories(external_qt SYSTEM
INTERFACE
${qt_loc}/include/QtXkbCommonSupport
${qt_loc}/include/QtXkbCommonSupport/${qt_version}
${qt_loc}/include/QtXkbCommonSupport/${qt_version}/QtXkbCommonSupport
)
endif()
if (LINUX AND NOT DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION)
target_include_directories(external_qt SYSTEM
INTERFACE
${qt_loc}/include/QtWaylandClient
${qt_loc}/include/QtWaylandClient/${qt_version}
${qt_loc}/include/QtWaylandClient/${qt_version}/QtWaylandClient
)
endif()
if (LINUX AND NOT DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION)
target_include_directories(external_qt SYSTEM
INTERFACE
${qt_loc}/include/QtWaylandClient
${qt_loc}/include/QtWaylandClient/${qt_version}
${qt_loc}/include/QtWaylandClient/${qt_version}/QtWaylandClient
)
endif()
target_compile_definitions(external_qt
INTERFACE
_REENTRANT
QT_STATICPLUGIN
QT_PLUGIN
QT_WIDGETS_LIB
QT_NETWORK_LIB
QT_GUI_LIB
QT_CORE_LIB
QT_SVG_LIB
)
if (Qt5DBus_FOUND)
target_compile_definitions(external_qt
INTERFACE
_REENTRANT
QT_STATICPLUGIN
QT_PLUGIN
QT_WIDGETS_LIB
QT_NETWORK_LIB
QT_GUI_LIB
QT_CORE_LIB
QT_SVG_LIB
QT_DBUS_LIB
)
endif()
if (Qt5DBus_FOUND)
target_compile_definitions(external_qt
INTERFACE
QT_DBUS_LIB
)
endif()
if (Qt5XkbCommonSupport_FOUND)
target_compile_definitions(external_qt
INTERFACE
QT_XKBCOMMON_SUPPORT_LIB
)
endif()
if (LINUX AND NOT DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION)
target_compile_definitions(external_qt
INTERFACE
QT_WAYLANDCLIENT_LIB
)
endif()
if (WIN32)
set(qt_lib_prefix "")
set(qt_lib_suffix $<$<CONFIG:Debug>:d>.lib)
else()
set(qt_lib_prefix lib)
if (APPLE)
set(qt_lib_suffix $<$<CONFIG:Debug>:_debug>.a)
else()
set(qt_lib_suffix .a)
endif()
endif()
set(common_qt_libs
plugins/bearer/${qt_lib_prefix}qgenericbearer
plugins/imageformats/${qt_lib_prefix}qwebp
plugins/imageformats/${qt_lib_prefix}qgif
plugins/imageformats/${qt_lib_prefix}qjpeg
lib/${qt_lib_prefix}Qt5PrintSupport
lib/${qt_lib_prefix}Qt5AccessibilitySupport
lib/${qt_lib_prefix}Qt5FontDatabaseSupport
lib/${qt_lib_prefix}Qt5EventDispatcherSupport
lib/${qt_lib_prefix}Qt5ThemeSupport
lib/${qt_lib_prefix}Qt5Network
lib/${qt_lib_prefix}Qt5Widgets
lib/${qt_lib_prefix}Qt5Gui
lib/${qt_lib_prefix}Qt5Svg
lib/${qt_lib_prefix}qtharfbuzz
lib/${qt_lib_prefix}qtlibpng
if (Qt5XkbCommonSupport_FOUND)
target_compile_definitions(external_qt
INTERFACE
QT_XKBCOMMON_SUPPORT_LIB
)
endif()
set(qt_libs_list "")
if (WIN32)
target_include_directories(external_qt SYSTEM
INTERFACE
${qt_loc}/mkspecs/win32-msvc
)
set(qt_libs
${common_qt_libs}
lib/${qt_lib_prefix}Qt5Core
lib/${qt_lib_prefix}Qt5WindowsUIAutomationSupport
lib/${qt_lib_prefix}qtmain
lib/${qt_lib_prefix}qtfreetype
lib/${qt_lib_prefix}qtpcre2
plugins/platforms/${qt_lib_prefix}qwindows
)
foreach (lib ${qt_libs})
list(APPEND qt_libs_list "${qt_loc}/${lib}${qt_lib_suffix}")
endforeach()
if (LINUX AND NOT DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION)
target_compile_definitions(external_qt
INTERFACE
QT_WAYLANDCLIENT_LIB
)
endif()
target_link_libraries(external_qt
INTERFACE
desktop-app::external_angle
)
elseif (APPLE)
target_include_directories(external_qt SYSTEM
INTERFACE
${qt_loc}/mkspecs/macx-clang
)
set(qt_libs
${common_qt_libs}
lib/${qt_lib_prefix}Qt5Core
lib/${qt_lib_prefix}Qt5GraphicsSupport
lib/${qt_lib_prefix}Qt5ClipboardSupport
lib/${qt_lib_prefix}qtfreetype
lib/${qt_lib_prefix}qtpcre2
plugins/platforms/${qt_lib_prefix}qcocoa
)
foreach (lib ${qt_libs})
list(APPEND qt_libs_list "${qt_loc}/${lib}${qt_lib_suffix}")
endforeach()
target_link_libraries(external_qt
INTERFACE
cups
)
if (WIN32)
set(qt_lib_prefix "")
set(qt_lib_suffix $<$<CONFIG:Debug>:d>.lib)
else()
set(qt_lib_prefix lib)
if (APPLE)
set(qt_lib_suffix $<$<CONFIG:Debug>:_debug>.a)
else()
set(qt_libs_dbus)
set(qt_libs_dbus_support)
set(qt_libs_dbus_plugins)
set(qt_libs_dbus_bearers)
if (Qt5DBus_FOUND)
set(qt_libs_dbus lib/${qt_lib_prefix}Qt5DBus)
set(qt_libs_dbus_support lib/${qt_lib_prefix}Qt5LinuxAccessibilitySupport)
set(qt_libs_dbus_plugins
plugins/platforminputcontexts/${qt_lib_prefix}ibusplatforminputcontextplugin
)
set(qt_libs_dbus_bearers
plugins/bearer/${qt_lib_prefix}qconnmanbearer
plugins/bearer/${qt_lib_prefix}qnmbearer
)
endif()
set(qt_libs_waylandclient)
set(qt_libs_waylandclient_plugins)
if (NOT DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION)
set(qt_libs_waylandclient lib/${qt_lib_prefix}Qt5WaylandClient)
set(qt_libs_waylandclient_plugins
plugins/platforms/${qt_lib_prefix}qwayland-generic
plugins/platforms/${qt_lib_prefix}qwayland-egl
plugins/wayland-graphics-integration-client/${qt_lib_prefix}qt-plugin-wayland-egl
plugins/wayland-decoration-client/${qt_lib_prefix}bradient
)
endif()
set(qt_libs
plugins/platforminputcontexts/${qt_lib_prefix}composeplatforminputcontextplugin
${qt_libs_dbus_plugins}
${qt_libs_waylandclient_plugins}
plugins/platformthemes/${qt_lib_prefix}qgtk3
plugins/platforms/${qt_lib_prefix}qxcb
plugins/xcbglintegrations/${qt_lib_prefix}qxcb-egl-integration
plugins/xcbglintegrations/${qt_lib_prefix}qxcb-glx-integration
plugins/iconengines/${qt_lib_prefix}qsvgicon
lib/${qt_lib_prefix}Qt5XcbQpa
lib/${qt_lib_prefix}Qt5EglSupport
lib/${qt_lib_prefix}Qt5GlxSupport
lib/${qt_lib_prefix}Qt5ServiceSupport
lib/${qt_lib_prefix}Qt5EdidSupport
lib/${qt_lib_prefix}Qt5XkbCommonSupport
${qt_libs_dbus_support}
${qt_libs_dbus_bearers}
${qt_libs_waylandclient}
lib/${qt_lib_prefix}Qt5ServiceSupport
${common_qt_libs}
${qt_libs_dbus}
lib/${qt_lib_prefix}Qt5Core
lib/${qt_lib_prefix}qtpcre2
)
foreach (lib ${qt_libs})
list(APPEND qt_libs_list "${qt_loc}/${lib}${qt_lib_suffix}")
endforeach()
set(qt_lib_suffix .a)
endif()
endif()
set(common_qt_libs
plugins/bearer/${qt_lib_prefix}qgenericbearer
plugins/imageformats/${qt_lib_prefix}qwebp
plugins/imageformats/${qt_lib_prefix}qgif
plugins/imageformats/${qt_lib_prefix}qjpeg
lib/${qt_lib_prefix}Qt5PrintSupport
lib/${qt_lib_prefix}Qt5AccessibilitySupport
lib/${qt_lib_prefix}Qt5FontDatabaseSupport
lib/${qt_lib_prefix}Qt5EventDispatcherSupport
lib/${qt_lib_prefix}Qt5ThemeSupport
lib/${qt_lib_prefix}Qt5Network
lib/${qt_lib_prefix}Qt5Widgets
lib/${qt_lib_prefix}Qt5Gui
lib/${qt_lib_prefix}Qt5Svg
lib/${qt_lib_prefix}qtharfbuzz
lib/${qt_lib_prefix}qtlibpng
)
set(qt_libs_list "")
if (WIN32)
target_include_directories(external_qt SYSTEM
INTERFACE
${qt_loc}/mkspecs/win32-msvc
)
set(qt_libs
${common_qt_libs}
lib/${qt_lib_prefix}Qt5Core
lib/${qt_lib_prefix}Qt5WindowsUIAutomationSupport
lib/${qt_lib_prefix}qtmain
lib/${qt_lib_prefix}qtfreetype
lib/${qt_lib_prefix}qtpcre2
plugins/platforms/${qt_lib_prefix}qwindows
)
foreach (lib ${qt_libs})
list(APPEND qt_libs_list "${qt_loc}/${lib}${qt_lib_suffix}")
endforeach()
target_link_libraries(external_qt
INTERFACE
${qt_libs_list}
$<TARGET_FILE:desktop-app::external_openssl_ssl>
$<TARGET_FILE:desktop-app::external_openssl_crypto>
desktop-app::external_jpeg
desktop-app::external_zlib
desktop-app::external_angle
)
if (LINUX)
target_include_directories(external_qt SYSTEM
INTERFACE
${qt_loc}/mkspecs/linux-g++
elseif (APPLE)
target_include_directories(external_qt SYSTEM
INTERFACE
${qt_loc}/mkspecs/macx-clang
)
set(qt_libs
${common_qt_libs}
lib/${qt_lib_prefix}Qt5Core
lib/${qt_lib_prefix}Qt5GraphicsSupport
lib/${qt_lib_prefix}Qt5ClipboardSupport
lib/${qt_lib_prefix}qtfreetype
lib/${qt_lib_prefix}qtpcre2
plugins/platforms/${qt_lib_prefix}qcocoa
)
foreach (lib ${qt_libs})
list(APPEND qt_libs_list "${qt_loc}/${lib}${qt_lib_suffix}")
endforeach()
target_link_libraries(external_qt
INTERFACE
cups
)
else()
set(qt_libs_dbus)
set(qt_libs_dbus_support)
set(qt_libs_dbus_plugins)
set(qt_libs_dbus_bearers)
if (Qt5DBus_FOUND)
set(qt_libs_dbus lib/${qt_lib_prefix}Qt5DBus)
set(qt_libs_dbus_support lib/${qt_lib_prefix}Qt5LinuxAccessibilitySupport)
set(qt_libs_dbus_plugins
plugins/platforminputcontexts/${qt_lib_prefix}ibusplatforminputcontextplugin
)
target_link_static_libraries(external_qt
INTERFACE
proxy
epoxy
xkbcommon
xkbcommon-x11
xcb-glx
xcb-xkb
xcb-randr
xcb-icccm
xcb-shm
xcb-render
xcb-image
xcb-xfixes
xcb-xinerama
xcb-xinput
xcb-shape
xcb-sync
xcb-util
xcb-render-util
xcb-keysyms
z
)
if (NOT DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION)
target_link_libraries(external_qt
INTERFACE
desktop-app::linux_wayland_helper
$<TARGET_FILE:desktop-app::linux_wayland_helper>
)
endif()
target_link_libraries(external_qt
INTERFACE
desktop-app::linux_xcb_helper
$<TARGET_FILE:desktop-app::linux_xcb_helper>
fontconfig
freetype
xcb
X11
X11-xcb
${CMAKE_DL_LIBS}
pthread
set(qt_libs_dbus_bearers
plugins/bearer/${qt_lib_prefix}qconnmanbearer
plugins/bearer/${qt_lib_prefix}qnmbearer
)
endif()
set(qt_libs_waylandclient)
set(qt_libs_waylandclient_plugins)
if (NOT DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION)
set(qt_libs_waylandclient lib/${qt_lib_prefix}Qt5WaylandClient)
set(qt_libs_waylandclient_plugins
plugins/platforms/${qt_lib_prefix}qwayland-generic
plugins/platforms/${qt_lib_prefix}qwayland-egl
plugins/wayland-graphics-integration-client/${qt_lib_prefix}qt-plugin-wayland-egl
plugins/wayland-decoration-client/${qt_lib_prefix}bradient
)
endif()
set(qt_libs
plugins/platforminputcontexts/${qt_lib_prefix}composeplatforminputcontextplugin
${qt_libs_dbus_plugins}
${qt_libs_waylandclient_plugins}
plugins/platformthemes/${qt_lib_prefix}qgtk3
plugins/platforms/${qt_lib_prefix}qxcb
plugins/xcbglintegrations/${qt_lib_prefix}qxcb-egl-integration
plugins/xcbglintegrations/${qt_lib_prefix}qxcb-glx-integration
plugins/iconengines/${qt_lib_prefix}qsvgicon
lib/${qt_lib_prefix}Qt5XcbQpa
lib/${qt_lib_prefix}Qt5EglSupport
lib/${qt_lib_prefix}Qt5GlxSupport
lib/${qt_lib_prefix}Qt5ServiceSupport
lib/${qt_lib_prefix}Qt5EdidSupport
lib/${qt_lib_prefix}Qt5XkbCommonSupport
${qt_libs_dbus_support}
${qt_libs_dbus_bearers}
${qt_libs_waylandclient}
lib/${qt_lib_prefix}Qt5ServiceSupport
${common_qt_libs}
${qt_libs_dbus}
lib/${qt_lib_prefix}Qt5Core
lib/${qt_lib_prefix}qtpcre2
)
foreach (lib ${qt_libs})
list(APPEND qt_libs_list "${qt_loc}/${lib}${qt_lib_suffix}")
endforeach()
endif()
target_link_libraries(external_qt
INTERFACE
${qt_libs_list}
$<LINK_ONLY:desktop-app::external_openssl>
$<TARGET_FILE:desktop-app::external_openssl_ssl>
$<TARGET_FILE:desktop-app::external_openssl_crypto>
$<LINK_ONLY:desktop-app::external_jpeg>
$<LINK_ONLY:desktop-app::external_zlib>
$<TARGET_FILE:desktop-app::external_zlib>
)
if (LINUX)
target_include_directories(external_qt SYSTEM
INTERFACE
${qt_loc}/mkspecs/linux-g++
)
target_link_static_libraries(external_qt
INTERFACE
proxy
epoxy
xkbcommon
xkbcommon-x11
xcb-glx
xcb-xkb
xcb-randr
xcb-icccm
xcb-shm
xcb-render
xcb-image
xcb-xfixes
xcb-xinerama
xcb-xinput
xcb-shape
xcb-sync
xcb-util
xcb-render-util
xcb-keysyms
)
if (NOT DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION)
target_link_libraries(external_qt
INTERFACE
desktop-app::linux_wayland_helper
)
endif()
target_link_libraries(external_qt
INTERFACE
desktop-app::linux_xcb_helper
fontconfig
freetype
xcb
X11
X11-xcb
)
endif()

View file

@ -38,7 +38,9 @@ if (LINUX)
endif()
endif()
if (NOT DESKTOP_APP_DISABLE_DBUS_INTEGRATION)
if ((NOT DESKTOP_APP_USE_PACKAGED
OR (DESKTOP_APP_USE_PACKAGED AND DESKTOP_APP_USE_PACKAGED_LAZY))
AND NOT DESKTOP_APP_DISABLE_DBUS_INTEGRATION)
if (DESKTOP_APP_QT6)
find_package(Qt6 COMPONENTS DBus REQUIRED)
else()

View file

@ -38,250 +38,249 @@ if (DESKTOP_APP_USE_PACKAGED)
${Qt6WaylandClient_PRIVATE_INCLUDE_DIRS}
)
endif()
else()
return()
endif()
target_include_directories(external_qt SYSTEM
INTERFACE
${qt_loc}/include
${qt_loc}/include/QtCore
${qt_loc}/include/QtCore5Compat
${qt_loc}/include/QtGui
${qt_loc}/include/QtOpenGL
${qt_loc}/include/QtWidgets
${qt_loc}/include/QtOpenGLWidgets
${qt_loc}/include/QtSvg
${qt_loc}/include/QtCore/${qt_version}
${qt_loc}/include/QtGui/${qt_version}
${qt_loc}/include/QtCore/${qt_version}/QtCore
${qt_loc}/include/QtGui/${qt_version}/QtGui
)
if (Qt6DBus_FOUND)
target_include_directories(external_qt SYSTEM
INTERFACE
${qt_loc}/include
${qt_loc}/include/QtCore
${qt_loc}/include/QtCore5Compat
${qt_loc}/include/QtGui
${qt_loc}/include/QtOpenGL
${qt_loc}/include/QtWidgets
${qt_loc}/include/QtOpenGLWidgets
${qt_loc}/include/QtSvg
${qt_loc}/include/QtCore/${qt_version}
${qt_loc}/include/QtGui/${qt_version}
${qt_loc}/include/QtCore/${qt_version}/QtCore
${qt_loc}/include/QtGui/${qt_version}/QtGui
${qt_loc}/include/QtDBus
)
endif()
if (Qt6DBus_FOUND)
target_include_directories(external_qt SYSTEM
INTERFACE
${qt_loc}/include/QtDBus
)
endif()
if (LINUX AND NOT DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION)
target_include_directories(external_qt SYSTEM
INTERFACE
${qt_loc}/include/QtWaylandClient
${qt_loc}/include/QtWaylandClient/${qt_version}
${qt_loc}/include/QtWaylandClient/${qt_version}/QtWaylandClient
)
endif()
if (LINUX AND NOT DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION)
target_include_directories(external_qt SYSTEM
INTERFACE
${qt_loc}/include/QtWaylandClient
${qt_loc}/include/QtWaylandClient/${qt_version}
${qt_loc}/include/QtWaylandClient/${qt_version}/QtWaylandClient
)
endif()
target_compile_definitions(external_qt
INTERFACE
_REENTRANT
QT_STATICPLUGIN
QT_PLUGIN
QT_SVG_LIB
QT_NETWORK_LIB
QT_OPENGLWIDGETS_LIB
QT_WIDGETS_LIB
QT_OPENGL_LIB
QT_GUI_LIB
QT_CORE5COMPAT_LIB
QT_CORE_LIB
)
if (Qt6DBus_FOUND)
target_compile_definitions(external_qt
INTERFACE
_REENTRANT
QT_STATICPLUGIN
QT_PLUGIN
QT_SVG_LIB
QT_NETWORK_LIB
QT_OPENGLWIDGETS_LIB
QT_WIDGETS_LIB
QT_OPENGL_LIB
QT_GUI_LIB
QT_CORE5COMPAT_LIB
QT_CORE_LIB
QT_DBUS_LIB
)
endif()
if (Qt6DBus_FOUND)
target_compile_definitions(external_qt
INTERFACE
QT_DBUS_LIB
)
endif()
if (LINUX AND NOT DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION)
target_compile_definitions(external_qt
INTERFACE
QT_WAYLANDCLIENT_LIB
)
endif()
if (WIN32)
set(qt_lib_prefix "")
set(qt_lib_suffix $<$<CONFIG:Debug>:d>.lib)
else()
set(qt_lib_prefix lib)
if (APPLE)
set(qt_lib_suffix $<$<CONFIG:Debug>:_debug>.a)
else()
set(qt_lib_suffix .a)
endif()
endif()
if (LINUX)
set(qt_lib_objects objects-RelWithDebInfo)
else()
set(qt_lib_objects objects-$<IF:$<CONFIG:Debug>,Debug,RelWithDebInfo>)
endif()
set(common_qt_libs
plugins/imageformats/${qt_lib_prefix}qwebp
plugins/imageformats/${qt_lib_prefix}qgif
plugins/imageformats/${qt_lib_prefix}qjpeg
lib/${qt_lib_prefix}Qt6Svg
lib/${qt_lib_prefix}Qt6Network
lib/${qt_lib_prefix}Qt6OpenGLWidgets
lib/${qt_lib_prefix}Qt6Widgets
lib/${qt_lib_prefix}Qt6OpenGL
lib/${qt_lib_prefix}Qt6Gui
lib/${qt_lib_prefix}Qt6Core5Compat
lib/${qt_lib_prefix}Qt6Core
lib/${qt_lib_prefix}Qt6BundledHarfbuzz
lib/${qt_lib_prefix}Qt6BundledLibpng
lib/${qt_lib_prefix}Qt6BundledPcre2
if (LINUX AND NOT DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION)
target_compile_definitions(external_qt
INTERFACE
QT_WAYLANDCLIENT_LIB
)
endif()
set(qt_libs_list "")
if (WIN32)
target_include_directories(external_qt SYSTEM
INTERFACE
${qt_loc}/mkspecs/win32-msvc
)
set(qt_libs
${common_qt_libs}
lib/${qt_lib_prefix}Qt6WindowsUIAutomationSupport
lib/${qt_lib_prefix}qtmain
lib/${qt_lib_prefix}Qt6BundledFreetype
plugins/platforms/${qt_lib_prefix}qwindows
plugins/tls/${qt_lib_prefix}qopensslbackend
)
foreach (lib ${qt_libs})
list(APPEND qt_libs_list "${qt_loc}/${lib}${qt_lib_suffix}")
endforeach()
target_link_libraries(external_qt
INTERFACE
desktop-app::external_angle
)
elseif (APPLE)
target_include_directories(external_qt SYSTEM
INTERFACE
${qt_loc}/mkspecs/macx-clang
)
set(qt_libs
${common_qt_libs}
lib/${qt_lib_prefix}Qt6BundledFreetype
plugins/platforms/${qt_lib_prefix}qcocoa
plugins/tls/${qt_lib_prefix}qsecuretransportbackend
plugins/networkinformation/${qt_lib_prefix}qscnetworkreachability
)
foreach (lib ${qt_libs})
list(APPEND qt_libs_list "${qt_loc}/${lib}${qt_lib_suffix}")
endforeach()
list(APPEND qt_libs_list
"${qt_loc}/lib/${qt_lib_objects}/QCocoaIntegrationPlugin_resources_1/.rcc/qrc_qcocoaresources.cpp.o"
)
if (WIN32)
set(qt_lib_prefix "")
set(qt_lib_suffix $<$<CONFIG:Debug>:d>.lib)
else()
set(qt_lib_prefix lib)
if (APPLE)
set(qt_lib_suffix $<$<CONFIG:Debug>:_debug>.a)
else()
set(qt_libs_dbus)
set(qt_libs_dbus_plugins)
if (Qt6DBus_FOUND)
set(qt_libs_dbus
lib/${qt_lib_prefix}Qt6DBus
lib/${qt_lib_prefix}Qt6Core
)
set(qt_libs_dbus_plugins
plugins/platforminputcontexts/${qt_lib_prefix}ibusplatforminputcontextplugin
)
endif()
set(qt_libs_waylandclient)
set(qt_libs_waylandclient_plugins)
if (NOT DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION)
set(qt_libs_waylandclient
lib/${qt_lib_prefix}Qt6WaylandEglClientHwIntegration
lib/${qt_lib_prefix}Qt6WaylandClient
)
set(qt_libs_waylandclient_plugins
plugins/platforms/${qt_lib_prefix}qwayland-generic
plugins/platforms/${qt_lib_prefix}qwayland-egl
plugins/wayland-graphics-integration-client/${qt_lib_prefix}qt-plugin-wayland-egl
plugins/wayland-decoration-client/${qt_lib_prefix}bradient
)
endif()
set(qt_libs
plugins/platforminputcontexts/${qt_lib_prefix}composeplatforminputcontextplugin
${qt_libs_dbus_plugins}
${qt_libs_waylandclient_plugins}
plugins/platformthemes/${qt_lib_prefix}qgtk3
plugins/platforms/${qt_lib_prefix}qxcb
plugins/tls/${qt_lib_prefix}qopensslbackend
plugins/xcbglintegrations/${qt_lib_prefix}qxcb-egl-integration
plugins/xcbglintegrations/${qt_lib_prefix}qxcb-glx-integration
plugins/iconengines/${qt_lib_prefix}qsvgicon
lib/${qt_lib_prefix}Qt6XcbQpa
${qt_libs_waylandclient}
${common_qt_libs}
${qt_libs_dbus}
)
foreach (lib ${qt_libs})
list(APPEND qt_libs_list "${qt_loc}/${lib}${qt_lib_suffix}")
endforeach()
set(qt_lib_suffix .a)
endif()
endif()
list(APPEND qt_libs_list
"${qt_loc}/lib/${qt_lib_objects}/Gui_resources_1/.rcc/qrc_qpdf.cpp.o"
"${qt_loc}/lib/${qt_lib_objects}/Widgets_resources_1/.rcc/qrc_qstyle.cpp.o"
"${qt_loc}/lib/${qt_lib_objects}/Widgets_resources_2/.rcc/qrc_qstyle1.cpp.o"
"${qt_loc}/lib/${qt_lib_objects}/Widgets_resources_3/.rcc/qrc_qmessagebox.cpp.o"
if (LINUX)
set(qt_lib_objects objects-RelWithDebInfo)
else()
set(qt_lib_objects objects-$<IF:$<CONFIG:Debug>,Debug,RelWithDebInfo>)
endif()
set(common_qt_libs
plugins/imageformats/${qt_lib_prefix}qwebp
plugins/imageformats/${qt_lib_prefix}qgif
plugins/imageformats/${qt_lib_prefix}qjpeg
lib/${qt_lib_prefix}Qt6Svg
lib/${qt_lib_prefix}Qt6Network
lib/${qt_lib_prefix}Qt6OpenGLWidgets
lib/${qt_lib_prefix}Qt6Widgets
lib/${qt_lib_prefix}Qt6OpenGL
lib/${qt_lib_prefix}Qt6Gui
lib/${qt_lib_prefix}Qt6Core5Compat
lib/${qt_lib_prefix}Qt6Core
lib/${qt_lib_prefix}Qt6BundledHarfbuzz
lib/${qt_lib_prefix}Qt6BundledLibpng
lib/${qt_lib_prefix}Qt6BundledPcre2
)
set(qt_libs_list "")
if (WIN32)
target_include_directories(external_qt SYSTEM
INTERFACE
${qt_loc}/mkspecs/win32-msvc
)
set(qt_libs
${common_qt_libs}
lib/${qt_lib_prefix}Qt6WindowsUIAutomationSupport
lib/${qt_lib_prefix}qtmain
lib/${qt_lib_prefix}Qt6BundledFreetype
plugins/platforms/${qt_lib_prefix}qwindows
plugins/tls/${qt_lib_prefix}qopensslbackend
)
foreach (lib ${qt_libs})
list(APPEND qt_libs_list "${qt_loc}/${lib}${qt_lib_suffix}")
endforeach()
target_link_libraries(external_qt
INTERFACE
${qt_libs_list}
$<TARGET_FILE:desktop-app::external_openssl_ssl>
$<TARGET_FILE:desktop-app::external_openssl_crypto>
desktop-app::external_jpeg
desktop-app::external_zlib
desktop-app::external_angle
)
if (LINUX)
target_include_directories(external_qt SYSTEM
INTERFACE
${qt_loc}/mkspecs/linux-g++
elseif (APPLE)
target_include_directories(external_qt SYSTEM
INTERFACE
${qt_loc}/mkspecs/macx-clang
)
set(qt_libs
${common_qt_libs}
lib/${qt_lib_prefix}Qt6BundledFreetype
plugins/platforms/${qt_lib_prefix}qcocoa
plugins/tls/${qt_lib_prefix}qsecuretransportbackend
plugins/networkinformation/${qt_lib_prefix}qscnetworkreachability
)
foreach (lib ${qt_libs})
list(APPEND qt_libs_list "${qt_loc}/${lib}${qt_lib_suffix}")
endforeach()
list(APPEND qt_libs_list
"${qt_loc}/lib/${qt_lib_objects}/QCocoaIntegrationPlugin_resources_1/.rcc/qrc_qcocoaresources.cpp.o"
)
else()
set(qt_libs_dbus)
set(qt_libs_dbus_plugins)
if (Qt6DBus_FOUND)
set(qt_libs_dbus
lib/${qt_lib_prefix}Qt6DBus
lib/${qt_lib_prefix}Qt6Core
)
target_link_static_libraries(external_qt
INTERFACE
proxy
epoxy
xkbcommon
xkbcommon-x11
xcb-glx
xcb-xkb
xcb-randr
xcb-icccm
xcb-shm
xcb-render
xcb-image
xcb-xfixes
xcb-xinput
xcb-shape
xcb-sync
xcb-util
xcb-render-util
xcb-keysyms
z
)
if (NOT DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION)
target_link_libraries(external_qt
INTERFACE
desktop-app::linux_wayland_helper
$<TARGET_FILE:desktop-app::linux_wayland_helper>
)
endif()
target_link_libraries(external_qt
INTERFACE
desktop-app::linux_xcb_helper
$<TARGET_FILE:desktop-app::linux_xcb_helper>
fontconfig
freetype
xcb
X11
X11-xcb
${CMAKE_DL_LIBS}
pthread
set(qt_libs_dbus_plugins
plugins/platforminputcontexts/${qt_lib_prefix}ibusplatforminputcontextplugin
)
endif()
set(qt_libs_waylandclient)
set(qt_libs_waylandclient_plugins)
if (NOT DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION)
set(qt_libs_waylandclient
lib/${qt_lib_prefix}Qt6WaylandEglClientHwIntegration
lib/${qt_lib_prefix}Qt6WaylandClient
)
set(qt_libs_waylandclient_plugins
plugins/platforms/${qt_lib_prefix}qwayland-generic
plugins/platforms/${qt_lib_prefix}qwayland-egl
plugins/wayland-graphics-integration-client/${qt_lib_prefix}qt-plugin-wayland-egl
plugins/wayland-decoration-client/${qt_lib_prefix}bradient
)
endif()
set(qt_libs
plugins/platforminputcontexts/${qt_lib_prefix}composeplatforminputcontextplugin
${qt_libs_dbus_plugins}
${qt_libs_waylandclient_plugins}
plugins/platformthemes/${qt_lib_prefix}qgtk3
plugins/platforms/${qt_lib_prefix}qxcb
plugins/tls/${qt_lib_prefix}qopensslbackend
plugins/xcbglintegrations/${qt_lib_prefix}qxcb-egl-integration
plugins/xcbglintegrations/${qt_lib_prefix}qxcb-glx-integration
plugins/iconengines/${qt_lib_prefix}qsvgicon
lib/${qt_lib_prefix}Qt6XcbQpa
${qt_libs_waylandclient}
${common_qt_libs}
${qt_libs_dbus}
)
foreach (lib ${qt_libs})
list(APPEND qt_libs_list "${qt_loc}/${lib}${qt_lib_suffix}")
endforeach()
endif()
list(APPEND qt_libs_list
"${qt_loc}/lib/${qt_lib_objects}/Gui_resources_1/.rcc/qrc_qpdf.cpp.o"
"${qt_loc}/lib/${qt_lib_objects}/Widgets_resources_1/.rcc/qrc_qstyle.cpp.o"
"${qt_loc}/lib/${qt_lib_objects}/Widgets_resources_2/.rcc/qrc_qstyle1.cpp.o"
"${qt_loc}/lib/${qt_lib_objects}/Widgets_resources_3/.rcc/qrc_qmessagebox.cpp.o"
)
target_link_libraries(external_qt
INTERFACE
${qt_libs_list}
$<LINK_ONLY:desktop-app::external_openssl>
$<TARGET_FILE:desktop-app::external_openssl_ssl>
$<TARGET_FILE:desktop-app::external_openssl_crypto>
$<LINK_ONLY:desktop-app::external_jpeg>
$<LINK_ONLY:desktop-app::external_zlib>
$<TARGET_FILE:desktop-app::external_zlib>
)
if (LINUX)
target_include_directories(external_qt SYSTEM
INTERFACE
${qt_loc}/mkspecs/linux-g++
)
target_link_static_libraries(external_qt
INTERFACE
proxy
epoxy
xkbcommon
xkbcommon-x11
xcb-glx
xcb-xkb
xcb-randr
xcb-icccm
xcb-shm
xcb-render
xcb-image
xcb-xfixes
xcb-xinput
xcb-shape
xcb-sync
xcb-util
xcb-render-util
xcb-keysyms
)
if (NOT DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION)
target_link_libraries(external_qt
INTERFACE
desktop-app::linux_wayland_helper
)
endif()
target_link_libraries(external_qt
INTERFACE
desktop-app::linux_xcb_helper
fontconfig
freetype
xcb
X11
X11-xcb
)
endif()

View file

@ -16,20 +16,19 @@ if (DESKTOP_APP_USE_PACKAGED)
if (range-v3_FOUND)
target_link_libraries(external_ranges INTERFACE range-v3::range-v3)
return()
endif()
endif()
if (NOT range-v3_FOUND)
target_include_directories(external_ranges SYSTEM
INTERFACE
${third_party_loc}/range-v3/include
)
target_include_directories(external_ranges SYSTEM
INTERFACE
${third_party_loc}/range-v3/include
)
if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
target_compile_options(external_ranges
INTERFACE
/Zc:preprocessor # need for range-v3 see https://github.com/ericniebler/range-v3#supported-compilers
/wd5105 # needed for `/Zc:preprocessor`, suppressing C5105 "macro expansion producing 'defined' has undefined behavior"
)
endif()
if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
target_compile_options(external_ranges
INTERFACE
/Zc:preprocessor # need for range-v3 see https://github.com/ericniebler/range-v3#supported-compilers
/wd5105 # needed for `/Zc:preprocessor`, suppressing C5105 "macro expansion producing 'defined' has undefined behavior"
)
endif()

View file

@ -7,149 +7,133 @@
add_library(external_rlottie INTERFACE IMPORTED GLOBAL)
add_library(desktop-app::external_rlottie ALIAS external_rlottie)
if (DESKTOP_APP_USE_PACKAGED)
if (DESKTOP_APP_USE_PACKAGED_RLOTTIE)
find_package(rlottie QUIET)
if (rlottie_FOUND)
target_link_libraries(external_rlottie INTERFACE rlottie::rlottie)
else()
find_package(PkgConfig REQUIRED)
pkg_check_modules(RLOTTIE IMPORTED_TARGET rlottie)
if (RLOTTIE_FOUND)
target_link_libraries(external_rlottie INTERFACE PkgConfig::RLOTTIE)
endif()
return()
endif()
find_package(PkgConfig REQUIRED)
pkg_check_modules(RLOTTIE REQUIRED IMPORTED_TARGET rlottie)
target_link_libraries(external_rlottie INTERFACE PkgConfig::RLOTTIE)
return()
endif()
if (rlottie_FOUND OR RLOTTIE_FOUND)
target_compile_definitions(external_rlottie
INTERFACE
DESKTOP_APP_USE_PACKAGED_RLOTTIE
)
else()
add_library(external_rlottie_bundled STATIC)
init_target(external_rlottie_bundled "(external)")
add_library(external_rlottie_bundled STATIC)
init_target(external_rlottie_bundled "(external)")
get_filename_component(src_loc . REALPATH)
set(rlottie_loc ${third_party_loc}/rlottie)
get_filename_component(src_loc . REALPATH)
set(rlottie_loc ${third_party_loc}/rlottie)
target_sources(external_rlottie_bundled PRIVATE ${src_loc}/config/config.h)
nice_target_sources(external_rlottie_bundled ${rlottie_loc}
target_sources(external_rlottie_bundled PRIVATE ${src_loc}/config/config.h)
nice_target_sources(external_rlottie_bundled ${rlottie_loc}
PRIVATE
inc/rlottie.h
inc/rlottie_capi.h
inc/rlottiecommon.h
src/lottie/lottieanimation.cpp
src/lottie/lottieitem.cpp
src/lottie/lottieitem.h
src/lottie/lottiekeypath.cpp
src/lottie/lottiekeypath.h
src/lottie/lottieloader.cpp
src/lottie/lottieloader.h
src/lottie/lottiemodel.cpp
src/lottie/lottiemodel.h
src/lottie/lottieparser.cpp
src/lottie/lottieparser.h
src/lottie/lottieproxymodel.cpp
src/lottie/lottieproxymodel.h
src/vector/freetype/v_ft_math.cpp
src/vector/freetype/v_ft_math.h
src/vector/freetype/v_ft_raster.cpp
src/vector/freetype/v_ft_raster.h
src/vector/freetype/v_ft_stroker.cpp
src/vector/freetype/v_ft_stroker.h
src/vector/freetype/v_ft_types.h
# src/vector/pixman/pixman-arm-neon-asm.h
# src/vector/pixman/pixman-arm-neon-asm.S
src/vector/pixman/vregion.cpp
src/vector/pixman/vregion.h
src/vector/vbezier.cpp
src/vector/vbezier.h
src/vector/vbitmap.cpp
src/vector/vbitmap.h
src/vector/vbrush.cpp
src/vector/vbrush.h
src/vector/vcompositionfunctions.cpp
src/vector/vcowptr.h
src/vector/vdasher.cpp
src/vector/vdasher.h
src/vector/vdebug.cpp
src/vector/vdebug.h
src/vector/vdrawable.cpp
src/vector/vdrawable.h
src/vector/vdrawhelper.cpp
src/vector/vdrawhelper.h
src/vector/vdrawhelper_neon.cpp
src/vector/vdrawhelper_sse2.cpp
src/vector/velapsedtimer.cpp
src/vector/velapsedtimer.h
src/vector/vglobal.h
src/vector/vimageloader.cpp
src/vector/vimageloader.h
src/vector/vinterpolator.cpp
src/vector/vinterpolator.h
src/vector/vline.h
src/vector/vmatrix.cpp
src/vector/vmatrix.h
src/vector/vpainter.cpp
src/vector/vpainter.h
src/vector/vpath.cpp
src/vector/vpath.h
src/vector/vpathmesure.cpp
src/vector/vpathmesure.h
src/vector/vpoint.h
src/vector/vraster.cpp
src/vector/vraster.h
src/vector/vrect.cpp
src/vector/vrect.h
src/vector/vrle.cpp
src/vector/vrle.h
src/vector/vstackallocator.h
src/vector/vtaskqueue.h
)
target_compile_definitions(external_rlottie_bundled
PUBLIC
LOT_BUILD
PRIVATE
_USE_MATH_DEFINES
"RAPIDJSON_ASSERT=(void)"
LOTTIE_DISABLE_ARM_NEON
)
target_include_directories(external_rlottie_bundled
PUBLIC
${rlottie_loc}/inc
PRIVATE
${src_loc}/config
${rlottie_loc}/src/lottie
${rlottie_loc}/src/vector
${rlottie_loc}/src/vector/pixman
${rlottie_loc}/src/vector/freetype
)
if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
target_compile_options(external_rlottie_bundled
PRIVATE
inc/rlottie.h
inc/rlottie_capi.h
inc/rlottiecommon.h
src/lottie/lottieanimation.cpp
src/lottie/lottieitem.cpp
src/lottie/lottieitem.h
src/lottie/lottiekeypath.cpp
src/lottie/lottiekeypath.h
src/lottie/lottieloader.cpp
src/lottie/lottieloader.h
src/lottie/lottiemodel.cpp
src/lottie/lottiemodel.h
src/lottie/lottieparser.cpp
src/lottie/lottieparser.h
src/lottie/lottieproxymodel.cpp
src/lottie/lottieproxymodel.h
src/vector/freetype/v_ft_math.cpp
src/vector/freetype/v_ft_math.h
src/vector/freetype/v_ft_raster.cpp
src/vector/freetype/v_ft_raster.h
src/vector/freetype/v_ft_stroker.cpp
src/vector/freetype/v_ft_stroker.h
src/vector/freetype/v_ft_types.h
# src/vector/pixman/pixman-arm-neon-asm.h
# src/vector/pixman/pixman-arm-neon-asm.S
src/vector/pixman/vregion.cpp
src/vector/pixman/vregion.h
src/vector/vbezier.cpp
src/vector/vbezier.h
src/vector/vbitmap.cpp
src/vector/vbitmap.h
src/vector/vbrush.cpp
src/vector/vbrush.h
src/vector/vcompositionfunctions.cpp
src/vector/vcowptr.h
src/vector/vdasher.cpp
src/vector/vdasher.h
src/vector/vdebug.cpp
src/vector/vdebug.h
src/vector/vdrawable.cpp
src/vector/vdrawable.h
src/vector/vdrawhelper.cpp
src/vector/vdrawhelper.h
src/vector/vdrawhelper_neon.cpp
src/vector/vdrawhelper_sse2.cpp
src/vector/velapsedtimer.cpp
src/vector/velapsedtimer.h
src/vector/vglobal.h
src/vector/vimageloader.cpp
src/vector/vimageloader.h
src/vector/vinterpolator.cpp
src/vector/vinterpolator.h
src/vector/vline.h
src/vector/vmatrix.cpp
src/vector/vmatrix.h
src/vector/vpainter.cpp
src/vector/vpainter.h
src/vector/vpath.cpp
src/vector/vpath.h
src/vector/vpathmesure.cpp
src/vector/vpathmesure.h
src/vector/vpoint.h
src/vector/vraster.cpp
src/vector/vraster.h
src/vector/vrect.cpp
src/vector/vrect.h
src/vector/vrle.cpp
src/vector/vrle.h
src/vector/vstackallocator.h
src/vector/vtaskqueue.h
)
target_compile_definitions(external_rlottie_bundled
PUBLIC
LOT_BUILD
PRIVATE
_USE_MATH_DEFINES
"RAPIDJSON_ASSERT=(void)"
LOTTIE_DISABLE_ARM_NEON
)
target_include_directories(external_rlottie_bundled
PUBLIC
${rlottie_loc}/inc
PRIVATE
${src_loc}/config
${rlottie_loc}/src/lottie
${rlottie_loc}/src/vector
${rlottie_loc}/src/vector/pixman
${rlottie_loc}/src/vector/freetype
)
if (LINUX)
target_link_libraries(external_rlottie_bundled
PRIVATE
pthread
)
endif()
if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
target_compile_options(external_rlottie_bundled
PRIVATE
/w44244 # 'initializing': conversion from 'double' to 'float'
/w44251 # needs to have dll-interface to be used by clients of class
)
endif()
target_link_libraries(external_rlottie
INTERFACE
external_rlottie_bundled
/w44244 # 'initializing': conversion from 'double' to 'float'
/w44251 # needs to have dll-interface to be used by clients of class
)
endif()
target_link_libraries(external_rlottie
INTERFACE
external_rlottie_bundled
)

View file

@ -12,37 +12,38 @@ if (DESKTOP_APP_USE_PACKAGED)
pkg_check_modules(RNNOISE REQUIRED IMPORTED_TARGET rnnoise)
target_link_libraries(external_rnnoise INTERFACE PkgConfig::RNNOISE)
else()
add_library(external_rnnoise STATIC IMPORTED GLOBAL)
add_library(desktop-app::external_rnnoise ALIAS external_rnnoise)
set(rnnoise_lib_loc ${libs_loc}/rnnoise/out)
if (WIN32)
target_include_directories(external_rnnoise SYSTEM
INTERFACE
${libs_loc}/rnnoise/include
)
set_target_properties(external_rnnoise PROPERTIES
IMPORTED_LOCATION "${rnnoise_lib_loc}/Release/rnnoise.lib"
IMPORTED_LOCATION_DEBUG "${rnnoise_lib_loc}/Debug/rnnoise.lib"
)
elseif (APPLE)
target_include_directories(external_rnnoise SYSTEM
INTERFACE
${libs_loc}/rnnoise/include
)
set_target_properties(external_rnnoise PROPERTIES
IMPORTED_LOCATION "${rnnoise_lib_loc}/Release/librnnoise.a"
IMPORTED_LOCATION_DEBUG "${rnnoise_lib_loc}/Debug/librnnoise.a"
)
else()
target_include_directories(external_rnnoise SYSTEM
INTERFACE
/usr/local/include
)
find_library(RNNOISE_LIBRARY librnnoise.a)
set_target_properties(external_rnnoise PROPERTIES
IMPORTED_LOCATION "${RNNOISE_LIBRARY}"
)
endif()
return()
endif()
add_library(external_rnnoise STATIC IMPORTED GLOBAL)
add_library(desktop-app::external_rnnoise ALIAS external_rnnoise)
set(rnnoise_lib_loc ${libs_loc}/rnnoise/out)
if (WIN32)
target_include_directories(external_rnnoise SYSTEM
INTERFACE
${libs_loc}/rnnoise/include
)
set_target_properties(external_rnnoise PROPERTIES
IMPORTED_LOCATION "${rnnoise_lib_loc}/Release/rnnoise.lib"
IMPORTED_LOCATION_DEBUG "${rnnoise_lib_loc}/Debug/rnnoise.lib"
)
elseif (APPLE)
target_include_directories(external_rnnoise SYSTEM
INTERFACE
${libs_loc}/rnnoise/include
)
set_target_properties(external_rnnoise PROPERTIES
IMPORTED_LOCATION "${rnnoise_lib_loc}/Release/librnnoise.a"
IMPORTED_LOCATION_DEBUG "${rnnoise_lib_loc}/Debug/librnnoise.a"
)
else()
target_include_directories(external_rnnoise SYSTEM
INTERFACE
/usr/local/include
)
find_library(RNNOISE_LIBRARY librnnoise.a REQUIRED)
set_target_properties(external_rnnoise PROPERTIES
IMPORTED_LOCATION "${RNNOISE_LIBRARY}"
)
endif()

View file

@ -1,50 +0,0 @@
# 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_statusnotifieritem STATIC)
add_library(desktop-app::external_statusnotifieritem ALIAS external_statusnotifieritem)
init_target(external_statusnotifieritem "(external)")
set(statusnotifieritem_loc ${third_party_loc}/statusnotifieritem)
nice_target_sources(external_statusnotifieritem ${statusnotifieritem_loc}
PRIVATE
dbustypes.cpp
dbustypes.h
statusnotifieritem.cpp
statusnotifieritem.h
)
if (DESKTOP_APP_QT6)
qt6_add_dbus_adaptor(sni_adaptor
${statusnotifieritem_loc}/org.kde.StatusNotifierItem.xml
${statusnotifieritem_loc}/statusnotifieritem.h
StatusNotifierItem
)
else()
qt5_add_dbus_adaptor(sni_adaptor
${statusnotifieritem_loc}/org.kde.StatusNotifierItem.xml
${statusnotifieritem_loc}/statusnotifieritem.h
StatusNotifierItem
)
endif()
set_target_properties(external_statusnotifieritem PROPERTIES AUTOMOC ON)
target_sources(external_statusnotifieritem PRIVATE ${sni_adaptor})
target_include_directories(external_statusnotifieritem
PUBLIC
${statusnotifieritem_loc}
PRIVATE
"${CMAKE_CURRENT_BINARY_DIR}"
)
target_link_libraries(external_statusnotifieritem
PRIVATE
desktop-app::external_dbusmenu_qt
desktop-app::external_qt
)

View file

@ -9,11 +9,16 @@ add_library(desktop-app::external_variant ALIAS external_variant)
if (DESKTOP_APP_USE_PACKAGED)
find_path(VARIANT_INCLUDE_DIRS mapbox/variant.hpp)
if (VARIANT_INCLUDE_DIRS)
target_include_directories(external_variant SYSTEM
INTERFACE
${VARIANT_INCLUDE_DIRS}
)
return()
endif()
endif()
if (NOT VARIANT_INCLUDE_DIRS)
target_include_directories(external_variant SYSTEM
INTERFACE
${third_party_loc}/variant/include
)
endif()
target_include_directories(external_variant SYSTEM
INTERFACE
${third_party_loc}/variant/include
)

53
external/vpx/CMakeLists.txt vendored Normal file
View file

@ -0,0 +1,53 @@
# 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
if (DESKTOP_APP_USE_PACKAGED)
add_library(external_vpx INTERFACE IMPORTED GLOBAL)
add_library(desktop-app::external_vpx ALIAS external_vpx)
find_package(PkgConfig REQUIRED)
pkg_check_modules(LIBVPX IMPORTED_TARGET vpx>=1.10.0)
target_link_libraries(external_vpx INTERFACE PkgConfig::LIBVPX)
return()
endif()
add_library(external_vpx STATIC IMPORTED GLOBAL)
add_library(desktop-app::external_vpx ALIAS external_vpx)
if (WIN32)
target_include_directories(external_vpx SYSTEM
INTERFACE
${libs_loc}/local/include
)
if (build_win64)
set(libvpx_release_folder x64)
else()
set(libvpx_release_folder Win32)
endif()
set(vpx_lib_loc ${libs_loc}/local/lib/${libvpx_release_folder})
set_target_properties(external_vpx PROPERTIES
IMPORTED_LOCATION "${vpx_lib_loc}/vpxmt.lib"
IMPORTED_LOCATION_DEBUG "${vpx_lib_loc}/vpxmt.lib"
)
elseif (APPLE)
target_include_directories(external_vpx SYSTEM
INTERFACE
${libs_loc}/local/include
)
set_target_properties(external_vpx PROPERTIES
IMPORTED_LOCATION ${libs_loc}/local/lib/libvpx.a
)
else()
target_include_directories(external_vpx SYSTEM
INTERFACE
/usr/local/include
)
find_library(VPX_LIBRARY libvpx.a REQUIRED)
set_target_properties(external_vpx PROPERTIES
IMPORTED_LOCATION "${VPX_LIBRARY}"
)
endif()

View file

@ -10,114 +10,118 @@ add_library(desktop-app::external_webrtc ALIAS external_webrtc)
if (DESKTOP_APP_USE_PACKAGED)
find_package(tg_owt REQUIRED)
target_link_libraries(external_webrtc INTERFACE tg_owt::tg_owt)
else()
set(webrtc_loc ${libs_loc}/tg_owt/src)
set(webrtc_build_loc ${libs_loc}/tg_owt/out/$<IF:$<CONFIG:Debug>,Debug,Release>)
return()
endif()
set(webrtc_loc ${libs_loc}/tg_owt/src)
set(webrtc_build_loc ${libs_loc}/tg_owt/out/$<IF:$<CONFIG:Debug>,Debug,Release>)
target_compile_definitions(external_webrtc
INTERFACE
WEBRTC_ENABLE_PROTOBUF=0
WEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE
RTC_ENABLE_VP9
HAVE_SCTP
WEBRTC_USE_H264
WEBRTC_USE_BUILTIN_ISAC_FLOAT
WEBRTC_LIBRARY_IMPL
WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS=1
WEBRTC_HAVE_USRSCTP
ABSL_ALLOCATOR_NOTHROW=1
)
if (WIN32)
set(webrtc_lib_prefix "")
set(webrtc_lib_suffix .lib)
target_compile_definitions(external_webrtc
INTERFACE
WEBRTC_ENABLE_PROTOBUF=0
WEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE
RTC_ENABLE_VP9
HAVE_SCTP
WEBRTC_USE_H264
WEBRTC_USE_BUILTIN_ISAC_FLOAT
WEBRTC_LIBRARY_IMPL
WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS=1
WEBRTC_HAVE_USRSCTP
ABSL_ALLOCATOR_NOTHROW=1
WEBRTC_WIN
)
else()
set(webrtc_lib_prefix lib)
set(webrtc_lib_suffix .a)
if (WIN32)
set(webrtc_lib_prefix "")
set(webrtc_lib_suffix .lib)
if (APPLE)
target_compile_definitions(external_webrtc
INTERFACE
WEBRTC_WIN
WEBRTC_MAC
)
else()
set(webrtc_lib_prefix lib)
set(webrtc_lib_suffix .a)
if (APPLE)
target_compile_definitions(external_webrtc
INTERFACE
WEBRTC_MAC
)
else()
target_compile_definitions(external_webrtc
INTERFACE
WEBRTC_LINUX
WEBRTC_USE_X11
WEBRTC_USE_PIPEWIRE
)
endif()
target_compile_definitions(external_webrtc
INTERFACE
WEBRTC_POSIX
WEBRTC_LINUX
WEBRTC_USE_X11
WEBRTC_USE_PIPEWIRE
)
endif()
target_compile_definitions(external_webrtc
INTERFACE
WEBRTC_POSIX
)
endif()
target_include_directories(external_webrtc SYSTEM
INTERFACE
${webrtc_loc}
${webrtc_loc}/third_party/abseil-cpp
${webrtc_loc}/third_party/libyuv/include
)
set(webrtc_libs
${webrtc_lib_prefix}tg_owt
)
if (APPLE)
target_include_directories(external_webrtc SYSTEM
INTERFACE
${webrtc_loc}
${webrtc_loc}/third_party/abseil-cpp
${webrtc_loc}/third_party/libyuv/include
${webrtc_loc}/sdk/objc
${webrtc_loc}/sdk/objc/base
${webrtc_loc}/sdk/objc/components/video_codec
)
endif()
foreach (lib ${webrtc_libs})
list(APPEND webrtc_libs_list "${webrtc_build_loc}/${lib}${webrtc_lib_suffix}")
endforeach()
set(webrtc_libs
${webrtc_lib_prefix}tg_owt
)
if (APPLE)
target_include_directories(external_webrtc SYSTEM
INTERFACE
${webrtc_loc}/sdk/objc
${webrtc_loc}/sdk/objc/base
${webrtc_loc}/sdk/objc/components/video_codec
)
endif()
foreach (lib ${webrtc_libs})
list(APPEND webrtc_libs_list "${webrtc_build_loc}/${lib}${webrtc_lib_suffix}")
endforeach()
target_link_libraries(external_webrtc
INTERFACE
${webrtc_libs_list}
$<LINK_ONLY:desktop-app::external_openssl>
$<LINK_ONLY:desktop-app::external_jpeg>
$<LINK_ONLY:desktop-app::external_opus>
$<TARGET_FILE:desktop-app::external_opus>
$<LINK_ONLY:desktop-app::external_vpx>
$<TARGET_FILE:desktop-app::external_vpx>
)
if (WIN32)
target_link_libraries(external_webrtc
INTERFACE
${webrtc_libs_list}
desktop-app::external_openssl
desktop-app::external_jpeg
desktop-app::external_opus
Secur32.lib # Required for rtc_base/http_common.cc
)
elseif (APPLE)
target_link_libraries(external_webrtc
INTERFACE
-ObjC
)
else()
# Required for desktop_capture
target_link_static_libraries(external_webrtc
INTERFACE
Xcomposite
Xdamage
Xext
Xfixes
Xrandr
Xrender
Xtst
)
target_link_libraries(external_webrtc
INTERFACE
X11
gio-2.0
gobject-2.0
glib-2.0
)
if (WIN32)
target_link_libraries(external_webrtc
INTERFACE
Secur32.lib # Required for rtc_base/http_common.cc
)
elseif (APPLE)
target_link_libraries(external_webrtc
INTERFACE
-ObjC
)
else()
# Required for desktop_capture
target_link_static_libraries(external_webrtc
INTERFACE
Xcomposite
Xdamage
Xext
Xfixes
Xrandr
Xrender
Xtst
)
target_link_libraries(external_webrtc
INTERFACE
X11
gio-2.0
gobject-2.0
glib-2.0
)
endif()
endif()

View file

@ -4,13 +4,19 @@
# For license and copyright information please follow this link:
# https://github.com/desktop-app/legal/blob/master/LEGAL
add_library(external_zlib INTERFACE IMPORTED GLOBAL)
add_library(desktop-app::external_zlib ALIAS external_zlib)
if (DESKTOP_APP_USE_PACKAGED)
add_library(external_zlib INTERFACE IMPORTED GLOBAL)
add_library(desktop-app::external_zlib ALIAS external_zlib)
find_package(ZLIB REQUIRED)
target_link_libraries(external_zlib INTERFACE ZLIB::ZLIB)
elseif (WIN32)
return()
endif()
add_library(external_zlib STATIC IMPORTED GLOBAL)
add_library(desktop-app::external_zlib ALIAS external_zlib)
if (WIN32)
target_compile_definitions(external_zlib INTERFACE ZLIB_WINAPI)
target_include_directories(external_zlib SYSTEM INTERFACE ${libs_loc}/zlib)
if (build_win64)
@ -18,10 +24,18 @@ elseif (WIN32)
else()
set(zlib_config_folder x86)
endif()
set(zlib_lib_loc ${libs_loc}/zlib/contrib/vstudio/vc14/${zlib_config_folder}/ZlibStat$<IF:$<CONFIG:Debug>,Debug,ReleaseWithoutAsm>)
target_link_libraries(external_zlib INTERFACE ${zlib_lib_loc}/zlibstat.lib)
set(zlib_lib_loc ${libs_loc}/zlib/contrib/vstudio/vc14/${zlib_config_folder})
set_target_properties(external_zlib PROPERTIES
IMPORTED_LOCATION "${zlib_lib_loc}/ZlibStatReleaseWithoutAsm/zlibstat.lib"
IMPORTED_LOCATION_DEBUG "${zlib_lib_loc}/ZlibStatDebug/zlibstat.lib"
)
elseif (APPLE)
target_link_libraries(external_zlib INTERFACE ${libs_loc}/local/lib/libz.a)
set_target_properties(external_zlib PROPERTIES
IMPORTED_LOCATION ${libs_loc}/local/lib/libz.a
)
else()
target_link_static_libraries(external_zlib INTERFACE z)
find_library(ZLIB_LIBRARY libz.a REQUIRED)
set_target_properties(external_zlib PROPERTIES
IMPORTED_LOCATION "${ZLIB_LIBRARY}"
)
endif()

View file

@ -0,0 +1,19 @@
# 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(linux_jemalloc_helper OBJECT)
init_target(linux_jemalloc_helper "(external)")
add_library(desktop-app::linux_jemalloc_helper ALIAS linux_jemalloc_helper)
nice_target_sources(linux_jemalloc_helper ${CMAKE_CURRENT_SOURCE_DIR}
PRIVATE
linux_jemalloc_helper.cpp
)
target_link_libraries(linux_jemalloc_helper
PRIVATE
desktop-app::external_jemalloc
)

View file

@ -0,0 +1,25 @@
// 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
//
#ifdef __FreeBSD__
#include <malloc_np.h>
#else // __FreeBSD__
#include <jemalloc/jemalloc.h>
#endif // !__FreeBSD__
namespace {
class JemallocInitializer {
public:
JemallocInitializer() {
auto backgroundThread = true;
mallctl("background_thread", nullptr, nullptr, &backgroundThread, sizeof(bool));
}
};
static const JemallocInitializer initializer;
} // namespace

View file

@ -14,7 +14,6 @@ PRIVATE
)
target_link_libraries(linux_wayland_helper
PUBLIC
PRIVATE
desktop-app::external_gsl
${CMAKE_DL_LIBS}
)

View file

@ -12,8 +12,3 @@ nice_target_sources(linux_xcb_helper ${CMAKE_CURRENT_SOURCE_DIR}
PRIVATE
linux_xcb_helper.cpp
)
target_link_libraries(linux_xcb_helper
PUBLIC
${CMAKE_DL_LIBS}
)

View file

@ -64,6 +64,13 @@ if (DESKTOP_APP_USE_PACKAGED_FONTS)
)
endif()
if (DESKTOP_APP_USE_PACKAGED_RLOTTIE)
target_compile_definitions(common_options
INTERFACE
DESKTOP_APP_USE_PACKAGED_RLOTTIE
)
endif()
if (NOT DESKTOP_APP_SPECIAL_TARGET STREQUAL "")
target_compile_definitions(common_options
INTERFACE

View file

@ -23,6 +23,7 @@ INTERFACE
target_compile_definitions(common_options
INTERFACE
$<IF:$<CONFIG:Debug>,,_FORTIFY_SOURCE=2>
_GLIBCXX_ASSERTIONS
)
target_link_options(common_options
@ -63,7 +64,9 @@ endif()
target_link_libraries(common_options
INTERFACE
desktop-app::external_jemalloc
desktop-app::linux_jemalloc_helper
$<TARGET_OBJECTS:desktop-app::linux_jemalloc_helper>
${CMAKE_DL_LIBS}
)
if (DESKTOP_APP_USE_ALLOCATION_TRACER)
@ -80,7 +83,7 @@ if (DESKTOP_APP_USE_ALLOCATION_TRACER)
-Wl,-wrap,aligned_alloc
-Wl,-wrap,posix_memalign
-Wl,-wrap,free
-Wl,--no-as-needed,-lrt,--as-needed
-Wl,--push-state,--no-as-needed,-lrt,--pop-state
)
target_link_libraries(common_options
INTERFACE
@ -89,7 +92,14 @@ if (DESKTOP_APP_USE_ALLOCATION_TRACER)
)
endif()
if (NOT DESKTOP_APP_USE_PACKAGED)
if (DESKTOP_APP_USE_PACKAGED)
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)
target_link_libraries(common_options
INTERFACE
Threads::Threads
)
else()
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
target_link_options(common_options
INTERFACE
@ -117,16 +127,3 @@ if (NOT DESKTOP_APP_USE_PACKAGED)
# -pie # https://gitlab.gnome.org/GNOME/nautilus/-/issues/1601
)
endif()
if (DESKTOP_APP_USE_PACKAGED)
find_library(ATOMIC_LIBRARY atomic)
else()
find_library(ATOMIC_LIBRARY libatomic.a)
endif()
if (ATOMIC_LIBRARY)
target_link_libraries(common_options
INTERFACE
${ATOMIC_LIBRARY}
)
endif()

View file

@ -16,17 +16,13 @@ function(target_link_static_libraries target_name)
if (${entry} STREQUAL "PRIVATE" OR ${entry} STREQUAL "PUBLIC" OR ${entry} STREQUAL "INTERFACE")
set(writing_now ${entry})
else()
find_library(static_lib_${entry} lib${entry}.a)
set(full_path "${static_lib_${entry}}")
if (${full_path} STREQUAL static_lib_${entry}-NOTFOUND)
message(FATAL_ERROR "Could not find static library lib${entry}.a")
endif()
set(link_option "-Wl,--push-state,-Bstatic,-l${entry},--pop-state")
if ("${writing_now}" STREQUAL "PRIVATE")
list(APPEND private_libs ${full_path})
list(APPEND private_libs ${link_option})
elseif ("${writing_now}" STREQUAL "PUBLIC")
list(APPEND public_libs ${full_path})
list(APPEND public_libs ${link_option})
elseif ("${writing_now}" STREQUAL "INTERFACE")
list(APPEND interface_libs ${full_path})
list(APPEND interface_libs ${link_option})
else()
message(FATAL_ERROR "Unknown frameworks scope for target ${target_name}")
endif()

View file

@ -23,6 +23,8 @@ option(DESKTOP_APP_DISABLE_X11_INTEGRATION "Disable all code for X11 integration
option(DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION "Disable all code for Wayland integration (Linux only)." OFF)
option(DESKTOP_APP_USE_ALLOCATION_TRACER "Use simple allocation tracer (Linux only)." OFF)
option(DESKTOP_APP_USE_PACKAGED_LAZY "Bundle recommended Qt plugins for self-contained packages. (Linux only)" OFF)
option(DESKTOP_APP_USE_PACKAGED_FONTS "Use preinstalled fonts instead of bundled patched ones." OFF)
option(DESKTOP_APP_USE_PACKAGED_RLOTTIE "Find rlottie using CMake instead of bundled patched one." OFF)
option(DESKTOP_APP_DISABLE_SPELLCHECK "Disable spellcheck library." OFF)
option(DESKTOP_APP_DISABLE_CRASH_REPORTS "Disable crash report generation." ${no_special_target})
option(DESKTOP_APP_DISABLE_AUTOUPDATE "Disable autoupdate." ${disable_autoupdate})
@ -37,12 +39,6 @@ else()
set(DESKTOP_APP_MAC_ARCH "x86_64;arm64" CACHE STRING "Target macOS arch. (macOS only)")
endif()
set(dont_bundle_fonts 0)
if (DESKTOP_APP_USE_PACKAGED AND NOT DESKTOP_APP_USE_PACKAGED_LAZY)
set(dont_bundle_fonts 1)
endif()
option(DESKTOP_APP_USE_PACKAGED_FONTS "Use preinstalled fonts instead of bundled one." ${dont_bundle_fonts})
set(add_hunspell_library 0)
if ((WIN32
OR (LINUX AND NOT DESKTOP_APP_USE_ENCHANT)