kwin/kcmkwin/kwindecoration/CMakeLists.txt
Martin Gräßlin d0c83ddbf3 [kcmkwin/deco] Support loading translations for UI loaded configs
Qml based Aurorae themes can provided 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.

First of all a new property is added to the service file for
specifying the translation domain to be used for the config UI. If
such a translation domain is set we extract all string properties of
the loaded UI and pass them through ki18nd.
2014-06-10 15:49:19 +02:00

52 lines
1.3 KiB
CMake

# KI18N Translation Domain for this library
add_definitions(-DTRANSLATION_DOMAIN=\"kcmkwindecoration\")
# need a header file from Aurorae sources
include_directories(
${KWIN_SOURCE_DIR}/clients/aurorae/src/lib
../utils/
)
set(AURORAE_SOURCE_DIR ${KWIN_SOURCE_DIR}/clients/aurorae/src/lib/)
set(kcm_kwindecoration_PART_SRCS
kwindecoration.cpp
buttons.cpp
buttonsconfigdialog.cpp
configdialog.cpp
preview.cpp
decorationmodel.cpp
../utils/uitranslator.cpp
${AURORAE_SOURCE_DIR}/auroraetheme.cpp
${AURORAE_SOURCE_DIR}/themeconfig.cpp
)
ki18n_wrap_ui(kcm_kwindecoration_PART_SRCS
auroraeconfig.ui
buttons.ui
config.ui
decoration.ui
)
add_library(kcm_kwindecoration MODULE ${kcm_kwindecoration_PART_SRCS})
target_link_libraries(kcm_kwindecoration
kdecorations
Qt5::DBus
Qt5::Quick
Qt5::UiTools
KF5::Completion
KF5::ConfigWidgets
KF5::I18n
KF5::NewStuff
)
install(TARGETS kcm_kwindecoration DESTINATION ${PLUGIN_INSTALL_DIR} )
########### install files ###############
install( FILES kwindecoration.desktop DESTINATION ${SERVICES_INSTALL_DIR} )
install( FILES
qml/main.qml
qml/AuroraeDecoration.qml
qml/AuroraePreview.qml
qml/DecorationPreview.qml
DESTINATION ${DATA_INSTALL_DIR}/kwin/kcm_kwindecoration)