diff --git a/CMakeLists.txt b/CMakeLists.txt deleted file mode 100644 index 55ea09f60c..0000000000 --- a/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -cmake_minimum_required(VERSION 3.2.2) - -project(QOwnNotes) - -list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake) - -add_subdirectory(src) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index d1a2306691..abc13943dc 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,6 +1,8 @@ cmake_minimum_required(VERSION 3.5) project(QOwnNotes) +list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake) + # BEGIN options option(QON_QT6_BUILD "Build QOwnNotes with Qt6" OFF) # END options diff --git a/cmake/FindBotan2.cmake b/src/cmake/FindBotan2.cmake similarity index 100% rename from cmake/FindBotan2.cmake rename to src/cmake/FindBotan2.cmake diff --git a/src/libraries/sonnet/CMakeLists.txt b/src/libraries/sonnet/CMakeLists.txt new file mode 100644 index 0000000000..a362fe20f6 --- /dev/null +++ b/src/libraries/sonnet/CMakeLists.txt @@ -0,0 +1,47 @@ +find_package(Qt${QT_VERSION_MAJOR} COMPONENTS REQUIRED + Core +) + +add_library(Sonnet + STATIC + src/core/backgroundchecker.cpp + src/core/backgroundchecker.h + src/core/backgroundchecker_p.h + src/core/client.cpp + src/core/client_p.h + src/core/core_debug.cpp + src/core/core_debug.h + src/core/guesslanguage.cpp + src/core/guesslanguage.h + src/core/languagefilter.cpp + src/core/languagefilter_p.h + src/core/loader.cpp + src/core/loader_p.h + src/core/settings.cpp + src/core/settings_p.h + src/core/sonnetcore_export.h + src/core/speller.cpp + src/core/speller.h + src/core/spellerplugin.cpp + src/core/spellerplugin_p.h + src/core/textbreaks.cpp + src/core/textbreaks_p.h + src/core/tokenizer.cpp + src/core/tokenizer_p.h + # Hunspell plugin + src/plugins/hunspell/hunspellclient.cpp + src/plugins/hunspell/hunspellclient.h + src/plugins/hunspell/hunspelldebug.cpp + src/plugins/hunspell/hunspelldebug.h + src/plugins/hunspell/hunspelldict.cpp + src/plugins/hunspell/hunspelldict.h +) + +# The hunspell library +add_subdirectory(src/plugins/hunspell/hunspell) + +target_link_libraries(Sonnet + PRIVATE + Qt${QT_VERSION_MAJOR}::Core + Hunspell +)