aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJarkko Koivikko <jarkko.koivikko@code-q.fi>2022-03-30 11:39:55 +0300
committerJarkko Koivikko <jarkko.koivikko@code-q.fi>2022-03-31 20:57:12 +0300
commita8f9d4b6a6c3fa05995d083482a8a6d3f2e05f93 (patch)
tree1429baf5a63317196962e307dd680b9225460546
parent9c679ed59e2fed82a85d40a8925492c90e43df65 (diff)
Make 3rdparty/hunspell buildable by simple git checkout
Previously the 3rdparty/hunspell sources had to be copied over to the src/plugins/hunspell/3rdparty. This change modifies the build files so that it is possible to do a simple git checkout of the hunspell sources at the same directory. Change-Id: I18d4a8f5d3819fdf61f19a1dc84e068fbf6a5600 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
-rw-r--r--cmake/QtVirtualKeyboardSetup.cmake3
-rw-r--r--src/plugins/hunspell/3rdparty/hunspell/CMakeLists.txt51
-rw-r--r--src/plugins/hunspell/CMakeLists.txt4
3 files changed, 23 insertions, 35 deletions
diff --git a/cmake/QtVirtualKeyboardSetup.cmake b/cmake/QtVirtualKeyboardSetup.cmake
index a3c7f986..3d0fe493 100644
--- a/cmake/QtVirtualKeyboardSetup.cmake
+++ b/cmake/QtVirtualKeyboardSetup.cmake
@@ -63,8 +63,7 @@ function(process_vkb_enable)
endfunction()
function(check_3rdparty_hunspell)
- if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/plugins/hunspell/3rdparty/hunspell/src/hunspell/hunspell.h" AND
- EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/plugins/hunspell/3rdparty/hunspell/data")
+ if (EXISTS "${CMAKE_CURRENT_LIST_DIR}/../src/plugins/hunspell/3rdparty/hunspell/hunspell/src/hunspell/hunspell.h")
set(VKB_HAVE_3RDPARTY_HUNSPELL TRUE CACHE BOOL "Detection of local Hunspell source code" FORCE)
else()
set(VKB_HAVE_3RDPARTY_HUNSPELL FALSE CACHE BOOL "Detection of local Hunspell source code" FORCE)
diff --git a/src/plugins/hunspell/3rdparty/hunspell/CMakeLists.txt b/src/plugins/hunspell/3rdparty/hunspell/CMakeLists.txt
index a954d3f4..aa97f346 100644
--- a/src/plugins/hunspell/3rdparty/hunspell/CMakeLists.txt
+++ b/src/plugins/hunspell/3rdparty/hunspell/CMakeLists.txt
@@ -1,5 +1,3 @@
-# Generated from hunspell.pro.
-
#####################################################################
## BundledHunspell Generic Library:
#####################################################################
@@ -8,43 +6,34 @@ qt_internal_add_3rdparty_library(BundledHunspell
QMAKE_LIB_NAME hunspell
STATIC
SOURCES
- config.h
- src/hunspell/affentry.cxx src/hunspell/affentry.hxx
- src/hunspell/affixmgr.cxx src/hunspell/affixmgr.hxx
- src/hunspell/atypes.hxx
- src/hunspell/baseaffix.hxx
- src/hunspell/csutil.cxx src/hunspell/csutil.hxx
- src/hunspell/filemgr.cxx src/hunspell/filemgr.hxx
- src/hunspell/hashmgr.cxx src/hunspell/hashmgr.hxx
- src/hunspell/htypes.hxx
- src/hunspell/hunspell.cxx src/hunspell/hunspell.h src/hunspell/hunspell.hxx
- src/hunspell/hunvisapi.h
- src/hunspell/hunzip.cxx src/hunspell/hunzip.hxx
- src/hunspell/langnum.hxx
- src/hunspell/phonet.cxx src/hunspell/phonet.hxx
- src/hunspell/replist.cxx src/hunspell/replist.hxx
- src/hunspell/suggestmgr.cxx src/hunspell/suggestmgr.hxx
- src/hunspell/w_char.hxx
+ hunspell/config.h
+ hunspell/src/hunspell/affentry.cxx hunspell/src/hunspell/affentry.hxx
+ hunspell/src/hunspell/affixmgr.cxx hunspell/src/hunspell/affixmgr.hxx
+ hunspell/src/hunspell/atypes.hxx
+ hunspell/src/hunspell/baseaffix.hxx
+ hunspell/src/hunspell/csutil.cxx hunspell/src/hunspell/csutil.hxx
+ hunspell/src/hunspell/filemgr.cxx hunspell/src/hunspell/filemgr.hxx
+ hunspell/src/hunspell/hashmgr.cxx hunspell/src/hunspell/hashmgr.hxx
+ hunspell/src/hunspell/htypes.hxx
+ hunspell/src/hunspell/hunspell.cxx hunspell/src/hunspell/hunspell.h hunspell/src/hunspell/hunspell.hxx
+ hunspell/src/hunspell/hunvisapi.h
+ hunspell/src/hunspell/hunzip.cxx hunspell/src/hunspell/hunzip.hxx
+ hunspell/src/hunspell/langnum.hxx
+ hunspell/src/hunspell/phonet.cxx hunspell/src/hunspell/phonet.hxx
+ hunspell/src/hunspell/replist.cxx hunspell/src/hunspell/replist.hxx
+ hunspell/src/hunspell/suggestmgr.cxx hunspell/src/hunspell/suggestmgr.hxx
+ hunspell/src/hunspell/w_char.hxx
PUBLIC_DEFINES
HUNSPELL_STATIC
PUBLIC_INCLUDE_DIRECTORIES
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>
- $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/hunspell/src>
)
qt_disable_warnings(BundledHunspell)
-# special case begin
-file(READ ChangeLog HUNSPELL_VERSION LIMIT 10)
+file(READ hunspell/ChangeLog HUNSPELL_VERSION LIMIT 10)
string(STRIP ${HUNSPELL_VERSION} HUNSPELL_VERSION)
-configure_file(config.h.cmake.in config.h)
-# special case end
-
-#### Keys ignored in scope 1:.:.:hunspell.pro:<TRUE>:
-# OTHER_FILES = "src/hunspell/license.hunspell" "src/hunspell/license.myspell" "src/hunspell/utf_info.cxx"
-# config_file = "/* Version number of package */" "$${LITERAL_HASH}define VERSION "$$VERSION""
-
-## Scopes:
-#####################################################################
+configure_file(config.h.cmake.in hunspell/config.h)
qt_internal_extend_target(BundledHunspell CONDITION CMAKE_BUILD_TYPE STREQUAL Debug
DEFINES
diff --git a/src/plugins/hunspell/CMakeLists.txt b/src/plugins/hunspell/CMakeLists.txt
index 3ebc3efa..df705c47 100644
--- a/src/plugins/hunspell/CMakeLists.txt
+++ b/src/plugins/hunspell/CMakeLists.txt
@@ -1,7 +1,7 @@
# Generated from hunspell.pro.
-add_subdirectory(hunspellinputmethod)
-add_subdirectory(plugin)
if(QT_FEATURE_3rdparty_hunspell)
add_subdirectory(3rdparty/hunspell)
endif()
+add_subdirectory(hunspellinputmethod)
+add_subdirectory(plugin)