Warning, /education/ktouch/src/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 ecm_setup_version(${RELEASE_SERVICE_VERSION}
0002     VARIABLE_PREFIX KTOUCH
0003     VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/version.h"
0004     PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KTouchConfigVersion.cmake"
0005 )
0006 
0007 ecm_optional_add_subdirectory(schemata)
0008 
0009 # set include directories
0010 include_directories(
0011     ${CMAKE_CURRENT_BINARY_DIR}
0012     ${ktouch_SOURCE_DIR}
0013 )
0014 
0015 # set the source code files from which KTouch is compiled
0016 set(ktouch_SRCS
0017     application.cpp
0018     application.h
0019     bindings/stringformatter.cpp
0020     bindings/stringformatter.h
0021     bindings/utils.cpp
0022     bindings/utils.h
0023     colorsconfigwidget.cpp
0024     colorsconfigwidget.h
0025     core/abstractkey.cpp
0026     core/abstractkey.h
0027     core/coursebase.cpp
0028     core/coursebase.h
0029     core/course.cpp
0030     core/course.h
0031     core/dataaccess.cpp
0032     core/dataaccess.h
0033     core/dataindex.cpp
0034     core/dataindex.h
0035     core/dbaccess.cpp
0036     core/dbaccess.h
0037     core/keyboardlayoutbase.cpp
0038     core/keyboardlayoutbase.h
0039     core/keyboardlayout.cpp
0040     core/keyboardlayout.h
0041     core/keychar.cpp
0042     core/keychar.h
0043     core/key.cpp
0044     core/key.h
0045     core/lesson.cpp
0046     core/lesson.h
0047     core/profile.cpp
0048     core/profiledataaccess.cpp
0049     core/profiledataaccess.h
0050     core/profile.h
0051     core/resource.cpp
0052     core/resourcedataaccess.cpp
0053     core/resourcedataaccess.h
0054     core/resource.h
0055     core/specialkey.cpp
0056     core/specialkey.h
0057     core/trainingstats.cpp
0058     core/trainingstats.h
0059     core/userdataaccess.cpp
0060     core/userdataaccess.h
0061     customlessoneditordialog.cpp
0062     customlessoneditordialog.h
0063     declarativeitems/griditem.cpp
0064     declarativeitems/griditem.h
0065     declarativeitems/kcolorschemeproxy.cpp
0066     declarativeitems/kcolorschemeproxy.h
0067     declarativeitems/lessonpainter.cpp
0068     declarativeitems/lessonpainter.h
0069     declarativeitems/lessontexthighlighteritem.cpp
0070     declarativeitems/lessontexthighlighteritem.h
0071     declarativeitems/preferencesproxy.cpp
0072     declarativeitems/preferencesproxy.h
0073     declarativeitems/scalebackgrounditem.cpp
0074     declarativeitems/scalebackgrounditem.h
0075     declarativeitems/traininglinecore.cpp
0076     declarativeitems/traininglinecore.h
0077     editor/abstracteditor.cpp
0078     editor/abstracteditor.h
0079     editor/charactersviewdelegate.cpp
0080     editor/charactersviewdelegate.h
0081     editor/courseeditor.cpp
0082     editor/courseeditor.h
0083     editor/keyboardlayoutcombobox.cpp
0084     editor/keyboardlayoutcombobox.h
0085     editor/keyboardlayouteditor.cpp
0086     editor/keyboardlayouteditor.h
0087     editor/keyboardlayouteditorview.cpp
0088     editor/keyboardlayouteditorview.h
0089     editor/keyboardlayoutpropertieswidget.cpp
0090     editor/keyboardlayoutpropertieswidget.h
0091     editor/lessontexteditor.cpp
0092     editor/lessontexteditor.h
0093     editor/lessontexthighlighter.cpp
0094     editor/lessontexthighlighter.h
0095     editor/newcoursewidget.cpp
0096     editor/newcoursewidget.h
0097     editor/newkeyboardlayoutwidget.cpp
0098     editor/newkeyboardlayoutwidget.h
0099     editor/newresourceassistant.cpp
0100     editor/newresourceassistant.h
0101     editor/resourceeditor.cpp
0102     editor/resourceeditor.h
0103     editor/resourceeditorwidget.cpp
0104     editor/resourceeditorwidget.h
0105     editor/resourcetemplatewidget.cpp
0106     editor/resourcetemplatewidget.h
0107     editor/resourcetypeswidget.cpp
0108     editor/resourcetypeswidget.h
0109     ktouchcontext.cpp
0110     ktouchcontext.h
0111     main.cpp
0112     mainwindow.cpp
0113     mainwindow.h
0114     models/categorizedresourcesortfilterproxymodel.cpp
0115     models/categorizedresourcesortfilterproxymodel.h
0116     models/charactersmodel.cpp
0117     models/charactersmodel.h
0118     models/errorsmodel.cpp
0119     models/errorsmodel.h
0120     models/learningprogressmodel.cpp
0121     models/learningprogressmodel.h
0122     models/lessonmodel.cpp
0123     models/lessonmodel.h
0124     models/resourcemodel.cpp
0125     models/resourcemodel.h
0126     trainingconfigwidget.cpp
0127     trainingconfigwidget.h
0128     undocommands/coursecommands.cpp
0129     undocommands/coursecommands.h
0130     undocommands/keyboardlayoutcommands.cpp
0131     undocommands/keyboardlayoutcommands.h)
0132 
0133 qt_add_resources(ktouch_imgs_SRCS images/images.qrc)
0134 
0135 if (Qt5QuickCompiler_FOUND AND COMPILE_QML)
0136     qtquick_compiler_add_resources(ktouch_qml_SRCS qml/qml.qrc)
0137 else ()
0138     qt_add_resources(ktouch_qml_SRCS qml/qml.qrc)
0139 endif()
0140 
0141 # compile UI files
0142 ki18n_wrap_ui(ktouch_SRCS
0143     ui/colorsconfigwidget.ui
0144     ui/trainingconfigwidget.ui
0145     ui/resourceeditorwidget.ui
0146     ui/resourcetypeswidget.ui
0147     ui/newcoursewidget.ui
0148     ui/newkeyboardlayoutwidget.ui
0149     ui/resourcetemplatewidget.ui
0150     ui/courseeditor.ui
0151     ui/lessontexteditor.ui
0152     ui/keyboardlayouteditor.ui
0153     ui/keyboardlayoutpropertieswidget.ui
0154     ui/customlessoneditordialog.ui
0155 )
0156 
0157 if (KTOUCH_BUILD_WITH_X11)
0158     add_definitions(-DKTOUCH_BUILD_WITH_X11)
0159     include_directories(${X11_Xkb_INCLUDE_PATH})
0160     include_directories(${X11_Xkbfile_INCLUDE_PATH})
0161     set(ktouch_SRCS ${ktouch_SRCS} x11_helper.cpp x11_helper.h)
0162     set(ktouch_X11_DEPS Qt::X11Extras ${X11_Xkb_LIB} ${X11_LIBRARIES} XCB::XCB XCB::XKB)
0163 endif ()
0164 
0165 kconfig_add_kcfg_files(ktouch_SRCS preferences.kcfgc)
0166 
0167 add_executable(ktouch ${ktouch_SRCS} ${ktouch_imgs_SRCS} ${ktouch_qml_SRCS})
0168 
0169 #uncomment this if oxygen icons for ktouch are available
0170 target_link_libraries(ktouch
0171     LINK_PUBLIC
0172         Qt::Qml
0173         Qt::Quick
0174         Qt::QuickWidgets
0175         Qt::QuickControls2
0176         Qt::Sql
0177         Qt::XmlPatterns
0178         KF5::Completion
0179         KF5::ConfigWidgets
0180         KF5::ItemViews
0181         KF5::XmlGui
0182         KF5::I18n
0183         KF5::KCMUtils
0184         KF5::TextWidgets
0185         KF5::WindowSystem
0186         KF5::CoreAddons
0187         KF5::IconThemes
0188         ${ktouch_X11_DEPS}
0189 )
0190 
0191 #kde4_add_app_icon(ktouch_SRCS "${KDE4_ICON_DIR}/oxygen/*/apps/ktouch.png")
0192 #kde4_add_app_icon(ktouch_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/../icons/hi*-app-ktouch.png")
0193 
0194 install(TARGETS ktouch ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
0195 install(FILES ktouch.kcfg DESTINATION ${KDE_INSTALL_KCFGDIR})
0196