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(jpeg)
|
||||
add_checked_subdirectory(lz4)
|
||||
if (LINUX)
|
||||
if (LINUX AND NOT DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION)
|
||||
add_checked_subdirectory(materialdecoration)
|
||||
endif()
|
||||
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
|
||||
)
|
||||
|
||||
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
|
||||
INTERFACE
|
||||
|
|
|
|||
|
|
@ -12,7 +12,13 @@ INTERFACE
|
|||
${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)
|
||||
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
|
||||
vdpau
|
||||
wayland-client
|
||||
Xv
|
||||
Xext
|
||||
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)
|
||||
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()
|
||||
set(openssl_lib_ext a)
|
||||
if (APPLE)
|
||||
|
|
|
|||
7
external/opus/CMakeLists.txt
vendored
7
external/opus/CMakeLists.txt
vendored
|
|
@ -21,7 +21,12 @@ else()
|
|||
INTERFACE
|
||||
${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
|
||||
IMPORTED_LOCATION "${opus_lib_loc}/Release/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(desktop-app::external_qt ALIAS external_qt)
|
||||
|
||||
add_subdirectory(qt_static_plugins)
|
||||
|
||||
if (DESKTOP_APP_USE_PACKAGED)
|
||||
target_link_libraries(external_qt
|
||||
INTERFACE
|
||||
|
|
@ -26,10 +28,6 @@ if (DESKTOP_APP_USE_PACKAGED)
|
|||
target_link_libraries(external_qt INTERFACE Qt5::DBus)
|
||||
endif()
|
||||
|
||||
if (Qt5Svg_FOUND)
|
||||
target_link_libraries(external_qt INTERFACE Qt5::Svg)
|
||||
endif()
|
||||
|
||||
if (LINUX AND DESKTOP_APP_USE_PACKAGED_LAZY_PLATFORMTHEMES)
|
||||
find_library(Qt5ThemeSupport_LIBRARY
|
||||
NAMES
|
||||
|
|
@ -113,16 +111,21 @@ else()
|
|||
)
|
||||
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)
|
||||
target_include_directories(external_qt SYSTEM
|
||||
INTERFACE
|
||||
${qt_loc}/include/QtSvg
|
||||
${qt_loc}/include/QtThemeSupport
|
||||
${qt_loc}/include/QtWaylandClient
|
||||
${qt_loc}/include/QtThemeSupport/${qt_version}
|
||||
${qt_loc}/include/QtWaylandClient/${qt_version}
|
||||
${qt_loc}/include/QtThemeSupport/${qt_version}/QtThemeSupport
|
||||
${qt_loc}/include/QtWaylandClient/${qt_version}/QtWaylandClient
|
||||
)
|
||||
endif()
|
||||
|
||||
|
|
@ -151,12 +154,17 @@ else()
|
|||
)
|
||||
endif()
|
||||
|
||||
if (LINUX)
|
||||
if (Qt5WaylandClient_FOUND)
|
||||
target_compile_definitions(external_qt
|
||||
INTERFACE
|
||||
QT_WAYLANDCLIENT_LIB
|
||||
)
|
||||
endif()
|
||||
|
||||
if (LINUX)
|
||||
target_compile_definitions(external_qt
|
||||
INTERFACE
|
||||
QT_THEME_SUPPORT_LIB
|
||||
QT_SVG_LIB
|
||||
)
|
||||
endif()
|
||||
|
||||
|
|
@ -202,11 +210,6 @@ else()
|
|||
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_jpeg
|
||||
desktop-app::external_zlib
|
||||
)
|
||||
elseif (APPLE)
|
||||
if (NOT build_osx)
|
||||
set(qt_libs
|
||||
|
|
@ -240,8 +243,6 @@ else()
|
|||
endforeach()
|
||||
target_link_libraries(external_qt
|
||||
INTERFACE
|
||||
desktop-app::external_jpeg
|
||||
desktop-app::external_zlib
|
||||
cups
|
||||
)
|
||||
else()
|
||||
|
|
@ -261,23 +262,24 @@ else()
|
|||
plugins/bearer/${qt_lib_prefix}qnmbearer
|
||||
)
|
||||
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
|
||||
plugins/platforminputcontexts/${qt_lib_prefix}composeplatforminputcontextplugin
|
||||
${qt_libs_dbus_plugins}
|
||||
plugins/wayland-decoration-client/${qt_lib_prefix}bradient
|
||||
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
|
||||
${qt_libs_waylandclient_plugins}
|
||||
plugins/platforms/${qt_lib_prefix}qxcb
|
||||
plugins/imageformats/${qt_lib_prefix}qsvg
|
||||
plugins/iconengines/${qt_lib_prefix}qsvgicon
|
||||
lib/${qt_lib_prefix}Qt5XcbQpa
|
||||
lib/${qt_lib_prefix}Qt5EglSupport
|
||||
|
|
@ -287,13 +289,13 @@ else()
|
|||
${qt_libs_dbus_support}
|
||||
plugins/bearer/${qt_lib_prefix}qgenericbearer
|
||||
${qt_libs_dbus_bearers}
|
||||
lib/${qt_lib_prefix}Qt5WaylandClient
|
||||
${qt_libs_waylandclient}
|
||||
lib/${qt_lib_prefix}Qt5ServiceSupport
|
||||
${common_qt_libs}
|
||||
${qt_libs_dbus}
|
||||
lib/${qt_lib_prefix}Qt5Svg
|
||||
lib/${qt_lib_prefix}Qt5Core
|
||||
lib/${qt_lib_prefix}qtpcre2
|
||||
lib/${qt_lib_prefix}xcb-static
|
||||
)
|
||||
foreach (lib ${qt_libs})
|
||||
list(APPEND qt_libs_list "${qt_loc}/${lib}${qt_lib_suffix}")
|
||||
|
|
@ -305,6 +307,8 @@ else()
|
|||
${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
|
||||
)
|
||||
|
||||
if (LINUX)
|
||||
|
|
@ -345,10 +349,20 @@ else()
|
|||
wayland-client
|
||||
xkbcommon
|
||||
xkbcommon-x11
|
||||
Xi
|
||||
Xext
|
||||
Xfixes
|
||||
Xrender
|
||||
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
|
||||
ffi
|
||||
)
|
||||
if (DESKTOP_APP_USE_GLIBC_WRAPS)
|
||||
|
|
@ -360,10 +374,6 @@ else()
|
|||
endif()
|
||||
target_link_libraries(external_qt
|
||||
INTERFACE
|
||||
desktop-app::external_jpeg
|
||||
desktop-app::external_zlib
|
||||
ICE
|
||||
SM
|
||||
fontconfig
|
||||
freetype
|
||||
EGL
|
||||
|
|
@ -371,8 +381,8 @@ else()
|
|||
xcb
|
||||
X11
|
||||
X11-xcb
|
||||
dl
|
||||
glib-2.0
|
||||
${CMAKE_DL_LIBS}
|
||||
pthread
|
||||
)
|
||||
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 APPLE OR NOT build_osx)
|
||||
set(qt_version 5.12.8)
|
||||
set(qt_version 5.15.2)
|
||||
else()
|
||||
set(qt_version 5.6.2)
|
||||
endif()
|
||||
|
|
@ -24,10 +24,12 @@ find_package(Qt5 COMPONENTS Core Gui Widgets Network REQUIRED)
|
|||
find_package(Qt5Gui COMPONENTS QWebpPlugin REQUIRED)
|
||||
|
||||
if (LINUX)
|
||||
find_package(Qt5 COMPONENTS WaylandClient REQUIRED)
|
||||
find_package(Qt5 OPTIONAL_COMPONENTS XkbCommonSupport QUIET)
|
||||
if (NOT DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION)
|
||||
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)
|
||||
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}
|
||||
desktop-app::external_openssl
|
||||
desktop-app::external_jpeg
|
||||
desktop-app::external_opus
|
||||
)
|
||||
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(desktop-app::external_xcb ALIAS external_xcb)
|
||||
|
||||
add_subdirectory(xcb_keysyms)
|
||||
add_subdirectory(xcb_record)
|
||||
add_subdirectory(xcb_screensaver)
|
||||
|
||||
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)
|
||||
target_compile_definitions(external_zlib INTERFACE ZLIB_WINAPI)
|
||||
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)
|
||||
elseif (APPLE AND NOT build_osx)
|
||||
target_link_libraries(external_zlib INTERFACE /usr/local/macos/lib/libz.a)
|
||||
|
|
|
|||
|
|
@ -26,6 +26,13 @@ if (DESKTOP_APP_DISABLE_DBUS_INTEGRATION)
|
|||
)
|
||||
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)
|
||||
target_compile_definitions(common_options
|
||||
INTERFACE
|
||||
|
|
|
|||
|
|
@ -75,6 +75,7 @@ INTERFACE
|
|||
AppKit
|
||||
CoreWLAN
|
||||
IOKit
|
||||
GSS
|
||||
)
|
||||
|
||||
if (NOT build_osx)
|
||||
|
|
|
|||
|
|
@ -26,6 +26,8 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
|||
/w15038 # wrong initialization order
|
||||
/w14265 # class has virtual functions, but destructor is not virtual
|
||||
/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
|
||||
/Zi
|
||||
)
|
||||
|
|
@ -34,6 +36,13 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
|||
INTERFACE
|
||||
$<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")
|
||||
target_compile_definitions(common_options
|
||||
INTERFACE
|
||||
|
|
|
|||
12
run_cmake.py
12
run_cmake.py
|
|
@ -12,14 +12,22 @@ def run(project, arguments, buildType=''):
|
|||
basePath = scriptPath + '/../out/' + buildType
|
||||
|
||||
cmake = ['cmake']
|
||||
windowsArch = ''
|
||||
for arg in arguments:
|
||||
if arg == 'debug':
|
||||
cmake.append('-DCMAKE_BUILD_TYPE=Debug')
|
||||
elif arg == 'x86' or arg == 'x64':
|
||||
windowsArch = arg
|
||||
elif arg != 'force':
|
||||
cmake.append(arg)
|
||||
|
||||
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':
|
||||
cmake.append('-GXcode')
|
||||
elif buildType:
|
||||
|
|
|
|||
|
|
@ -20,7 +20,9 @@ endif()
|
|||
|
||||
if (WIN32)
|
||||
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()
|
||||
endif()
|
||||
elseif (APPLE)
|
||||
|
|
|
|||
|
|
@ -22,14 +22,16 @@ endif()
|
|||
set(disable_autoupdate 0)
|
||||
if (DESKTOP_APP_SPECIAL_TARGET STREQUAL ""
|
||||
OR DESKTOP_APP_SPECIAL_TARGET STREQUAL "uwp"
|
||||
OR DESKTOP_APP_SPECIAL_TARGET STREQUAL "uwp64"
|
||||
OR DESKTOP_APP_SPECIAL_TARGET STREQUAL "macstore")
|
||||
set(disable_autoupdate 1)
|
||||
endif()
|
||||
|
||||
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_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_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_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})
|
||||
|
|
@ -57,12 +59,20 @@ endif()
|
|||
|
||||
set(build_osx 0)
|
||||
set(build_macstore 0)
|
||||
set(build_winstore 0)
|
||||
set(build_winstore 0) # 32 or 64 bit
|
||||
set(build_linux32 0)
|
||||
set(build_win64 0) # normal or uwp
|
||||
set(build_winstore64 0)
|
||||
|
||||
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)
|
||||
elseif (DESKTOP_APP_SPECIAL_TARGET STREQUAL "uwp64")
|
||||
set(build_win64 1)
|
||||
set(build_winstore 1)
|
||||
set(build_winstore64 1)
|
||||
endif()
|
||||
elseif (APPLE)
|
||||
if (DESKTOP_APP_SPECIAL_TARGET STREQUAL "osx")
|
||||
|
|
@ -90,7 +100,9 @@ else()
|
|||
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)
|
||||
else()
|
||||
get_filename_component(libs_loc "../Libraries/macos" REALPATH)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue