CMakeLists.txt 847 Bytes
Newer Older
1 2 3 4 5 6 7
find_package(KF5ItemViews QUIET)
set_package_properties(KF5ItemViews PROPERTIES PURPOSE "Required to build the search addon")

if(NOT KF5ItemViews_FOUND)
  return()
endif()

8
add_library(katesearchplugin MODULE "")
9 10 11 12 13 14
target_compile_definitions(katesearchplugin PRIVATE TRANSLATION_DOMAIN="katesearch")

target_link_libraries(
  katesearchplugin 
  PRIVATE
    KF5::ItemViews
15
    KF5::TextEditor
16
)
Kåre Särs's avatar
Kåre Särs committed
17

18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
ki18n_wrap_ui(UI_SOURCES search.ui results.ui)
target_sources(katesearchplugin PRIVATE ${UI_SOURCES})

target_sources(
  katesearchplugin
  PRIVATE
    plugin_search.cpp
    search_open_files.cpp
    SearchDiskFiles.cpp
    FolderFilesList.cpp
    replace_matches.cpp
    htmldelegate.cpp
    plugin.qrc
)

33
kcoreaddons_desktop_to_json(katesearchplugin katesearch.desktop)
34
install(TARGETS katesearchplugin DESTINATION ${PLUGIN_INSTALL_DIR}/ktexteditor)