kwin/scripting/CMakeLists.txt
Martin Gräßlin 0c4aaaf4ad [scripting] Support loading translations for UI loaded configs
Scripts and scripted effects can provide a ui file which gets loaded at
runtime. Obviously such a ui file is not translated. This introduces
quite a hack to load the translated strings.

In the metadata.desktop file the scripted component can provide a key
X-KWin-Config-TranslationDomain. The genericscriptedconfig tries to
locate the metadata.desktop file and reads this entry. If it is present
we extract all string properties of the loaded UI and pass them through
ki18nd.

REVIEW: 118585
2014-06-10 15:49:19 +02:00

11 lines
595 B
CMake

include_directories(${KWIN_SOURCE_DIR}/kcmkwin/utils/)
set(kcm_kwin4_genericscripted_SRCS genericscriptedconfig.cpp ${KWIN_SOURCE_DIR}/kcmkwin/utils/uitranslator.cpp)
qt5_add_dbus_interface(kcm_kwin4_genericscripted_SRCS ${kwin_effects_dbus_xml} kwineffects_interface)
add_library(kcm_kwin4_genericscripted MODULE ${kcm_kwin4_genericscripted_SRCS})
target_link_libraries( kcm_kwin4_genericscripted
KF5::ConfigWidgets #KCModule
KF5::I18n
KF5::Service
Qt5::DBus
Qt5::UiTools )
install( TARGETS kcm_kwin4_genericscripted DESTINATION ${PLUGIN_INSTALL_DIR}/kwin/effects/configs )