diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 2c1e045b..423a07ae 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -107,7 +107,6 @@ jobs: vcpkg install sdl2:x64-windows-static vcpkg install sqlite3:x64-windows-static vcpkg install tiff:x64-windows-static - vcpkg install tool-meson:x64-windows-static vcpkg install wxwidgets:x64-windows-static vcpkg install xerces-c:x64-windows-static vcpkg install zlib:x64-windows-static @@ -116,7 +115,7 @@ jobs: # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type # Kinda guessing this using supertux + my own build scripts as guides. - run: cmake --no-warn-unused-cli -B ${{github.workspace}}/build -DCMAKE_TOOLCHAIN_FILE=c:/vcpkg/scripts/buildsystems/vcpkg.cmake -G "Visual Studio 17 2022" -T host=x64 -A x64 -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DBUILD_MEGAGLEST_MODEL_IMPORT_EXPORT_TOOLS=OFF + run: cmake --no-warn-unused-cli -B ${{github.workspace}}/build -DCMAKE_TOOLCHAIN_FILE=c:/vcpkg/scripts/buildsystems/vcpkg.cmake -G "Visual Studio 17 2022" -T host=x64 -A x64 -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE - name: Build Mega Glest # Build your program with the given configuration diff --git a/mk/windoze/build-mg-vs-cmake.ps1 b/mk/windoze/build-mg-vs-cmake.ps1 index 945fdc1e..81617c06 100644 --- a/mk/windoze/build-mg-vs-cmake.ps1 +++ b/mk/windoze/build-mg-vs-cmake.ps1 @@ -116,7 +116,7 @@ else { $vsProjType = "Visual Studio 17 2022" } -cmake --no-warn-unused-cli -DCMAKE_TOOLCHAIN_FILE:STRING=$toolchainPath -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE "-H$topLevelTargetDir" "-B$buildFolder" -G $vsProjType -T host=x64 -A x64 -DBUILD_MEGAGLEST_MODEL_IMPORT_EXPORT_TOOLS=OFF +cmake --no-warn-unused-cli -DCMAKE_TOOLCHAIN_FILE:STRING=$toolchainPath -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE "-H$topLevelTargetDir" "-B$buildFolder" -G $vsProjType -T host=x64 -A x64 cmake --build $buildFolder --config Release --target ALL_BUILD diff --git a/source/tools/glexemel/CMakeLists.txt b/source/tools/glexemel/CMakeLists.txt index 9caa9408..a40af6ff 100644 --- a/source/tools/glexemel/CMakeLists.txt +++ b/source/tools/glexemel/CMakeLists.txt @@ -15,6 +15,13 @@ IF(BUILD_MEGAGLEST_MODEL_IMPORT_EXPORT_TOOLS) ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") find_package(LibXml2) + + IF(WIN32) + # Need to explicitly find iconv with vcpkg. + find_package(Iconv) + SET(LIBXML2_LIBRARIES ${LIBXML2_LIBRARIES} Iconv::Iconv) + ENDIF() + IF(LIBXML2_FOUND) include_directories(${CMAKE_INCLUDE_PATH} ${LIBXML2_INCLUDE_DIR}) add_executable(xml2g xml2g.c g3dv4.h)