Add hime and hime_qt5 modules
This commit is contained in:
parent
b7f7db72a2
commit
8d12d5a21f
4 changed files with 131 additions and 1 deletions
4
external/CMakeLists.txt
vendored
4
external/CMakeLists.txt
vendored
|
|
@ -22,6 +22,10 @@ if (LINUX AND NOT DESKTOP_APP_DISABLE_DBUS_INTEGRATION)
|
|||
endif()
|
||||
add_checked_subdirectory(ffmpeg)
|
||||
add_checked_subdirectory(gsl)
|
||||
if (LINUX AND NOT DESKTOP_APP_DISABLE_DBUS_INTEGRATION)
|
||||
add_checked_subdirectory(hime_im_client)
|
||||
add_checked_subdirectory(hime_qt)
|
||||
endif()
|
||||
if (add_hunspell_library)
|
||||
add_checked_subdirectory(hunspell)
|
||||
endif()
|
||||
|
|
|
|||
84
external/hime_im_client/CMakeLists.txt
vendored
Normal file
84
external/hime_im_client/CMakeLists.txt
vendored
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
# 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_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 OBJECT)
|
||||
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_src ${hime_loc}/src)
|
||||
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}
|
||||
PRIVATE
|
||||
hime-im-client-attr.h
|
||||
hime-im-client.c
|
||||
hime-im-client.h
|
||||
hime-protocol.h
|
||||
hime-send.c
|
||||
)
|
||||
|
||||
nice_target_sources(external_hime_im_client ${hime_src}
|
||||
PRIVATE
|
||||
hime-conf.c
|
||||
util.c
|
||||
im-addr.c
|
||||
hime-crypt.c
|
||||
)
|
||||
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_search_module(GTK REQUIRED gtk+-2.0 gtk+-3.0)
|
||||
|
||||
target_include_directories(external_hime_im_client
|
||||
PUBLIC
|
||||
${hime_im_client_src}
|
||||
PRIVATE
|
||||
${hime_src}
|
||||
${hime_src}/IMdkit/include
|
||||
${GTK_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
target_compile_definitions(external_hime_im_client
|
||||
PRIVATE
|
||||
HIME_BIN_DIR="/usr/bin"
|
||||
HIME_TABLE_DIR="/usr/share/hime/table"
|
||||
UNIX=1
|
||||
FREEBSD=0
|
||||
CLIENT_LIB=1
|
||||
)
|
||||
|
||||
if (DESKTOP_APP_USE_PACKAGED)
|
||||
pkg_check_modules(X11 REQUIRED IMPORTED_TARGET x11)
|
||||
pkg_check_modules(GLIB2 REQUIRED IMPORTED_TARGET glib-2.0)
|
||||
|
||||
target_link_libraries(external_hime_im_client
|
||||
PUBLIC
|
||||
PkgConfig::X11
|
||||
PkgConfig::GLIB2
|
||||
)
|
||||
else()
|
||||
pkg_check_modules(X11 REQUIRED x11)
|
||||
pkg_check_modules(GLIB2 REQUIRED glib-2.0)
|
||||
|
||||
target_include_directories(external_hime_im_client
|
||||
PUBLIC
|
||||
${X11_INCLUDE_DIRS}
|
||||
${GLIB2_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
target_link_libraries(external_hime_im_client
|
||||
PUBLIC
|
||||
X11
|
||||
glib-2.0
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
43
external/hime_qt/CMakeLists.txt
vendored
Normal file
43
external/hime_qt/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
|
||||
|
||||
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
|
||||
)
|
||||
|
||||
target_link_libraries(external_hime_qt
|
||||
PRIVATE
|
||||
desktop-app::external_hime_im_client
|
||||
desktop-app::external_qt
|
||||
)
|
||||
endif()
|
||||
1
external/qt/CMakeLists.txt
vendored
1
external/qt/CMakeLists.txt
vendored
|
|
@ -165,7 +165,6 @@ else()
|
|||
set(qt_libs_dbus_support lib/${qt_lib_prefix}Qt5LinuxAccessibilitySupport)
|
||||
set(qt_libs_dbus_plugins
|
||||
plugins/platforminputcontexts/${qt_lib_prefix}ibusplatforminputcontextplugin
|
||||
plugins/platforminputcontexts/${qt_lib_prefix}himeplatforminputcontextplugin
|
||||
plugins/platformthemes/${qt_lib_prefix}qxdgdesktopportal
|
||||
)
|
||||
set(qt_libs_dbus_bearers
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue