Warning, /frameworks/sonnet/src/plugins/hunspell/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 set(sonnet_hunspell_PART_SRCS
0002     hunspellclient.cpp
0003     hunspelldict.cpp
0004 )
0005 ecm_qt_declare_logging_category(sonnet_hunspell_PART_SRCS
0006     HEADER hunspelldebug.h
0007     IDENTIFIER SONNET_HUNSPELL
0008     CATEGORY_NAME kf.sonnet.clients.hunspell
0009     OLD_CATEGORY_NAMES sonnet.plugins.hunspell
0010     DESCRIPTION "Sonnet HUnspell plugin"
0011     EXPORT SONNET
0012 )
0013 
0014 # see: https://phabricator.kde.org/R246:0a96acf251baa5c9dd042d093ab2bf8fcee10502
0015 set(USE_OLD_HUNSPELL_API TRUE)
0016 if (PKG_HUNSPELL_VERSION GREATER "1.5.0")
0017     set(USE_OLD_HUNSPELL_API FALSE) # new API introduced in v1.5.1 (cf. https://github.com/hunspell/hunspell/commit/8006703dafeebce19f2144c5cf180812eb99693a)
0018 endif()
0019 message(STATUS "Using old hunspell API: ${USE_OLD_HUNSPELL_API}")
0020 
0021 configure_file(config-hunspell.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-hunspell.h)
0022 
0023 add_library(sonnet_hunspell MODULE ${sonnet_hunspell_PART_SRCS})
0024 target_include_directories(sonnet_hunspell SYSTEM PUBLIC ${HUNSPELL_INCLUDE_DIRS})
0025 target_link_libraries(sonnet_hunspell PRIVATE KF5::SonnetCore ${HUNSPELL_LIBRARIES})
0026 
0027 if (TARGET Qt6::Core5Compat)
0028     target_link_libraries(sonnet_hunspell PRIVATE Qt6::Core5Compat) # QTextCodec
0029 endif()
0030 
0031 target_compile_definitions(sonnet_hunspell PRIVATE DEFINITIONS SONNET_INSTALL_PREFIX="${CMAKE_INSTALL_PREFIX}")
0032 
0033 install(TARGETS sonnet_hunspell  DESTINATION ${KDE_INSTALL_PLUGINDIR}/kf${QT_MAJOR_VERSION}/sonnet/)