Warning, /frameworks/ktexteditor/src/CMakeLists.txt is written in an unsupported language. File is not indexed.
0001 # handle data files, .desktop & .cmake
0002 add_subdirectory(data)
0003
0004 # jscripts for the part
0005 add_subdirectory( script/data )
0006
0007 if(EditorConfig_FOUND)
0008 SET (CMAKE_REQUIRED_LIBRARIES ${EditorConfig_LIBRARIES})
0009 set (KTEXTEDITOR_OPTIONAL_LIBS ${KTEXTEDITOR_OPTIONAL_LIBS} ${EditorConfig_LIBRARIES})
0010 include_directories(${EditorConfig_INCLUDE_DIRS})
0011 endif()
0012
0013 # handle include files, both normal ones and generated ones
0014 add_subdirectory(include)
0015
0016 # includes
0017 include_directories(
0018 # for config.h
0019 ${CMAKE_BINARY_DIR}
0020
0021 # for generated ktexteditor headers
0022 ${CMAKE_CURRENT_BINARY_DIR}/include
0023
0024 # for normal sources
0025 ${CMAKE_CURRENT_SOURCE_DIR}
0026 ${CMAKE_CURRENT_SOURCE_DIR}/include
0027 ${CMAKE_CURRENT_SOURCE_DIR}/include/ktexteditor
0028 ${CMAKE_CURRENT_SOURCE_DIR}/buffer
0029 ${CMAKE_CURRENT_SOURCE_DIR}/completion
0030 ${CMAKE_CURRENT_SOURCE_DIR}/dialogs
0031 ${CMAKE_CURRENT_SOURCE_DIR}/document
0032 ${CMAKE_CURRENT_SOURCE_DIR}/script
0033 ${CMAKE_CURRENT_SOURCE_DIR}/mode
0034 ${CMAKE_CURRENT_SOURCE_DIR}/render
0035 ${CMAKE_CURRENT_SOURCE_DIR}/search
0036 ${CMAKE_CURRENT_SOURCE_DIR}/syntax
0037 ${CMAKE_CURRENT_SOURCE_DIR}/undo
0038 ${CMAKE_CURRENT_SOURCE_DIR}/utils
0039 ${CMAKE_CURRENT_SOURCE_DIR}/inputmode
0040 ${CMAKE_CURRENT_SOURCE_DIR}/view
0041 ${CMAKE_CURRENT_SOURCE_DIR}/swapfile
0042 ${CMAKE_CURRENT_SOURCE_DIR}/variableeditor)
0043
0044 # KTextEditor interface sources
0045 set(ktexteditor_LIB_SRCS
0046 # text buffer & buffer helpers
0047 buffer/katetextbuffer.cpp
0048 buffer/katetextblock.cpp
0049 buffer/katetextline.cpp
0050 buffer/katetextcursor.cpp
0051 buffer/katetextrange.cpp
0052 buffer/katetexthistory.cpp
0053 buffer/katetextfolding.cpp
0054
0055 # completion (widget, model, delegate, ...)
0056 completion/katecompletionwidget.cpp
0057 completion/katecompletionmodel.cpp
0058 completion/katecompletiontree.cpp
0059 completion/kateargumenthinttree.cpp
0060 completion/kateargumenthintmodel.cpp
0061 completion/katecompletiondelegate.cpp
0062 completion/expandingtree/expandingwidgetmodel.cpp
0063 completion/documentation_tip.cpp
0064
0065 # simple internal word completion
0066 completion/katewordcompletion.cpp
0067
0068 # internal syntax-file based keyword completion
0069 completion/katekeywordcompletion.cpp
0070
0071 # dialogs
0072 dialogs/kateconfigpage.cpp
0073 dialogs/katedialogs.cpp
0074 dialogs/kateconfigpage.cpp
0075 dialogs/clipboardhistorydialog.cpp
0076
0077 # document (THE document, buffer, lines/cursors/..., CORE STUFF)
0078 document/katedocument.cpp
0079 document/katebuffer.cpp
0080
0081 # undo
0082 undo/kateundo.cpp
0083 undo/katemodifiedundo.cpp
0084 undo/kateundomanager.cpp
0085
0086 # scripting
0087 script/katescript.cpp
0088 script/kateindentscript.cpp
0089 script/katecommandlinescript.cpp
0090 script/katescriptmanager.cpp
0091 script/katescriptaction.cpp
0092
0093 # scripting wrappers
0094 script/katescripteditor.cpp
0095 script/katescriptdocument.cpp
0096 script/katescriptview.cpp
0097 script/katescripthelpers.cpp
0098
0099 # mode (modemanager and co)
0100 mode/katemodemanager.cpp
0101 mode/katemodeconfigpage.cpp
0102 mode/katemodemenu.cpp
0103 mode/katemodemenulist.cpp
0104
0105 # modeline variable editor
0106 variableeditor/variablelineedit.cpp
0107 variableeditor/variablelistview.cpp
0108 variableeditor/variableeditor.cpp
0109 variableeditor/variableitem.cpp
0110 variableeditor/katehelpbutton.cpp
0111
0112 # printing classes
0113 printing/kateprinter.cpp
0114 printing/printpainter.cpp
0115 printing/printconfigwidgets.cpp
0116
0117 # rendering stuff (katerenderer and helpers)
0118 render/katerenderer.cpp
0119 render/katerenderrange.cpp
0120 render/katelayoutcache.cpp
0121 render/katetextlayout.cpp
0122 render/katelinelayout.cpp
0123
0124 # search stuff
0125 search/kateplaintextsearch.cpp
0126 search/kateregexpsearch.cpp
0127 search/katematch.cpp
0128 search/katesearchbar.cpp
0129
0130 # KSyntaxHighlighting integration
0131 syntax/katecategorydrawer.cpp
0132 syntax/katecolortreewidget.cpp
0133 syntax/katehighlight.cpp
0134 syntax/katehighlightingcmds.cpp
0135 syntax/katehighlightmenu.cpp
0136 syntax/katestyletreewidget.cpp
0137 syntax/katesyntaxmanager.cpp
0138 syntax/katethemeconfig.cpp
0139
0140 # view stuff (THE view and its helpers)
0141 view/kateview.cpp
0142 view/kateviewinternal.cpp
0143 view/kateviewhelpers.cpp
0144 view/kateannotationitemdelegate.cpp
0145 view/katemessagewidget.cpp
0146 view/katefadeeffect.cpp
0147 view/kateanimation.cpp
0148 view/katetextanimation.cpp
0149 view/katetextpreview.cpp
0150 view/katestatusbar.cpp
0151 view/wordcounter.cpp
0152
0153 # spell checking
0154 spellcheck/prefixstore.h
0155 spellcheck/prefixstore.cpp
0156 spellcheck/ontheflycheck.h
0157 spellcheck/ontheflycheck.cpp
0158 spellcheck/spellcheck.h
0159 spellcheck/spellcheck.cpp
0160 spellcheck/spellcheckdialog.h
0161 spellcheck/spellcheckdialog.cpp
0162 spellcheck/spellcheckbar.cpp
0163 spellcheck/spellingmenu.h
0164 spellcheck/spellingmenu.cpp
0165
0166 # generic stuff, unsorted...
0167 utils/katecmds.cpp
0168 utils/kateconfig.cpp
0169 utils/katebookmarks.cpp
0170 utils/kateautoindent.cpp
0171 utils/kateindentdetecter.cpp
0172 utils/katetemplatehandler.cpp
0173 utils/kateglobal.cpp
0174 utils/katecmd.cpp
0175 utils/ktexteditor.cpp
0176 utils/document.cpp
0177 utils/range.cpp
0178 utils/documentcursor.cpp
0179 utils/attribute.cpp
0180 utils/codecompletioninterface.cpp
0181 utils/codecompletionmodel.cpp
0182 utils/codecompletionmodelcontrollerinterface.cpp
0183 utils/configinterface.cpp
0184 utils/movinginterface.cpp
0185 utils/movingcursor.cpp
0186 utils/movingrange.cpp
0187 utils/movingrangefeedback.cpp
0188 utils/messageinterface.cpp
0189 utils/application.cpp
0190 utils/mainwindow.cpp
0191 utils/katecommandrangeexpressionparser.cpp
0192 utils/katesedcmd.cpp
0193 utils/variable.cpp
0194 utils/katevariableexpansionmanager.cpp
0195 utils/katevariableexpansionhelpers.cpp
0196
0197 # swapfile
0198 swapfile/kateswapdiffcreator.cpp
0199 swapfile/kateswapfile.cpp
0200
0201 # export as HTML
0202 export/exporter.cpp
0203 export/htmlexporter.cpp
0204
0205 # input modes
0206 inputmode/kateabstractinputmode.cpp
0207 inputmode/kateabstractinputmodefactory.cpp
0208 inputmode/katenormalinputmode.cpp
0209 inputmode/katenormalinputmodefactory.cpp
0210 )
0211
0212 # optionally compile with EditorConfig support
0213 if(EditorConfig_FOUND)
0214 set(ktexteditor_LIB_SRCS ${ktexteditor_LIB_SRCS} document/editorconfig.cpp)
0215 endif()
0216
0217 if(HAVE_KAUTH)
0218 set(ktexteditor_LIB_SRCS ${ktexteditor_LIB_SRCS} buffer/katesecuretextbuffer.cpp)
0219 endif()
0220
0221 ecm_qt_declare_logging_category(ktexteditor_LIB_SRCS
0222 HEADER katepartdebug.h
0223 IDENTIFIER LOG_KTE
0224 CATEGORY_NAME kf.texteditor
0225 OLD_CATEGORY_NAMES org.kde.ktexteditor
0226 DEFAULT_SEVERITY Warning
0227 DESCRIPTION "ktexteditor lib"
0228 EXPORT KTEXTEDITOR
0229 )
0230
0231
0232 ki18n_wrap_ui(ktexteditor_LIB_SRCS
0233 dialogs/textareaappearanceconfigwidget.ui
0234 dialogs/bordersappearanceconfigwidget.ui
0235 dialogs/completionconfigtab.ui
0236 dialogs/navigationconfigwidget.ui
0237 dialogs/editconfigwidget.ui
0238 dialogs/filetypeconfigwidget.ui
0239 dialogs/indentationconfigwidget.ui
0240 dialogs/opensaveconfigwidget.ui
0241 dialogs/opensaveconfigadvwidget.ui
0242 dialogs/statusbarconfigwidget.ui
0243 search/searchbarincremental.ui
0244 search/searchbarpower.ui
0245 spellcheck/spellcheckbar.ui
0246 dialogs/spellcheckconfigwidget.ui)
0247
0248 qt_add_resources( ktexteditor_qrc_SRCS data/ktexteditor.qrc "${CMAKE_CURRENT_BINARY_DIR}/script/data/script.qrc")
0249 set_source_files_properties(${ktexteditor_qrc_SRCS} PROPERTIES SKIP_UNITY_BUILD_INCLUSION ON)
0250
0251 # vi mode
0252 ki18n_wrap_ui(ktexteditor_LIB_SRCS vimode/config/configwidget.ui)
0253 set(ktexteditor_LIB_SRCS ${ktexteditor_LIB_SRCS} ${ktexteditor_qrc_SRCS}
0254 inputmode/kateviinputmode.cpp
0255 inputmode/kateviinputmodefactory.cpp
0256
0257 # vi input mode
0258 vimode/config/configtab.cpp
0259
0260 vimode/modes/insertvimode.cpp
0261 vimode/modes/modebase.cpp
0262 vimode/modes/normalvimode.cpp
0263 vimode/modes/replacevimode.cpp
0264 vimode/modes/visualvimode.cpp
0265
0266 vimode/appcommands.cpp
0267 vimode/cmds.cpp
0268 vimode/inputmodemanager.cpp
0269 vimode/command.cpp
0270 vimode/motion.cpp
0271 vimode/range.cpp
0272 vimode/keyparser.cpp
0273 vimode/globalstate.cpp
0274 vimode/emulatedcommandbar/emulatedcommandbar.cpp
0275 vimode/emulatedcommandbar/matchhighlighter.cpp
0276 vimode/emulatedcommandbar/completer.cpp
0277 vimode/emulatedcommandbar/activemode.cpp
0278 vimode/emulatedcommandbar/interactivesedreplacemode.cpp
0279 vimode/emulatedcommandbar/searchmode.cpp
0280 vimode/emulatedcommandbar/commandmode.cpp
0281 vimode/commandrangeexpressionparser.cpp
0282 vimode/keyevent.cpp
0283 vimode/keymapper.cpp
0284 vimode/marks.cpp
0285 vimode/jumps.cpp
0286 vimode/history.cpp
0287 vimode/macros.cpp
0288 vimode/mappings.cpp
0289 vimode/registers.cpp
0290 vimode/searcher.cpp
0291 vimode/completion.cpp
0292 vimode/completionrecorder.cpp
0293 vimode/completionreplayer.cpp
0294 vimode/macrorecorder.cpp
0295 vimode/lastchangerecorder.cpp
0296 )
0297
0298 add_library(KF5TextEditor ${ktexteditor_LIB_SRCS} ${KTEXTEDITOR_PUBLIC_HEADERS})
0299 ecm_generate_export_header(KF5TextEditor
0300 BASE_NAME KTextEditor
0301 GROUP_BASE_NAME KF
0302 VERSION ${KF_VERSION}
0303 DEPRECATED_BASE_VERSION 0
0304 DEPRECATION_VERSIONS 5.80
0305 EXCLUDE_DEPRECATED_BEFORE_AND_AT ${EXCLUDE_DEPRECATED_BEFORE_AND_AT}
0306 )
0307 add_library(KF5::TextEditor ALIAS KF5TextEditor)
0308
0309 target_include_directories(KF5TextEditor INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR_KF}/KTextEditor>")
0310
0311 # API is more or less KParts & KSyntaxHighlighting, other stuff is used only internally
0312 target_link_libraries(KF5TextEditor
0313 PUBLIC
0314 KF5::Parts
0315 KF5::SyntaxHighlighting
0316 PRIVATE
0317 Qt${QT_MAJOR_VERSION}::Qml
0318 Qt${QT_MAJOR_VERSION}::PrintSupport
0319 KF5::I18n
0320 KF5::Archive
0321 KF5::GuiAddons
0322 KF5::ItemViews
0323 KF5::SonnetCore
0324 KF5::WindowSystem
0325 KF5::SonnetUi
0326 ${KTEXTEDITOR_OPTIONAL_LIBS}
0327 )
0328
0329 if(HAVE_KAUTH)
0330 target_link_libraries(KF5TextEditor PRIVATE KF5::AuthCore)
0331 endif()
0332
0333 set_target_properties(KF5TextEditor
0334 PROPERTIES
0335 VERSION ${KTEXTEDITOR_VERSION}
0336 SOVERSION ${KTEXTEDITOR_SOVERSION}
0337 EXPORT_NAME "TextEditor"
0338 )
0339
0340 # precompiled headers support
0341 if(ENABLE_PCH)
0342 target_precompile_headers(KF5TextEditor
0343 PRIVATE
0344 <QHash>
0345 <QList>
0346 <QMap>
0347 <QPointer>
0348 <QSharedData>
0349 <QSharedPointer>
0350 <QString>
0351 <QStringList>
0352 <QTextFormat>
0353 <QTimer>
0354 <QVariant>
0355 <QVector>
0356 <QWidget>
0357 <algorithm>
0358 <functional>
0359 <memory>
0360 <string>
0361 <type_traits>
0362 <utility>
0363 <vector>
0364 )
0365 endif()
0366
0367 install(TARGETS KF5TextEditor EXPORT KF5TextEditorTargets ${KF_INSTALL_TARGETS_DEFAULT_ARGS})
0368
0369 install(FILES
0370 ${CMAKE_CURRENT_BINARY_DIR}/ktexteditor_export.h
0371 DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}/KTextEditor
0372 COMPONENT Devel
0373 )
0374
0375 if(BUILD_QCH)
0376 ecm_add_qch(
0377 KF5TextEditor_QCH
0378 NAME KTextEditor
0379 BASE_NAME KF5TextEditor
0380 VERSION ${KF_VERSION}
0381 ORG_DOMAIN org.kde
0382 SOURCES # using only public headers, to cover only public API
0383 ${KTEXTEDITOR_PUBLIC_HEADERS}
0384 "${CMAKE_SOURCE_DIR}/docs/apidocs-groups.dox"
0385 "${CMAKE_SOURCE_DIR}/docs/coding-guidelines.dox"
0386 "${CMAKE_SOURCE_DIR}/docs/design.dox"
0387 "${CMAKE_SOURCE_DIR}/docs/porting.dox"
0388 MD_MAINPAGE "${CMAKE_SOURCE_DIR}/README.md"
0389 IMAGE_DIRS "${CMAKE_SOURCE_DIR}/docs/pics"
0390 LINK_QCHS
0391 KF5Parts_QCH
0392 BLANK_MACROS
0393 KTEXTEDITOR_EXPORT
0394 KTEXTEDITOR_DEPRECATED
0395 KTEXTEDITOR_DEPRECATED_EXPORT
0396 "KTEXTEDITOR_DEPRECATED_VERSION(x, y, t)"
0397 TAGFILE_INSTALL_DESTINATION ${KDE_INSTALL_QTQCHDIR}
0398 QCH_INSTALL_DESTINATION ${KDE_INSTALL_QTQCHDIR}
0399 COMPONENT Devel
0400 )
0401 endif()
0402
0403 include(ECMGeneratePriFile)
0404 ecm_generate_pri_file(BASE_NAME KTextEditor LIB_NAME KF5TextEditor DEPS "KParts" FILENAME_VAR PRI_FILENAME INCLUDE_INSTALL_DIR ${KDE_INSTALL_INCLUDEDIR_KF}/KTextEditor)
0405 install(FILES ${PRI_FILENAME} DESTINATION ${ECM_MKSPECS_INSTALL_DIR})
0406
0407 if(HAVE_KAUTH)
0408 add_executable(kauth_ktexteditor_helper buffer/katesecuretextbuffer.cpp)
0409 target_link_libraries(kauth_ktexteditor_helper KF5::AuthCore)
0410 install(TARGETS kauth_ktexteditor_helper DESTINATION ${KAUTH_HELPER_INSTALL_DIR} )
0411 kauth_install_helper_files(kauth_ktexteditor_helper org.kde.ktexteditor.katetextbuffer root)
0412 kauth_install_actions(org.kde.ktexteditor.katetextbuffer buffer/org.kde.ktexteditor.katetextbuffer.actions)
0413 endif()
0414
0415 # add part
0416 add_subdirectory(part)
0417
0418 ecm_qt_install_logging_categories(
0419 EXPORT KTEXTEDITOR
0420 FILE ktexteditor.categories
0421 DESTINATION ${KDE_INSTALL_LOGGINGCATEGORIESDIR}
0422 )