Updated cmake sources to TDesktop version 2.5.1
This commit is contained in:
commit
1954317c84
21 changed files with 276 additions and 59 deletions
2
external/CMakeLists.txt
vendored
2
external/CMakeLists.txt
vendored
|
|
@ -35,7 +35,7 @@ endif()
|
||||||
add_checked_subdirectory(iconv)
|
add_checked_subdirectory(iconv)
|
||||||
add_checked_subdirectory(jpeg)
|
add_checked_subdirectory(jpeg)
|
||||||
add_checked_subdirectory(lz4)
|
add_checked_subdirectory(lz4)
|
||||||
if (LINUX)
|
if (LINUX AND NOT DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION)
|
||||||
add_checked_subdirectory(materialdecoration)
|
add_checked_subdirectory(materialdecoration)
|
||||||
endif()
|
endif()
|
||||||
add_checked_subdirectory(minizip)
|
add_checked_subdirectory(minizip)
|
||||||
|
|
|
||||||
8
external/auto_updates/lzma/CMakeLists.txt
vendored
8
external/auto_updates/lzma/CMakeLists.txt
vendored
|
|
@ -12,7 +12,13 @@ INTERFACE
|
||||||
${libs_loc}/lzma/C
|
${libs_loc}/lzma/C
|
||||||
)
|
)
|
||||||
|
|
||||||
set(lzma_lib_loc ${libs_loc}/lzma/C/Util/LzmaLib/$<IF:$<CONFIG:Debug>,Debug,Release>)
|
if (build_win64)
|
||||||
|
set(lzma_platform_dir x64/)
|
||||||
|
else()
|
||||||
|
set(lzma_platform_dir "")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(lzma_lib_loc ${libs_loc}/lzma/C/Util/LzmaLib/${lzma_platform_dir}$<IF:$<CONFIG:Debug>,Debug,Release>)
|
||||||
|
|
||||||
target_link_libraries(external_lzma
|
target_link_libraries(external_lzma
|
||||||
INTERFACE
|
INTERFACE
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,13 @@ INTERFACE
|
||||||
${libs_loc}/breakpad/src
|
${libs_loc}/breakpad/src
|
||||||
)
|
)
|
||||||
|
|
||||||
set(breakpad_lib_loc ${libs_loc}/breakpad/src/out/$<IF:$<CONFIG:Debug>,Debug,Release>/obj/client)
|
if (build_win64)
|
||||||
|
set(breakpad_config_add _x64)
|
||||||
|
else()
|
||||||
|
set(breakpad_config_add "")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(breakpad_lib_loc ${libs_loc}/breakpad/src/out/$<IF:$<CONFIG:Debug>,Debug${breakpad_config_add},Release${breakpad_config_add}>/obj/client)
|
||||||
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
target_link_libraries(external_breakpad
|
target_link_libraries(external_breakpad
|
||||||
|
|
|
||||||
2
external/ffmpeg/CMakeLists.txt
vendored
2
external/ffmpeg/CMakeLists.txt
vendored
|
|
@ -68,7 +68,7 @@ else()
|
||||||
va-drm
|
va-drm
|
||||||
va
|
va
|
||||||
vdpau
|
vdpau
|
||||||
wayland-client
|
Xv
|
||||||
Xext
|
Xext
|
||||||
Xfixes
|
Xfixes
|
||||||
)
|
)
|
||||||
|
|
|
||||||
6
external/openssl/CMakeLists.txt
vendored
6
external/openssl/CMakeLists.txt
vendored
|
|
@ -9,7 +9,11 @@ add_library(desktop-app::external_openssl ALIAS external_openssl)
|
||||||
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
set(openssl_lib_ext lib)
|
set(openssl_lib_ext lib)
|
||||||
set(openssl_lib_loc ${libs_loc}/openssl_1_1_1/out32)
|
if (build_win64)
|
||||||
|
set(openssl_lib_loc ${libs_loc}/openssl_1_1_1/out64)
|
||||||
|
else()
|
||||||
|
set(openssl_lib_loc ${libs_loc}/openssl_1_1_1/out32)
|
||||||
|
endif()
|
||||||
else()
|
else()
|
||||||
set(openssl_lib_ext a)
|
set(openssl_lib_ext a)
|
||||||
if (APPLE)
|
if (APPLE)
|
||||||
|
|
|
||||||
7
external/opus/CMakeLists.txt
vendored
7
external/opus/CMakeLists.txt
vendored
|
|
@ -21,7 +21,12 @@ else()
|
||||||
INTERFACE
|
INTERFACE
|
||||||
${libs_loc}/opus/include
|
${libs_loc}/opus/include
|
||||||
)
|
)
|
||||||
set(opus_lib_loc ${libs_loc}/opus/win32/VS2015/Win32)
|
if (build_win64)
|
||||||
|
set(opus_config_folder x64)
|
||||||
|
else()
|
||||||
|
set(opus_config_folder Win32)
|
||||||
|
endif()
|
||||||
|
set(opus_lib_loc ${libs_loc}/opus/win32/VS2015/${opus_config_folder})
|
||||||
set_target_properties(external_opus PROPERTIES
|
set_target_properties(external_opus PROPERTIES
|
||||||
IMPORTED_LOCATION "${opus_lib_loc}/Release/opus.lib"
|
IMPORTED_LOCATION "${opus_lib_loc}/Release/opus.lib"
|
||||||
IMPORTED_LOCATION_DEBUG "${opus_lib_loc}/Debug/opus.lib"
|
IMPORTED_LOCATION_DEBUG "${opus_lib_loc}/Debug/opus.lib"
|
||||||
|
|
|
||||||
92
external/qt/CMakeLists.txt
vendored
92
external/qt/CMakeLists.txt
vendored
|
|
@ -7,6 +7,8 @@
|
||||||
add_library(external_qt INTERFACE IMPORTED GLOBAL)
|
add_library(external_qt INTERFACE IMPORTED GLOBAL)
|
||||||
add_library(desktop-app::external_qt ALIAS external_qt)
|
add_library(desktop-app::external_qt ALIAS external_qt)
|
||||||
|
|
||||||
|
add_subdirectory(qt_static_plugins)
|
||||||
|
|
||||||
if (DESKTOP_APP_USE_PACKAGED)
|
if (DESKTOP_APP_USE_PACKAGED)
|
||||||
target_link_libraries(external_qt
|
target_link_libraries(external_qt
|
||||||
INTERFACE
|
INTERFACE
|
||||||
|
|
@ -26,10 +28,6 @@ if (DESKTOP_APP_USE_PACKAGED)
|
||||||
target_link_libraries(external_qt INTERFACE Qt5::DBus)
|
target_link_libraries(external_qt INTERFACE Qt5::DBus)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (Qt5Svg_FOUND)
|
|
||||||
target_link_libraries(external_qt INTERFACE Qt5::Svg)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (LINUX AND DESKTOP_APP_USE_PACKAGED_LAZY_PLATFORMTHEMES)
|
if (LINUX AND DESKTOP_APP_USE_PACKAGED_LAZY_PLATFORMTHEMES)
|
||||||
find_library(Qt5ThemeSupport_LIBRARY
|
find_library(Qt5ThemeSupport_LIBRARY
|
||||||
NAMES
|
NAMES
|
||||||
|
|
@ -113,16 +111,21 @@ else()
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if (Qt5WaylandClient_FOUND)
|
||||||
|
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)
|
if (LINUX)
|
||||||
target_include_directories(external_qt SYSTEM
|
target_include_directories(external_qt SYSTEM
|
||||||
INTERFACE
|
INTERFACE
|
||||||
${qt_loc}/include/QtSvg
|
|
||||||
${qt_loc}/include/QtThemeSupport
|
${qt_loc}/include/QtThemeSupport
|
||||||
${qt_loc}/include/QtWaylandClient
|
|
||||||
${qt_loc}/include/QtThemeSupport/${qt_version}
|
${qt_loc}/include/QtThemeSupport/${qt_version}
|
||||||
${qt_loc}/include/QtWaylandClient/${qt_version}
|
|
||||||
${qt_loc}/include/QtThemeSupport/${qt_version}/QtThemeSupport
|
${qt_loc}/include/QtThemeSupport/${qt_version}/QtThemeSupport
|
||||||
${qt_loc}/include/QtWaylandClient/${qt_version}/QtWaylandClient
|
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
@ -151,12 +154,17 @@ else()
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (LINUX)
|
if (Qt5WaylandClient_FOUND)
|
||||||
target_compile_definitions(external_qt
|
target_compile_definitions(external_qt
|
||||||
INTERFACE
|
INTERFACE
|
||||||
QT_WAYLANDCLIENT_LIB
|
QT_WAYLANDCLIENT_LIB
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (LINUX)
|
||||||
|
target_compile_definitions(external_qt
|
||||||
|
INTERFACE
|
||||||
QT_THEME_SUPPORT_LIB
|
QT_THEME_SUPPORT_LIB
|
||||||
QT_SVG_LIB
|
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
@ -202,11 +210,6 @@ else()
|
||||||
foreach (lib ${qt_libs})
|
foreach (lib ${qt_libs})
|
||||||
list(APPEND qt_libs_list "${qt_loc}/${lib}${qt_lib_suffix}")
|
list(APPEND qt_libs_list "${qt_loc}/${lib}${qt_lib_suffix}")
|
||||||
endforeach()
|
endforeach()
|
||||||
target_link_libraries(external_qt
|
|
||||||
INTERFACE
|
|
||||||
desktop-app::external_jpeg
|
|
||||||
desktop-app::external_zlib
|
|
||||||
)
|
|
||||||
elseif (APPLE)
|
elseif (APPLE)
|
||||||
if (NOT build_osx)
|
if (NOT build_osx)
|
||||||
set(qt_libs
|
set(qt_libs
|
||||||
|
|
@ -240,8 +243,6 @@ else()
|
||||||
endforeach()
|
endforeach()
|
||||||
target_link_libraries(external_qt
|
target_link_libraries(external_qt
|
||||||
INTERFACE
|
INTERFACE
|
||||||
desktop-app::external_jpeg
|
|
||||||
desktop-app::external_zlib
|
|
||||||
cups
|
cups
|
||||||
)
|
)
|
||||||
else()
|
else()
|
||||||
|
|
@ -261,23 +262,24 @@ else()
|
||||||
plugins/bearer/${qt_lib_prefix}qnmbearer
|
plugins/bearer/${qt_lib_prefix}qnmbearer
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
set(qt_libs_waylandclient)
|
||||||
|
set(qt_libs_waylandclient_plugins)
|
||||||
|
if (Qt5WaylandClient_FOUND)
|
||||||
|
set(qt_libs_waylandclient lib/${qt_lib_prefix}Qt5WaylandClient)
|
||||||
|
set(qt_libs_waylandclient_plugins
|
||||||
|
plugins/wayland-decoration-client/${qt_lib_prefix}bradient
|
||||||
|
plugins/wayland-shell-integration/${qt_lib_prefix}wl-shell
|
||||||
|
plugins/wayland-shell-integration/${qt_lib_prefix}xdg-shell
|
||||||
|
plugins/wayland-graphics-integration-client/${qt_lib_prefix}qt-plugin-wayland-egl
|
||||||
|
plugins/platforms/${qt_lib_prefix}qwayland-egl
|
||||||
|
plugins/platforms/${qt_lib_prefix}qwayland-generic
|
||||||
|
)
|
||||||
|
endif()
|
||||||
set(qt_libs
|
set(qt_libs
|
||||||
plugins/platforminputcontexts/${qt_lib_prefix}composeplatforminputcontextplugin
|
plugins/platforminputcontexts/${qt_lib_prefix}composeplatforminputcontextplugin
|
||||||
${qt_libs_dbus_plugins}
|
${qt_libs_dbus_plugins}
|
||||||
plugins/wayland-decoration-client/${qt_lib_prefix}bradient
|
${qt_libs_waylandclient_plugins}
|
||||||
plugins/wayland-shell-integration/${qt_lib_prefix}ivi-shell
|
|
||||||
plugins/wayland-shell-integration/${qt_lib_prefix}wl-shell
|
|
||||||
plugins/wayland-shell-integration/${qt_lib_prefix}xdg-shell-v5
|
|
||||||
plugins/wayland-shell-integration/${qt_lib_prefix}xdg-shell-v6
|
|
||||||
plugins/wayland-shell-integration/${qt_lib_prefix}xdg-shell
|
|
||||||
plugins/wayland-graphics-integration-client/${qt_lib_prefix}qt-plugin-wayland-egl
|
|
||||||
plugins/wayland-graphics-integration-client/${qt_lib_prefix}drm-egl-server
|
|
||||||
plugins/wayland-graphics-integration-client/${qt_lib_prefix}dmabuf-server
|
|
||||||
plugins/wayland-graphics-integration-client/${qt_lib_prefix}shm-emulation-server
|
|
||||||
plugins/platforms/${qt_lib_prefix}qwayland-egl
|
|
||||||
plugins/platforms/${qt_lib_prefix}qwayland-generic
|
|
||||||
plugins/platforms/${qt_lib_prefix}qxcb
|
plugins/platforms/${qt_lib_prefix}qxcb
|
||||||
plugins/imageformats/${qt_lib_prefix}qsvg
|
|
||||||
plugins/iconengines/${qt_lib_prefix}qsvgicon
|
plugins/iconengines/${qt_lib_prefix}qsvgicon
|
||||||
lib/${qt_lib_prefix}Qt5XcbQpa
|
lib/${qt_lib_prefix}Qt5XcbQpa
|
||||||
lib/${qt_lib_prefix}Qt5EglSupport
|
lib/${qt_lib_prefix}Qt5EglSupport
|
||||||
|
|
@ -287,13 +289,13 @@ else()
|
||||||
${qt_libs_dbus_support}
|
${qt_libs_dbus_support}
|
||||||
plugins/bearer/${qt_lib_prefix}qgenericbearer
|
plugins/bearer/${qt_lib_prefix}qgenericbearer
|
||||||
${qt_libs_dbus_bearers}
|
${qt_libs_dbus_bearers}
|
||||||
lib/${qt_lib_prefix}Qt5WaylandClient
|
${qt_libs_waylandclient}
|
||||||
|
lib/${qt_lib_prefix}Qt5ServiceSupport
|
||||||
${common_qt_libs}
|
${common_qt_libs}
|
||||||
${qt_libs_dbus}
|
${qt_libs_dbus}
|
||||||
lib/${qt_lib_prefix}Qt5Svg
|
lib/${qt_lib_prefix}Qt5Svg
|
||||||
lib/${qt_lib_prefix}Qt5Core
|
lib/${qt_lib_prefix}Qt5Core
|
||||||
lib/${qt_lib_prefix}qtpcre2
|
lib/${qt_lib_prefix}qtpcre2
|
||||||
lib/${qt_lib_prefix}xcb-static
|
|
||||||
)
|
)
|
||||||
foreach (lib ${qt_libs})
|
foreach (lib ${qt_libs})
|
||||||
list(APPEND qt_libs_list "${qt_loc}/${lib}${qt_lib_suffix}")
|
list(APPEND qt_libs_list "${qt_loc}/${lib}${qt_lib_suffix}")
|
||||||
|
|
@ -305,6 +307,8 @@ else()
|
||||||
${qt_libs_list}
|
${qt_libs_list}
|
||||||
$<TARGET_FILE:desktop-app::external_openssl_ssl>
|
$<TARGET_FILE:desktop-app::external_openssl_ssl>
|
||||||
$<TARGET_FILE:desktop-app::external_openssl_crypto>
|
$<TARGET_FILE:desktop-app::external_openssl_crypto>
|
||||||
|
desktop-app::external_jpeg
|
||||||
|
desktop-app::external_zlib
|
||||||
)
|
)
|
||||||
|
|
||||||
if (LINUX)
|
if (LINUX)
|
||||||
|
|
@ -345,10 +349,20 @@ else()
|
||||||
wayland-client
|
wayland-client
|
||||||
xkbcommon
|
xkbcommon
|
||||||
xkbcommon-x11
|
xkbcommon-x11
|
||||||
Xi
|
xcb-xkb
|
||||||
Xext
|
xcb-randr
|
||||||
Xfixes
|
xcb-icccm
|
||||||
Xrender
|
xcb-shm
|
||||||
|
xcb-render
|
||||||
|
xcb-image
|
||||||
|
xcb-xfixes
|
||||||
|
xcb-xinerama
|
||||||
|
xcb-xinput
|
||||||
|
xcb-shape
|
||||||
|
xcb-sync
|
||||||
|
xcb-util
|
||||||
|
xcb-render-util
|
||||||
|
xcb-keysyms
|
||||||
ffi
|
ffi
|
||||||
)
|
)
|
||||||
if (DESKTOP_APP_USE_GLIBC_WRAPS)
|
if (DESKTOP_APP_USE_GLIBC_WRAPS)
|
||||||
|
|
@ -360,10 +374,6 @@ else()
|
||||||
endif()
|
endif()
|
||||||
target_link_libraries(external_qt
|
target_link_libraries(external_qt
|
||||||
INTERFACE
|
INTERFACE
|
||||||
desktop-app::external_jpeg
|
|
||||||
desktop-app::external_zlib
|
|
||||||
ICE
|
|
||||||
SM
|
|
||||||
fontconfig
|
fontconfig
|
||||||
freetype
|
freetype
|
||||||
EGL
|
EGL
|
||||||
|
|
@ -371,8 +381,8 @@ else()
|
||||||
xcb
|
xcb
|
||||||
X11
|
X11
|
||||||
X11-xcb
|
X11-xcb
|
||||||
dl
|
|
||||||
glib-2.0
|
glib-2.0
|
||||||
|
${CMAKE_DL_LIBS}
|
||||||
pthread
|
pthread
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
||||||
10
external/qt/package.cmake
vendored
10
external/qt/package.cmake
vendored
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
if (NOT DESKTOP_APP_USE_PACKAGED)
|
if (NOT DESKTOP_APP_USE_PACKAGED)
|
||||||
if (NOT APPLE OR NOT build_osx)
|
if (NOT APPLE OR NOT build_osx)
|
||||||
set(qt_version 5.12.8)
|
set(qt_version 5.15.2)
|
||||||
else()
|
else()
|
||||||
set(qt_version 5.6.2)
|
set(qt_version 5.6.2)
|
||||||
endif()
|
endif()
|
||||||
|
|
@ -24,10 +24,12 @@ find_package(Qt5 COMPONENTS Core Gui Widgets Network REQUIRED)
|
||||||
find_package(Qt5Gui COMPONENTS QWebpPlugin REQUIRED)
|
find_package(Qt5Gui COMPONENTS QWebpPlugin REQUIRED)
|
||||||
|
|
||||||
if (LINUX)
|
if (LINUX)
|
||||||
find_package(Qt5 COMPONENTS WaylandClient REQUIRED)
|
if (NOT DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION)
|
||||||
find_package(Qt5 OPTIONAL_COMPONENTS XkbCommonSupport QUIET)
|
find_package(Qt5 COMPONENTS WaylandClient REQUIRED)
|
||||||
|
find_package(Qt5 OPTIONAL_COMPONENTS XkbCommonSupport QUIET)
|
||||||
|
endif()
|
||||||
|
|
||||||
if (NOT DESKTOP_APP_USE_PACKAGED OR DESKTOP_APP_USE_PACKAGED_LAZY_PLATFORMTHEMES)
|
if (NOT DESKTOP_APP_USE_PACKAGED)
|
||||||
find_package(Qt5 COMPONENTS Svg REQUIRED)
|
find_package(Qt5 COMPONENTS Svg REQUIRED)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
|
||||||
43
external/qt/qt_static_plugins/CMakeLists.txt
vendored
Normal file
43
external/qt/qt_static_plugins/CMakeLists.txt
vendored
Normal file
|
|
@ -0,0 +1,43 @@
|
||||||
|
# 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_qt_static_plugins OBJECT)
|
||||||
|
add_library(desktop-app::external_qt_static_plugins ALIAS external_qt_static_plugins)
|
||||||
|
init_target(external_qt_static_plugins "(external)")
|
||||||
|
|
||||||
|
nice_target_sources(external_qt_static_plugins ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
|
PRIVATE
|
||||||
|
qt_static_plugins.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
target_link_libraries(external_qt_static_plugins
|
||||||
|
PUBLIC
|
||||||
|
desktop-app::external_qt
|
||||||
|
)
|
||||||
|
|
||||||
|
if (LINUX)
|
||||||
|
target_link_libraries(external_qt_static_plugins
|
||||||
|
PUBLIC
|
||||||
|
desktop-app::external_nimf_qt5
|
||||||
|
desktop-app::external_qt5ct_support
|
||||||
|
)
|
||||||
|
|
||||||
|
if (NOT DESKTOP_APP_DISABLE_DBUS_INTEGRATION)
|
||||||
|
target_link_libraries(external_qt_static_plugins
|
||||||
|
PUBLIC
|
||||||
|
desktop-app::external_fcitx_qt5
|
||||||
|
desktop-app::external_fcitx5_qt5
|
||||||
|
desktop-app::external_hime_qt
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (NOT DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION)
|
||||||
|
target_link_libraries(external_qt_static_plugins
|
||||||
|
PUBLIC
|
||||||
|
desktop-app::external_materialdecoration
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
62
external/qt/qt_static_plugins/qt_static_plugins.cpp
vendored
Normal file
62
external/qt/qt_static_plugins/qt_static_plugins.cpp
vendored
Normal file
|
|
@ -0,0 +1,62 @@
|
||||||
|
/*
|
||||||
|
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
|
||||||
|
*/
|
||||||
|
#include <QtCore/QtPlugin>
|
||||||
|
|
||||||
|
#ifndef DESKTOP_APP_USE_PACKAGED
|
||||||
|
Q_IMPORT_PLUGIN(QWebpPlugin)
|
||||||
|
|
||||||
|
#if QT_VERSION >= QT_VERSION_CHECK(5, 8, 0)
|
||||||
|
Q_IMPORT_PLUGIN(QJpegPlugin)
|
||||||
|
Q_IMPORT_PLUGIN(QGifPlugin)
|
||||||
|
#endif // Qt 5.8.0
|
||||||
|
|
||||||
|
#ifdef Q_OS_WIN
|
||||||
|
Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin)
|
||||||
|
#elif defined Q_OS_MAC // Q_OS_WIN
|
||||||
|
Q_IMPORT_PLUGIN(QCocoaIntegrationPlugin)
|
||||||
|
Q_IMPORT_PLUGIN(QGenericEnginePlugin)
|
||||||
|
#elif defined Q_OS_UNIX // Q_OS_WIN | Q_OS_MAC
|
||||||
|
Q_IMPORT_PLUGIN(QXcbIntegrationPlugin)
|
||||||
|
Q_IMPORT_PLUGIN(QGenericEnginePlugin)
|
||||||
|
Q_IMPORT_PLUGIN(QComposePlatformInputContextPlugin)
|
||||||
|
Q_IMPORT_PLUGIN(QSvgIconPlugin)
|
||||||
|
#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
||||||
|
Q_IMPORT_PLUGIN(QConnmanEnginePlugin)
|
||||||
|
Q_IMPORT_PLUGIN(QNetworkManagerEnginePlugin)
|
||||||
|
Q_IMPORT_PLUGIN(QIbusPlatformInputContextPlugin)
|
||||||
|
Q_IMPORT_PLUGIN(QXdgDesktopPortalThemePlugin)
|
||||||
|
#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
||||||
|
#ifndef DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION
|
||||||
|
Q_IMPORT_PLUGIN(QWaylandEglClientBufferPlugin)
|
||||||
|
Q_IMPORT_PLUGIN(QWaylandWlShellIntegrationPlugin)
|
||||||
|
Q_IMPORT_PLUGIN(QWaylandXdgShellIntegrationPlugin)
|
||||||
|
Q_IMPORT_PLUGIN(QWaylandBradientDecorationPlugin)
|
||||||
|
Q_IMPORT_PLUGIN(QWaylandIntegrationPlugin)
|
||||||
|
Q_IMPORT_PLUGIN(QWaylandEglPlatformIntegrationPlugin)
|
||||||
|
#endif // !DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION
|
||||||
|
#endif // Q_OS_WIN | Q_OS_MAC | Q_OS_UNIX
|
||||||
|
#endif // !DESKTOP_APP_USE_PACKAGED
|
||||||
|
|
||||||
|
#if defined Q_OS_UNIX && !defined Q_OS_MAC
|
||||||
|
#if !defined DESKTOP_APP_USE_PACKAGED || defined DESKTOP_APP_USE_PACKAGED_LAZY
|
||||||
|
Q_IMPORT_PLUGIN(NimfInputContextPlugin)
|
||||||
|
#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
||||||
|
Q_IMPORT_PLUGIN(QFcitxPlatformInputContextPlugin)
|
||||||
|
Q_IMPORT_PLUGIN(QFcitx5PlatformInputContextPlugin)
|
||||||
|
Q_IMPORT_PLUGIN(QHimePlatformInputContextPlugin)
|
||||||
|
#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
||||||
|
#ifndef DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION
|
||||||
|
Q_IMPORT_PLUGIN(QWaylandMaterialDecorationPlugin)
|
||||||
|
#endif // !DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION
|
||||||
|
#endif // !DESKTOP_APP_USE_PACKAGED || DESKTOP_APP_USE_PACKAGED_LAZY
|
||||||
|
|
||||||
|
#if !defined DESKTOP_APP_USE_PACKAGED || defined DESKTOP_APP_USE_PACKAGED_LAZY_PLATFORMTHEMES
|
||||||
|
Q_IMPORT_PLUGIN(Qt5CTPlatformThemePlugin)
|
||||||
|
Q_IMPORT_PLUGIN(Qt5CTStylePlugin)
|
||||||
|
#endif // !DESKTOP_APP_USE_PACKAGED || DESKTOP_APP_USE_PACKAGED_LAZY_PLATFORMTHEMES
|
||||||
|
#endif // Q_OS_UNIX && !Q_OS_MAC
|
||||||
1
external/webrtc/CMakeLists.txt
vendored
1
external/webrtc/CMakeLists.txt
vendored
|
|
@ -99,5 +99,6 @@ else()
|
||||||
${webrtc_libs_list}
|
${webrtc_libs_list}
|
||||||
desktop-app::external_openssl
|
desktop-app::external_openssl
|
||||||
desktop-app::external_jpeg
|
desktop-app::external_jpeg
|
||||||
|
desktop-app::external_opus
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
||||||
2
external/xcb/CMakeLists.txt
vendored
2
external/xcb/CMakeLists.txt
vendored
|
|
@ -7,6 +7,8 @@
|
||||||
add_library(external_xcb INTERFACE IMPORTED GLOBAL)
|
add_library(external_xcb INTERFACE IMPORTED GLOBAL)
|
||||||
add_library(desktop-app::external_xcb ALIAS external_xcb)
|
add_library(desktop-app::external_xcb ALIAS external_xcb)
|
||||||
|
|
||||||
|
add_subdirectory(xcb_keysyms)
|
||||||
|
add_subdirectory(xcb_record)
|
||||||
add_subdirectory(xcb_screensaver)
|
add_subdirectory(xcb_screensaver)
|
||||||
|
|
||||||
if (DESKTOP_APP_USE_PACKAGED)
|
if (DESKTOP_APP_USE_PACKAGED)
|
||||||
|
|
|
||||||
16
external/xcb/xcb_keysyms/CMakeLists.txt
vendored
Normal file
16
external/xcb/xcb_keysyms/CMakeLists.txt
vendored
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
# 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_xcb_keysyms INTERFACE IMPORTED GLOBAL)
|
||||||
|
add_library(desktop-app::external_xcb_keysyms ALIAS external_xcb_keysyms)
|
||||||
|
|
||||||
|
if (DESKTOP_APP_USE_PACKAGED)
|
||||||
|
find_package(PkgConfig REQUIRED)
|
||||||
|
pkg_check_modules(XCB_KEYSYMS REQUIRED IMPORTED_TARGET xcb-keysyms)
|
||||||
|
target_link_libraries(external_xcb_keysyms INTERFACE PkgConfig::XCB_KEYSYMS)
|
||||||
|
else()
|
||||||
|
target_link_static_libraries(external_xcb_keysyms INTERFACE xcb-keysyms)
|
||||||
|
endif()
|
||||||
16
external/xcb/xcb_record/CMakeLists.txt
vendored
Normal file
16
external/xcb/xcb_record/CMakeLists.txt
vendored
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
# 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_xcb_record INTERFACE IMPORTED GLOBAL)
|
||||||
|
add_library(desktop-app::external_xcb_record ALIAS external_xcb_record)
|
||||||
|
|
||||||
|
if (DESKTOP_APP_USE_PACKAGED)
|
||||||
|
find_package(PkgConfig REQUIRED)
|
||||||
|
pkg_check_modules(XCB_RECORD REQUIRED IMPORTED_TARGET xcb-record)
|
||||||
|
target_link_libraries(external_xcb_record INTERFACE PkgConfig::XCB_RECORD)
|
||||||
|
else()
|
||||||
|
target_link_static_libraries(external_xcb_record INTERFACE xcb-record)
|
||||||
|
endif()
|
||||||
7
external/zlib/CMakeLists.txt
vendored
7
external/zlib/CMakeLists.txt
vendored
|
|
@ -13,7 +13,12 @@ if (DESKTOP_APP_USE_PACKAGED)
|
||||||
elseif (WIN32)
|
elseif (WIN32)
|
||||||
target_compile_definitions(external_zlib INTERFACE ZLIB_WINAPI)
|
target_compile_definitions(external_zlib INTERFACE ZLIB_WINAPI)
|
||||||
target_include_directories(external_zlib INTERFACE ${libs_loc}/zlib)
|
target_include_directories(external_zlib INTERFACE ${libs_loc}/zlib)
|
||||||
set(zlib_lib_loc ${libs_loc}/zlib/contrib/vstudio/vc14/x86/ZlibStat$<IF:$<CONFIG:Debug>,Debug,ReleaseWithoutAsm>)
|
if (build_win64)
|
||||||
|
set(zlib_config_folder x64)
|
||||||
|
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)
|
target_link_libraries(external_zlib INTERFACE ${zlib_lib_loc}/zlibstat.lib)
|
||||||
elseif (APPLE AND NOT build_osx)
|
elseif (APPLE AND NOT build_osx)
|
||||||
target_link_libraries(external_zlib INTERFACE /usr/local/macos/lib/libz.a)
|
target_link_libraries(external_zlib INTERFACE /usr/local/macos/lib/libz.a)
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,13 @@ if (DESKTOP_APP_DISABLE_DBUS_INTEGRATION)
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if (DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION)
|
||||||
|
target_compile_definitions(common_options
|
||||||
|
INTERFACE
|
||||||
|
DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
if (DESKTOP_APP_DISABLE_WEBRTC_INTEGRATION)
|
if (DESKTOP_APP_DISABLE_WEBRTC_INTEGRATION)
|
||||||
target_compile_definitions(common_options
|
target_compile_definitions(common_options
|
||||||
INTERFACE
|
INTERFACE
|
||||||
|
|
|
||||||
|
|
@ -75,6 +75,7 @@ INTERFACE
|
||||||
AppKit
|
AppKit
|
||||||
CoreWLAN
|
CoreWLAN
|
||||||
IOKit
|
IOKit
|
||||||
|
GSS
|
||||||
)
|
)
|
||||||
|
|
||||||
if (NOT build_osx)
|
if (NOT build_osx)
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,8 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||||
/w15038 # wrong initialization order
|
/w15038 # wrong initialization order
|
||||||
/w14265 # class has virtual functions, but destructor is not virtual
|
/w14265 # class has virtual functions, but destructor is not virtual
|
||||||
/wd4068 # Disable "warning C4068: unknown pragma"
|
/wd4068 # Disable "warning C4068: unknown pragma"
|
||||||
|
/wd4267 # 'initializing': conversion from 'size_t' to 'int', possible loss of data.
|
||||||
|
/wd4244 # '=': conversion from 'size_t' to 'int', possible loss of data.
|
||||||
/Zc:wchar_t- # don't tread wchar_t as builtin type
|
/Zc:wchar_t- # don't tread wchar_t as builtin type
|
||||||
/Zi
|
/Zi
|
||||||
)
|
)
|
||||||
|
|
@ -34,6 +36,13 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||||
INTERFACE
|
INTERFACE
|
||||||
$<IF:$<CONFIG:Debug>,/NODEFAULTLIB:LIBCMT,/DEBUG;/OPT:REF>
|
$<IF:$<CONFIG:Debug>,/NODEFAULTLIB:LIBCMT,/DEBUG;/OPT:REF>
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if (build_win64)
|
||||||
|
target_compile_options(common_options
|
||||||
|
INTERFACE
|
||||||
|
/bigobj # scheme.cpp has too many sections.
|
||||||
|
)
|
||||||
|
endif()
|
||||||
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||||
target_compile_definitions(common_options
|
target_compile_definitions(common_options
|
||||||
INTERFACE
|
INTERFACE
|
||||||
|
|
|
||||||
12
run_cmake.py
12
run_cmake.py
|
|
@ -12,14 +12,22 @@ def run(project, arguments, buildType=''):
|
||||||
basePath = scriptPath + '/../out/' + buildType
|
basePath = scriptPath + '/../out/' + buildType
|
||||||
|
|
||||||
cmake = ['cmake']
|
cmake = ['cmake']
|
||||||
|
windowsArch = ''
|
||||||
for arg in arguments:
|
for arg in arguments:
|
||||||
if arg == 'debug':
|
if arg == 'debug':
|
||||||
cmake.append('-DCMAKE_BUILD_TYPE=Debug')
|
cmake.append('-DCMAKE_BUILD_TYPE=Debug')
|
||||||
|
elif arg == 'x86' or arg == 'x64':
|
||||||
|
windowsArch = arg
|
||||||
elif arg != 'force':
|
elif arg != 'force':
|
||||||
cmake.append(arg)
|
cmake.append(arg)
|
||||||
|
|
||||||
if sys.platform == 'win32':
|
if sys.platform == 'win32':
|
||||||
cmake.append('-AWin32')
|
if windowsArch == 'x64':
|
||||||
|
cmake.append('-Ax64')
|
||||||
|
else:
|
||||||
|
cmake.append('-AWin32') # default
|
||||||
|
elif windowsArch != '':
|
||||||
|
print("[ERROR] x86/x64 switch is supported only on Windows.")
|
||||||
|
return 1
|
||||||
elif sys.platform == 'darwin':
|
elif sys.platform == 'darwin':
|
||||||
cmake.append('-GXcode')
|
cmake.append('-GXcode')
|
||||||
elif buildType:
|
elif buildType:
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,9 @@ endif()
|
||||||
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
if (NOT DESKTOP_APP_SPECIAL_TARGET STREQUAL "uwp"
|
if (NOT DESKTOP_APP_SPECIAL_TARGET STREQUAL "uwp"
|
||||||
AND NOT DESKTOP_APP_SPECIAL_TARGET STREQUAL "win")
|
AND NOT DESKTOP_APP_SPECIAL_TARGET STREQUAL "uwp64"
|
||||||
|
AND NOT DESKTOP_APP_SPECIAL_TARGET STREQUAL "win"
|
||||||
|
AND NOT DESKTOP_APP_SPECIAL_TARGET STREQUAL "win64")
|
||||||
report_bad_special_target()
|
report_bad_special_target()
|
||||||
endif()
|
endif()
|
||||||
elseif (APPLE)
|
elseif (APPLE)
|
||||||
|
|
|
||||||
|
|
@ -22,14 +22,16 @@ endif()
|
||||||
set(disable_autoupdate 0)
|
set(disable_autoupdate 0)
|
||||||
if (DESKTOP_APP_SPECIAL_TARGET STREQUAL ""
|
if (DESKTOP_APP_SPECIAL_TARGET STREQUAL ""
|
||||||
OR DESKTOP_APP_SPECIAL_TARGET STREQUAL "uwp"
|
OR DESKTOP_APP_SPECIAL_TARGET STREQUAL "uwp"
|
||||||
|
OR DESKTOP_APP_SPECIAL_TARGET STREQUAL "uwp64"
|
||||||
OR DESKTOP_APP_SPECIAL_TARGET STREQUAL "macstore")
|
OR DESKTOP_APP_SPECIAL_TARGET STREQUAL "macstore")
|
||||||
set(disable_autoupdate 1)
|
set(disable_autoupdate 1)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
option(DESKTOP_APP_LOTTIE_USE_CACHE "Use caching in lottie animations." ON)
|
option(DESKTOP_APP_LOTTIE_USE_CACHE "Use caching in lottie animations." ON)
|
||||||
option(DESKTOP_APP_DISABLE_DBUS_INTEGRATION "Disable all code for D-Bus integration (Linux only)." OFF)
|
option(DESKTOP_APP_DISABLE_DBUS_INTEGRATION "Disable all code for D-Bus integration (Linux only)." OFF)
|
||||||
|
option(DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION "Disable all code for Wayland integration (Linux only)." OFF)
|
||||||
option(DESKTOP_APP_DISABLE_WEBRTC_INTEGRATION "Disable all code for WebRTC integration." OFF)
|
option(DESKTOP_APP_DISABLE_WEBRTC_INTEGRATION "Disable all code for WebRTC integration." OFF)
|
||||||
option(DESKTOP_APP_USE_GLIBC_WRAPS "Use wraps for new GLIBC features." ${linux_special_target})
|
option(DESKTOP_APP_USE_GLIBC_WRAPS "Use wraps for new GLIBC features." OFF)
|
||||||
option(DESKTOP_APP_USE_PACKAGED "Find libraries using CMake instead of exact paths." ${no_special_target})
|
option(DESKTOP_APP_USE_PACKAGED "Find libraries using CMake instead of exact paths." ${no_special_target})
|
||||||
option(DESKTOP_APP_USE_PACKAGED_LAZY "Bundle recommended Qt plugins for self-contained packages. (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_LAZY_PLATFORMTHEMES "Bundle recommended Qt platform themes for self-contained packages. (Linux only)" ${DESKTOP_APP_USE_PACKAGED_LAZY})
|
option(DESKTOP_APP_USE_PACKAGED_LAZY_PLATFORMTHEMES "Bundle recommended Qt platform themes for self-contained packages. (Linux only)" ${DESKTOP_APP_USE_PACKAGED_LAZY})
|
||||||
|
|
@ -57,12 +59,20 @@ endif()
|
||||||
|
|
||||||
set(build_osx 0)
|
set(build_osx 0)
|
||||||
set(build_macstore 0)
|
set(build_macstore 0)
|
||||||
set(build_winstore 0)
|
set(build_winstore 0) # 32 or 64 bit
|
||||||
set(build_linux32 0)
|
set(build_linux32 0)
|
||||||
|
set(build_win64 0) # normal or uwp
|
||||||
|
set(build_winstore64 0)
|
||||||
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
if (DESKTOP_APP_SPECIAL_TARGET STREQUAL "uwp")
|
if (DESKTOP_APP_SPECIAL_TARGET STREQUAL "win64")
|
||||||
|
set(build_win64 1)
|
||||||
|
elseif (DESKTOP_APP_SPECIAL_TARGET STREQUAL "uwp")
|
||||||
set(build_winstore 1)
|
set(build_winstore 1)
|
||||||
|
elseif (DESKTOP_APP_SPECIAL_TARGET STREQUAL "uwp64")
|
||||||
|
set(build_win64 1)
|
||||||
|
set(build_winstore 1)
|
||||||
|
set(build_winstore64 1)
|
||||||
endif()
|
endif()
|
||||||
elseif (APPLE)
|
elseif (APPLE)
|
||||||
if (DESKTOP_APP_SPECIAL_TARGET STREQUAL "osx")
|
if (DESKTOP_APP_SPECIAL_TARGET STREQUAL "osx")
|
||||||
|
|
@ -90,7 +100,9 @@ else()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (NOT APPLE OR build_osx)
|
if (build_win64)
|
||||||
|
get_filename_component(libs_loc "../Libraries/win64" REALPATH)
|
||||||
|
elseif (NOT APPLE OR build_osx)
|
||||||
get_filename_component(libs_loc "../Libraries" REALPATH)
|
get_filename_component(libs_loc "../Libraries" REALPATH)
|
||||||
else()
|
else()
|
||||||
get_filename_component(libs_loc "../Libraries/macos" REALPATH)
|
get_filename_component(libs_loc "../Libraries/macos" REALPATH)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue