Add fcitx5-qt and it's dependencies
This commit is contained in:
parent
81a0fc7970
commit
a10bb86dcd
6 changed files with 148 additions and 11 deletions
2
external/CMakeLists.txt
vendored
2
external/CMakeLists.txt
vendored
|
|
@ -19,6 +19,8 @@ endif()
|
||||||
add_checked_subdirectory(expected)
|
add_checked_subdirectory(expected)
|
||||||
if (LINUX AND NOT DESKTOP_APP_DISABLE_DBUS_INTEGRATION)
|
if (LINUX AND NOT DESKTOP_APP_DISABLE_DBUS_INTEGRATION)
|
||||||
add_checked_subdirectory(fcitx_qt5)
|
add_checked_subdirectory(fcitx_qt5)
|
||||||
|
add_checked_subdirectory(fcitx5_qt5)
|
||||||
|
add_checked_subdirectory(fcitx5_qt5_dbusaddons)
|
||||||
endif()
|
endif()
|
||||||
add_checked_subdirectory(ffmpeg)
|
add_checked_subdirectory(ffmpeg)
|
||||||
add_checked_subdirectory(gsl)
|
add_checked_subdirectory(gsl)
|
||||||
|
|
|
||||||
76
external/fcitx5_qt5/CMakeLists.txt
vendored
Normal file
76
external/fcitx5_qt5/CMakeLists.txt
vendored
Normal file
|
|
@ -0,0 +1,76 @@
|
||||||
|
# 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 AND NOT DESKTOP_APP_USE_PACKAGED_LAZY)
|
||||||
|
add_library(external_fcitx5_qt5 INTERFACE IMPORTED GLOBAL)
|
||||||
|
add_library(desktop-app::external_fcitx5_qt5 ALIAS external_fcitx5_qt5)
|
||||||
|
else()
|
||||||
|
add_library(external_fcitx5_qt5 STATIC)
|
||||||
|
add_library(desktop-app::external_fcitx5_qt5 ALIAS external_fcitx5_qt5)
|
||||||
|
init_target(external_fcitx5_qt5 "(external)")
|
||||||
|
|
||||||
|
set(fcitx5_qt_loc ${third_party_loc}/fcitx5-qt)
|
||||||
|
set(fcitx5_qt5_src ${fcitx5_qt_loc}/qt5/platforminputcontext)
|
||||||
|
|
||||||
|
set_target_properties(external_fcitx5_qt5 PROPERTIES AUTOMOC ON)
|
||||||
|
|
||||||
|
nice_target_sources(external_fcitx5_qt5 ${fcitx5_qt5_src}
|
||||||
|
PRIVATE
|
||||||
|
qfcitxplatforminputcontext.cpp
|
||||||
|
qfcitxplatforminputcontext.h
|
||||||
|
qtkey.cpp
|
||||||
|
main.cpp
|
||||||
|
main.h
|
||||||
|
)
|
||||||
|
|
||||||
|
target_include_directories(external_fcitx5_qt5
|
||||||
|
PRIVATE
|
||||||
|
${fcitx5_qt5_src}
|
||||||
|
)
|
||||||
|
|
||||||
|
target_compile_definitions(external_fcitx5_qt5
|
||||||
|
PRIVATE
|
||||||
|
QT_STATICPLUGIN
|
||||||
|
)
|
||||||
|
|
||||||
|
target_link_libraries(external_fcitx5_qt5
|
||||||
|
PRIVATE
|
||||||
|
desktop-app::external_fcitx5_qt5_dbusaddons
|
||||||
|
desktop-app::external_qt
|
||||||
|
)
|
||||||
|
|
||||||
|
if (DESKTOP_APP_USE_PACKAGED)
|
||||||
|
find_package(PkgConfig REQUIRED)
|
||||||
|
pkg_check_modules(XKBCOMMON REQUIRED IMPORTED_TARGET xkbcommon)
|
||||||
|
pkg_check_modules(XCB REQUIRED IMPORTED_TARGET xcb)
|
||||||
|
|
||||||
|
target_link_libraries(external_fcitx5_qt5
|
||||||
|
PRIVATE
|
||||||
|
PkgConfig::XKBCOMMON
|
||||||
|
PkgConfig::XCB
|
||||||
|
)
|
||||||
|
else()
|
||||||
|
find_package(PkgConfig REQUIRED)
|
||||||
|
pkg_check_modules(XKBCOMMON REQUIRED xkbcommon)
|
||||||
|
pkg_check_modules(XCB REQUIRED xcb)
|
||||||
|
|
||||||
|
target_include_directories(external_fcitx5_qt5
|
||||||
|
PUBLIC
|
||||||
|
${XKBCOMMON_INCLUDE_DIRS}
|
||||||
|
${XCB_INCLUDE_DIRS}
|
||||||
|
)
|
||||||
|
|
||||||
|
target_link_static_libraries(external_fcitx5_qt5
|
||||||
|
PRIVATE
|
||||||
|
xkbcommon
|
||||||
|
)
|
||||||
|
|
||||||
|
target_link_libraries(external_fcitx5_qt5
|
||||||
|
PRIVATE
|
||||||
|
xcb
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
54
external/fcitx5_qt5_dbusaddons/CMakeLists.txt
vendored
Normal file
54
external/fcitx5_qt5_dbusaddons/CMakeLists.txt
vendored
Normal file
|
|
@ -0,0 +1,54 @@
|
||||||
|
# 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 AND NOT DESKTOP_APP_USE_PACKAGED_LAZY)
|
||||||
|
add_library(external_fcitx5_qt5_dbusaddons INTERFACE IMPORTED GLOBAL)
|
||||||
|
add_library(desktop-app::external_fcitx5_qt5_dbusaddons ALIAS external_fcitx5_qt5_dbusaddons)
|
||||||
|
else()
|
||||||
|
add_library(external_fcitx5_qt5_dbusaddons OBJECT)
|
||||||
|
add_library(desktop-app::external_fcitx5_qt5_dbusaddons ALIAS external_fcitx5_qt5_dbusaddons)
|
||||||
|
init_target(external_fcitx5_qt5_dbusaddons "(external)")
|
||||||
|
|
||||||
|
set(fcitx5_qt_loc ${third_party_loc}/fcitx5-qt)
|
||||||
|
set(fcitx5_qt5_dbusaddons_src ${fcitx5_qt_loc}/qt5/dbusaddons)
|
||||||
|
|
||||||
|
set_target_properties(external_fcitx5_qt5_dbusaddons PROPERTIES AUTOMOC ON)
|
||||||
|
|
||||||
|
nice_target_sources(external_fcitx5_qt5_dbusaddons ${fcitx5_qt5_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
|
||||||
|
)
|
||||||
|
|
||||||
|
include(GenerateExportHeader)
|
||||||
|
generate_export_header(external_fcitx5_qt5_dbusaddons BASE_NAME Fcitx5Qt5DBusAddons)
|
||||||
|
|
||||||
|
target_include_directories(external_fcitx5_qt5_dbusaddons
|
||||||
|
PUBLIC
|
||||||
|
${fcitx5_qt_loc}/common
|
||||||
|
${fcitx5_qt5_dbusaddons_src}
|
||||||
|
"${CMAKE_CURRENT_BINARY_DIR}"
|
||||||
|
)
|
||||||
|
|
||||||
|
target_compile_definitions(external_fcitx5_qt5_dbusaddons
|
||||||
|
PRIVATE
|
||||||
|
FCITX5QT5DBUSADDONS_STATIC_DEFINE
|
||||||
|
)
|
||||||
|
|
||||||
|
target_link_libraries(external_fcitx5_qt5_dbusaddons
|
||||||
|
PRIVATE
|
||||||
|
desktop-app::external_qt
|
||||||
|
)
|
||||||
|
endif()
|
||||||
2
external/hime_im_client/CMakeLists.txt
vendored
2
external/hime_im_client/CMakeLists.txt
vendored
|
|
@ -16,8 +16,6 @@ else()
|
||||||
set(hime_src ${hime_loc}/src)
|
set(hime_src ${hime_loc}/src)
|
||||||
set(hime_im_client_src ${hime_src}/im-client)
|
set(hime_im_client_src ${hime_src}/im-client)
|
||||||
|
|
||||||
set_target_properties(external_hime_im_client PROPERTIES AUTOMOC ON)
|
|
||||||
|
|
||||||
nice_target_sources(external_hime_im_client ${hime_im_client_src}
|
nice_target_sources(external_hime_im_client ${hime_im_client_src}
|
||||||
PRIVATE
|
PRIVATE
|
||||||
hime-im-client-attr.h
|
hime-im-client-attr.h
|
||||||
|
|
|
||||||
21
external/qt/CMakeLists.txt
vendored
21
external/qt/CMakeLists.txt
vendored
|
|
@ -30,7 +30,15 @@ if (DESKTOP_APP_USE_PACKAGED)
|
||||||
${Qt5Gui_PRIVATE_INCLUDE_DIRS}
|
${Qt5Gui_PRIVATE_INCLUDE_DIRS}
|
||||||
)
|
)
|
||||||
|
|
||||||
if (DESKTOP_APP_USE_PACKAGED_LAZY_PLATFORMTHEMES)
|
if (Qt5DBus_FOUND)
|
||||||
|
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
|
find_library(Qt5ThemeSupport_LIBRARY
|
||||||
NAMES
|
NAMES
|
||||||
Qt5ThemeSupport
|
Qt5ThemeSupport
|
||||||
|
|
@ -66,12 +74,8 @@ if (DESKTOP_APP_USE_PACKAGED)
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (Qt5Svg_FOUND)
|
if (Qt5X11Extras_FOUND)
|
||||||
target_link_libraries(external_qt INTERFACE Qt5::Svg)
|
target_link_libraries(external_qt INTERFACE Qt5::X11Extras)
|
||||||
endif()
|
|
||||||
|
|
||||||
if (Qt5DBus_FOUND)
|
|
||||||
target_link_libraries(external_qt INTERFACE Qt5::DBus)
|
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
target_include_directories(external_qt SYSTEM
|
target_include_directories(external_qt SYSTEM
|
||||||
|
|
@ -99,6 +103,7 @@ else()
|
||||||
${qt_loc}/include/QtSvg
|
${qt_loc}/include/QtSvg
|
||||||
${qt_loc}/include/QtThemeSupport
|
${qt_loc}/include/QtThemeSupport
|
||||||
${qt_loc}/include/QtWaylandClient
|
${qt_loc}/include/QtWaylandClient
|
||||||
|
${qt_loc}/include/QtX11Extras
|
||||||
${qt_loc}/include/QtThemeSupport/${qt_version}
|
${qt_loc}/include/QtThemeSupport/${qt_version}
|
||||||
${qt_loc}/include/QtWaylandClient/${qt_version}
|
${qt_loc}/include/QtWaylandClient/${qt_version}
|
||||||
${qt_loc}/include/QtThemeSupport/${qt_version}/QtThemeSupport
|
${qt_loc}/include/QtThemeSupport/${qt_version}/QtThemeSupport
|
||||||
|
|
@ -130,6 +135,7 @@ else()
|
||||||
QT_WAYLANDCLIENT_LIB
|
QT_WAYLANDCLIENT_LIB
|
||||||
QT_THEME_SUPPORT_LIB
|
QT_THEME_SUPPORT_LIB
|
||||||
QT_SVG_LIB
|
QT_SVG_LIB
|
||||||
|
QT_X11EXTRAS_LIB
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
@ -253,6 +259,7 @@ 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}Qt5X11Extras
|
||||||
lib/${qt_lib_prefix}Qt5WaylandClient
|
lib/${qt_lib_prefix}Qt5WaylandClient
|
||||||
${common_qt_libs}
|
${common_qt_libs}
|
||||||
${qt_libs_dbus}
|
${qt_libs_dbus}
|
||||||
|
|
|
||||||
4
external/qt/package.cmake
vendored
4
external/qt/package.cmake
vendored
|
|
@ -25,9 +25,9 @@ find_package(Qt5Gui COMPONENTS QWebpPlugin REQUIRED)
|
||||||
|
|
||||||
if (LINUX)
|
if (LINUX)
|
||||||
if (NOT DESKTOP_APP_USE_PACKAGED)
|
if (NOT DESKTOP_APP_USE_PACKAGED)
|
||||||
find_package(Qt5 COMPONENTS WaylandClient Svg REQUIRED)
|
find_package(Qt5 COMPONENTS WaylandClient Svg X11Extras REQUIRED)
|
||||||
elseif (DESKTOP_APP_USE_PACKAGED_LAZY)
|
elseif (DESKTOP_APP_USE_PACKAGED_LAZY)
|
||||||
find_package(Qt5 COMPONENTS WaylandClient REQUIRED)
|
find_package(Qt5 COMPONENTS WaylandClient X11Extras REQUIRED)
|
||||||
|
|
||||||
if (DESKTOP_APP_USE_PACKAGED_LAZY_PLATFORMTHEMES)
|
if (DESKTOP_APP_USE_PACKAGED_LAZY_PLATFORMTHEMES)
|
||||||
find_package(Qt5 COMPONENTS Svg REQUIRED)
|
find_package(Qt5 COMPONENTS Svg REQUIRED)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue