From 087da12893f0d32e86f6db412cbdb53672030a35 Mon Sep 17 00:00:00 2001 From: Brendan Hagan Date: Tue, 7 Jun 2022 00:24:17 -0400 Subject: [PATCH] misc: get this crap building locally Looks like my install via vcpkg sets up a different directory structure for hunspell --- .github/workflows/build.yml | 6 +++--- CMakeLists.txt | 4 +++- CMakeSettings.json | 16 ++++++---------- README.md | 13 +++++++------ src/gui/util.cpp | 1 + src/util/spell_checker.hpp | 2 +- 6 files changed, 21 insertions(+), 21 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7f6b92b1..92e51f82 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,7 +1,7 @@ name: windows-build on: - push: - branches: [master] + # push: + # branches: [master] workflow_dispatch: jobs: @@ -36,4 +36,4 @@ jobs: name: build path: | ./build/magicseteditor* - /mingw64/bin/libhunspell-1.7-0.dll \ No newline at end of file + /mingw64/bin/libhunspell-1.7-0.dll diff --git a/CMakeLists.txt b/CMakeLists.txt index 552bb9bb..28b8d8db 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,8 +14,10 @@ find_package(PkgConfig) pkg_check_modules(HUNSPELL hunspell) if( NOT HUNSPELL_FOUND ) message("-- Cannot find Hunspell via pkg-config, checking directly...") - find_path(HUNSPELL_INCLUDE_DIRS hunspell/hunspell.hxx) + find_path(HUNSPELL_INCLUDE_DIRS hunspell.hxx) + message("-- HUNSPELL_INCLUDE_DIRS = ${HUNSPELL_INCLUDE_DIRS}") find_library(HUNSPELL_LIBRARIES NAMES hunspell libhunspell) + message("-- HUNSPELL_LIBRARIES = ${HUNSPELL_LIBRARIES}") if ( ${HUNSPELL_INCLUDE_DIRS} STREQUAL "HUNSPELL_INCLUDE_DIRS-NOTFOUND" ) message(FATAL_ERROR "Hunspell cannot be found") else() diff --git a/CMakeSettings.json b/CMakeSettings.json index 13b08d17..ba414f63 100644 --- a/CMakeSettings.json +++ b/CMakeSettings.json @@ -9,8 +9,7 @@ "cmakeCommandArgs": "", "buildCommandArgs": "-v", "ctestCommandArgs": "", - "inheritEnvironments": [ "msvc_x86" ], - "variables": [] + "inheritEnvironments": [ "msvc_x86" ] }, { "name": "x86-Release", @@ -22,7 +21,7 @@ "buildCommandArgs": "-v", "ctestCommandArgs": "", "inheritEnvironments": [ "msvc_x86" ], - "variables": [] + "cmakeToolchain": "C:/git/vcpkg/scripts/buildsystems/vcpkg.cmake" }, { "name": "x64-Debug", @@ -33,8 +32,7 @@ "cmakeCommandArgs": "", "buildCommandArgs": "-v", "ctestCommandArgs": "", - "inheritEnvironments": [ "msvc_x64_x64" ], - "variables": [] + "inheritEnvironments": [ "msvc_x64_x64" ] }, { "name": "x64-Release", @@ -45,8 +43,7 @@ "cmakeCommandArgs": "", "buildCommandArgs": "-v", "ctestCommandArgs": "", - "inheritEnvironments": [ "msvc_x64_x64" ], - "variables": [] + "inheritEnvironments": [ "msvc_x64_x64" ] }, { "name": "x86-Release-static", @@ -58,7 +55,7 @@ "buildCommandArgs": "-v", "ctestCommandArgs": "", "inheritEnvironments": [ "msvc_x86" ], - "variables": [] + "cmakeToolchain": "C:/git/vcpkg/scripts/buildsystems/vcpkg.cmake" }, { "name": "x64-Release-static", @@ -69,8 +66,7 @@ "cmakeCommandArgs": "-DVCPKG_TARGET_TRIPLET=x64-windows-static", "buildCommandArgs": "-v", "ctestCommandArgs": "", - "inheritEnvironments": [ "msvc_x64_x64" ], - "variables": [] + "inheritEnvironments": [ "msvc_x64_x64" ] } ] } \ No newline at end of file diff --git a/README.md b/README.md index 5233665d..ccd76970 100644 --- a/README.md +++ b/README.md @@ -19,12 +19,13 @@ On windows, the program can be compiled with Visual Studio (recommended) or with * Download and install [vcpkg](https://github.com/microsoft/vcpkg) * Use vcpkg to install wxwidgets, boost, hunspell ```` -vcpkg install wxwidgets -vcpkg install boost-smart-ptr -vcpkg install boost-regex -vcpkg install boost-logic -vcpkg install boost-pool -vcpkg install hunspell +vcpkg install wxwidgets:x86-windows-static +vcpkg install boost-smart-ptr:x86-windows-static +vcpkg install boost-regex:x86-windows-static +vcpkg install boost-logic:x86-windows-static +vcpkg install boost-pool:x86-windows-static +vcpkg install boost-iterator:x86-windows-static +vcpkg install hunspell:x86-windows-static vcpkg integrate install ```` * Then just use "Open Folder" from inside visual studio to open the Magic Set Editor source code root folder. diff --git a/src/gui/util.cpp b/src/gui/util.cpp index cc66512c..124c60b8 100644 --- a/src/gui/util.cpp +++ b/src/gui/util.cpp @@ -12,6 +12,7 @@ #include #include #include +#include #include // ----------------------------------------------------------------------------- : Window related diff --git a/src/util/spell_checker.hpp b/src/util/spell_checker.hpp index 2a4b0c16..4a6b6b05 100644 --- a/src/util/spell_checker.hpp +++ b/src/util/spell_checker.hpp @@ -10,7 +10,7 @@ #include #undef near -#include "hunspell/hunspell.hxx" +#include "hunspell.hxx" DECLARE_POINTER_TYPE(SpellChecker);