Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependencies and CI #3711

Merged
merged 24 commits into from
Mar 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
e217fdc
Update quickjs-wz
past-due Mar 26, 2024
aee57c4
Update fmt to 10.2.1
past-due Mar 26, 2024
c17a8ff
Upgrade GLM to 1.0.1+ (latest)
past-due Mar 26, 2024
60aaa4b
[GitHub Actions] Bump actions/cache to v4
past-due Mar 26, 2024
1fb3ed8
[GitHub Actions] macOS: Remove Xcode 11.7 job
past-due Mar 26, 2024
ce877cb
[GitHub Actions] macOS: Update to Xcode 14.3 on macos-13 image
past-due Mar 26, 2024
d32fdfd
[GitHub Actions] macOS: Use arm64 as the "base" app bundle
past-due Mar 26, 2024
42922d4
[macOS] Update vcpkg commit in configure_mac.cmake
past-due Mar 26, 2024
211d167
[Windows] Update vcpkg commit in get-dependencies_win.ps1
past-due Mar 26, 2024
9ef9e96
vcpkg.json: Update builtin-baseline
past-due Mar 26, 2024
0f26dfa
[GitHub Actions] macOS: Prevent Homebrew from auto-updating
past-due Mar 26, 2024
ae28874
[CI] Update to Asciidoctor 2.0.22
past-due Mar 26, 2024
0fea937
[CMake] Fix FindSodium.cmake for new vcpkg port setup
past-due Mar 26, 2024
eea3a57
[GitHub Actions] macOS: Prevent Homebrew from auto-upgrading on install
past-due Mar 26, 2024
32eae57
[GitHub Actions] macOS: brew install automake
past-due Mar 26, 2024
7a40555
Update macosx/README.md
past-due Mar 26, 2024
46abf59
[GitHub Actions] Windows: Upload additional failure logs
past-due Mar 26, 2024
0137290
Add libsodium vcpkg overlay-port
past-due Mar 26, 2024
8b9701f
[CMake] Log additional libzip details
past-due Mar 26, 2024
3af0641
[GitHub Actions] macOS: Update minimum deployment target
past-due Mar 26, 2024
5ed1564
[GitHub Actions] Windows: Update to llvm-mingw 20231128 with LLVM 17.0.6
past-due Mar 26, 2024
9c88507
[macOS] configure_mac.cmake: Prevent finding libraries in certain paths
past-due Mar 26, 2024
4b77c6c
wzmaplib: Adjust CMake find_package(libzip) params
past-due Mar 26, 2024
3d92517
wzmaplib: Silence Wunused-but-set-variable
past-due Mar 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 78 additions & 0 deletions .ci/vcpkg/overlay-ports/libsodium/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO jedisct1/libsodium
REF 73248a4972336f411f688864eb6b086d215122fc # latest commit on: 1.0.19-stable branch as of 2024-03-24
SHA512 b9bf37017e4a1deb0f5cbf9955c2bee6925fed57ed173be9bb58e7a00439038772559f4cbe36d1fb40107b9afd9a9b5a4302ab83630b4740f2ffeab4f03ed671
HEAD_REF master
)

if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
set(lib_linkage "LIB")
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
set(lib_linkage "DLL")
endif()

set(LIBSODIUM_PROJECT_SUBPATH "builds/msvc/vs2022/libsodium/libsodium.vcxproj" CACHE STRING "Triplet variable")

vcpkg_msbuild_install(
SOURCE_PATH "${SOURCE_PATH}"
PROJECT_SUBPATH "${LIBSODIUM_PROJECT_SUBPATH}"
RELEASE_CONFIGURATION "Release${lib_linkage}"
DEBUG_CONFIGURATION "Debug${lib_linkage}"
)

file(INSTALL "${SOURCE_PATH}/src/libsodium/include/sodium.h" "${SOURCE_PATH}/src/libsodium/include/sodium" DESTINATION "${CURRENT_PACKAGES_DIR}/include")
file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/src/libsodium/include/sodium/version.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include/sodium")
file(REMOVE "${CURRENT_PACKAGES_DIR}/include/Makefile.am" "${CURRENT_PACKAGES_DIR}/include/sodium/version.h.in")

block(SCOPE_FOR VARIABLES)
set(PACKAGE_NAME "libsodium")
set(PACKAGE_VERSION "${VERSION}")
set(prefix [[unused]])
set(exec_prefix [[${prefix}]])
set(includedir [[${prefix}/include]])
set(libdir [[${prefix}/lib]])
set(PKGCONFIG_LIBS_PRIVATE "")
configure_file("${SOURCE_PATH}/libsodium.pc.in" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/libsodium.pc" @ONLY)
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/libsodium.pc" " -lsodium" " -llibsodium")
if(NOT VCPKG_BUILD_TYPE)
set(includedir [[${prefix}/../include]])
configure_file("${SOURCE_PATH}/libsodium.pc.in" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libsodium.pc" @ONLY)
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libsodium.pc" " -lsodium" " -llibsodium")
endif()
endblock()
else()

vcpkg_list(SET options)
if(VCPKG_TARGET_IS_EMSCRIPTEN)
vcpkg_list(APPEND options "--disable-ssp" "--disable-asm")
endif()

vcpkg_configure_make(
AUTOCONFIG
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
${options}
)
vcpkg_install_make()

file(REMOVE_RECURSE
"${CURRENT_PACKAGES_DIR}/debug/include"
"${CURRENT_PACKAGES_DIR}/debug/share"
)
endif()

vcpkg_fixup_pkgconfig()

if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/sodium/export.h" "#ifdef SODIUM_STATIC" "#if 1")
endif()

# vcpkg legacy
configure_file(
"${CMAKE_CURRENT_LIST_DIR}/sodiumConfig.cmake.in"
"${CURRENT_PACKAGES_DIR}/share/unofficial-sodium/unofficial-sodiumConfig.cmake"
@ONLY
)

vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
32 changes: 32 additions & 0 deletions .ci/vcpkg/overlay-ports/libsodium/sodiumConfig.cmake.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@

if("@VCPKG_LIBRARY_LINKAGE@" STREQUAL "static" AND NOT WIN32)
include(CMakeFindDependencyMacro)
find_dependency(Threads)
endif()

if(NOT TARGET unofficial-sodium::sodium)
add_library(unofficial-sodium::sodium UNKNOWN IMPORTED)

set_target_properties(unofficial-sodium::sodium PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include"
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
)

if("@VCPKG_LIBRARY_LINKAGE@" STREQUAL "static" AND NOT WIN32)
set_target_properties(unofficial-sodium::sodium PROPERTIES
INTERFACE_LINK_LIBRARIES Threads::Threads
)
endif()

find_library(VCPKG_SODIUM_LIBRARY_RELEASE NAMES sodium libsodium PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib" NO_DEFAULT_PATH)
if(EXISTS "${VCPKG_SODIUM_LIBRARY_RELEASE}")
set_property(TARGET unofficial-sodium::sodium APPEND PROPERTY IMPORTED_CONFIGURATIONS "Release")
set_target_properties(unofficial-sodium::sodium PROPERTIES IMPORTED_LOCATION_RELEASE "${VCPKG_SODIUM_LIBRARY_RELEASE}")
endif()

find_library(VCPKG_SODIUM_LIBRARY_DEBUG NAMES sodium libsodium PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib" NO_DEFAULT_PATH)
if(EXISTS "${VCPKG_SODIUM_LIBRARY_DEBUG}")
set_property(TARGET unofficial-sodium::sodium APPEND PROPERTY IMPORTED_CONFIGURATIONS "Debug")
set_target_properties(unofficial-sodium::sodium PROPERTIES IMPORTED_LOCATION_DEBUG "${VCPKG_SODIUM_LIBRARY_DEBUG}")
endif()
endif()
14 changes: 14 additions & 0 deletions .ci/vcpkg/overlay-ports/libsodium/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "libsodium",
"version": "1.0.19-stable",
"description": "A modern and easy-to-use crypto library",
"homepage": "https://libsodium.org/",
"license": "ISC",
"dependencies": [
{
"name": "vcpkg-msbuild",
"host": true,
"platform": "windows & !mingw"
}
]
}
2 changes: 1 addition & 1 deletion .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ freebsd_build_task:
# - brew install cmake
# - brew install gettext
# # NOTE: Specify an explicit Asciidoctor version to help ensure reproducible builds
# - sudo gem install asciidoctor -v 2.0.16 --no-document
# - sudo gem install asciidoctor -v 2.0.22 --no-document
# # gcc6+ is currently required to bootstrap vcpkg on macOS
# - brew install gcc@7
# - sudo bundle install --gemfile="macosx/BuildBot/Gemfile"
Expand Down
44 changes: 21 additions & 23 deletions .github/workflows/CI_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,28 +27,20 @@ jobs:
strategy:
matrix:
include:
- name: "Xcode 11.7 (x64)"
image: "macos-11"
- name: "Xcode 14.3 (x64)"
image: "macos-13"
osx_target_arch: "x86_64"
vcpkg_triplet: "x64-osx"
xcode_dev_dir: "/Applications/Xcode_11.7.app"
xcode_dev_dir: "/Applications/Xcode_14.3.1.app"
include_videos: false
artifact_suffix: "x64"
publish_artifact: false
- name: "Xcode 13.4 (x64)"
image: "macos-12"
osx_target_arch: "x86_64"
vcpkg_triplet: "x64-osx"
xcode_dev_dir: "/Applications/Xcode_13.4.1.app"
include_videos: true
artifact_suffix: "x64"
publish_artifact: true
- name: "Xcode 13.4 (ARM64)"
image: "macos-12"
- name: "Xcode 14.3 (ARM64)"
image: "macos-13"
osx_target_arch: "arm64"
vcpkg_triplet: "arm64-osx"
xcode_dev_dir: "/Applications/Xcode_13.4.1.app"
include_videos: false
xcode_dev_dir: "/Applications/Xcode_14.3.1.app"
include_videos: true
artifact_suffix: "arm64"
publish_artifact: true
fail-fast: false
Expand All @@ -58,7 +50,7 @@ jobs:
runs-on: '${{ matrix.image }}'
if: "!contains(github.event.head_commit.message, '[ci skip]')"
env:
MACOSX_DEPLOYMENT_TARGET: '10.9'
MACOSX_DEPLOYMENT_TARGET: '10.13'
VSCMD_SKIP_SENDTELEMETRY: 1
DESIRED_XCODE_DEV_DIR: '${{ matrix.xcode_dev_dir }}'
WZ_INCLUDE_VIDEOS: '${{ matrix.include_videos }}'
Expand All @@ -85,13 +77,19 @@ jobs:
working-directory: ./src
run: git submodule update --init --recursive
- name: Install Pre-reqs
env:
HOMEBREW_NO_AUTO_UPDATE: 1
HOMEBREW_NO_INSTALL_UPGRADE: 1
run: |
brew install gettext
echo "::group::brew install"
brew install automake gettext pkg-config
echo "::endgroup::"

# NOTE: Specify an explicit Asciidoctor version to help ensure reproducible builds
gem install asciidoctor -v 2.0.16 --no-document
echo "::group::gem install asciidoctor"
gem install asciidoctor -v 2.0.22 --no-document
echo "::endgroup::"

#brew update
brew install pkg-config
#if (brew outdated | grep cmake > /dev/null); then echo "upgrading CMake"; brew upgrade cmake; fi
cmake --version
- name: Prep Environment
Expand Down Expand Up @@ -252,16 +250,16 @@ jobs:
- name: Create Universal Binary
working-directory: ./dl-artifacts
run: |
BASE_APP_BUNDLE="warzone2100_macOS_x64/Warzone 2100.app"
BASE_APP_BUNDLE="warzone2100_macOS_arm64/Warzone 2100.app"
# extract entitlements plist from the "base" app bundle binary
echo "Extract entitlements.plist"
codesign -d --entitlements :- "${BASE_APP_BUNDLE}/Contents/MacOS/Warzone 2100" > "entitlements.plist"
cat "entitlements.plist"
echo "-----------------------------------"
echo "Make universal binary + app package"
../src/macosx/BuildBot/make_universal.sh "${BASE_APP_BUNDLE}" "warzone2100_macOS_arm64/Warzone 2100.app"
../src/macosx/BuildBot/make_universal.sh "${BASE_APP_BUNDLE}" "warzone2100_macOS_x64/Warzone 2100.app"
# Rename the "base" app package directory
mv "warzone2100_macOS_x64" "warzone2100_macOS_universal"
mv "warzone2100_macOS_arm64" "warzone2100_macOS_universal"
echo "Re-code-sign"
codesign --force --options runtime --entitlements "entitlements.plist" -s - "warzone2100_macOS_universal/Warzone 2100.app"
# Zip and copy to build dir
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/CI_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ jobs:
id: asciidoctor-dl
run: |
echo "Installing Asciidoctor"
gem install asciidoctor -v 2.0.16 --no-document | Out-Null
gem install asciidoctor -v 2.0.22 --no-document | Out-Null
echo "Installing Asciidoctor... finished"
$AsciidoctorBat = (Get-Command asciidoctor.bat).Path
echo "Asciidoctor.bat: ${AsciidoctorBat}"
Expand Down Expand Up @@ -399,10 +399,10 @@ jobs:
$VerbosePreference = "Continue"
. "${env:WZ_REPO_PATH}\.ci\powershell\request.ps1"

$LLVM_MINGW_RELEASE = "20231031";
$LLVM_MINGW_RELEASE = "20231128";
$LLVM_MINGW_PKG = "llvm-mingw-${LLVM_MINGW_RELEASE}-ucrt-x86_64"
$LLVM_MINGW_DL_URL = "https://github.com/mstorsjo/llvm-mingw/releases/download/${LLVM_MINGW_RELEASE}/${LLVM_MINGW_PKG}.zip"
$LLVM_MINGW_DL_SHA512 = "3173b7a9b7836adce0fa5a59b13a01fa7707d1fc5be27606e779cca853b4452571ab37a1d5d6b3fd2ca067f58aa6011b121ba4f29b9b0eaaa1de2679d6b55af9"
$LLVM_MINGW_DL_SHA512 = "86e99cce855bf01d75032fe282986976b53e5a71f52a80b00e92906db462426515fbe2764465afa4f5a67b6abc4325c7a21d0eb59845be615890ef2560f1ec37"

$LLVM_MINGW_DL_BASEDIR = "${{ github.workspace }}\dl"
$LLVM_MINGW_DL_PATH = "${LLVM_MINGW_DL_BASEDIR}\llvm-mingw.zip"
Expand Down Expand Up @@ -462,7 +462,7 @@ jobs:
- name: Cache vcpkg dependencies
id: vcpkg-cache
if: success() && !(github.event_name == 'workflow_run' && github.event.workflow_run.name == 'Draft Tag Release')
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ steps.settings.outputs.VCPKG_BINARYCACHE_DIR }}
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ matrix.architecture }}-${{ steps.settings.outputs.WZ_VISUAL_STUDIO_INSTALL_VERSION }}-${{ hashFiles('**/get-dependencies_win.ps1') }}-${{ hashFiles('**/vcpkg.json') }}-${{ hashFiles('**/.ci/vcpkg/**') }}
Expand Down Expand Up @@ -554,7 +554,9 @@ jobs:
if: failure()
with:
name: win_${{ matrix.architecture }}_vcpkg_logs
path: '${{ github.workspace }}\build\vcpkg\buildtrees\*\*-out.log'
path: |
${{ github.workspace }}\build\vcpkg\buildtrees\*\*.log
${{ github.workspace }}\build\vcpkg\buildtrees\*\*.txt
if-no-files-found: 'warn'
retention-days: 1
- name: CMake Build (MSVC)
Expand Down
2 changes: 1 addition & 1 deletion 3rdparty/fmt
Submodule fmt updated 57 files
+1 −1 .github/dependabot.yml
+3 −3 .github/workflows/cifuzz.yml
+1 −1 .github/workflows/doc.yml
+26 −0 .github/workflows/lint.yml
+1 −1 .github/workflows/linux.yml
+1 −1 .github/workflows/macos.yml
+4 −4 .github/workflows/scorecard.yml
+2 −2 .github/workflows/windows.yml
+13 −26 .gitignore
+18 −9 CMakeLists.txt
+5,533 −0 ChangeLog.md
+0 −5,922 ChangeLog.rst
+0 −0 LICENSE
+490 −0 README.md
+0 −545 README.rst
+6 −6 doc/_static/bootstrap.min.js
+72 −65 doc/api.rst
+8 −3 doc/build.py
+11 −4 doc/syntax.rst
+38 −0 doc/usage.rst
+6 −5 include/fmt/args.h
+152 −120 include/fmt/chrono.h
+44 −33 include/fmt/color.h
+9 −8 include/fmt/compile.h
+82 −35 include/fmt/core.h
+87 −71 include/fmt/format-inl.h
+265 −240 include/fmt/format.h
+24 −20 include/fmt/os.h
+64 −28 include/fmt/ostream.h
+10 −2 include/fmt/printf.h
+18 −15 include/fmt/ranges.h
+113 −41 include/fmt/std.h
+9 −8 include/fmt/xchar.h
+1 −3 src/fmt.cc
+9 −5 src/os.cc
+1 −1 support/AndroidManifest.xml
+45 −19 support/manage.py
+0 −166 support/rst2md.py
+6 −1 test/CMakeLists.txt
+237 −241 test/chrono-test.cc
+9 −6 test/compile-test.cc
+1 −8 test/format-impl-test.cc
+464 −436 test/format-test.cc
+1 −1 test/gtest-extra-test.cc
+2 −2 test/gtest-extra.cc
+1 −1 test/gtest-extra.h
+1 −1 test/gtest/gmock-gtest-all.cc
+18 −1 test/ostream-test.cc
+4 −4 test/posix-mock.h
+2 −2 test/printf-test.cc
+67 −34 test/ranges-test.cc
+103 −31 test/scan-test.cc
+560 −138 test/scan.h
+54 −5 test/std-test.cc
+6 −2 test/util.cc
+14 −12 test/util.h
+71 −26 test/xchar-test.cc
2 changes: 1 addition & 1 deletion 3rdparty/glm
Submodule glm updated 1680 files
27 changes: 16 additions & 11 deletions cmake/FindSodium.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,26 @@

include(FindPackageHandleStandardArgs)

function(GetSodiumVersion sodium_INCLUDE_DIR)
if(sodium_INCLUDE_DIR AND EXISTS "${sodium_INCLUDE_DIR}/sodium/version.h")
file(STRINGS "${sodium_INCLUDE_DIR}/sodium/version.h" SODIUM_VERSION_STRING_LINE REGEX "^#define[ \t]+SODIUM_VERSION_STRING[ \t]+\"[.0-9]+\"$")
string(REGEX REPLACE "^#define[ \t]+SODIUM_VERSION_STRING[ \t]+\"([.0-9]+)\"$" "\\1" sodium_VERSION "${SODIUM_VERSION_STRING_LINE}")
unset(SODIUM_VERSION_STRING_LINE)
else()
if (sodium_INCLUDE_DIR)
message ( WARNING "Can't find ${sodium_INCLUDE_DIR}/sodium/version.h" )
endif()
set(sodium_VERSION "")
endif()
set(sodium_VERSION "${sodium_VERSION}" PARENT_SCOPE)
endfunction()

if (VCPKG_TOOLCHAIN)
find_package(unofficial-sodium CONFIG)
# If we found the vcpkg unofficial-sodium configuration, return with that result
if(unofficial-sodium_FOUND AND TARGET unofficial-sodium::sodium)
set(sodium_VERSION "${unofficial-sodium_VERSION}")
get_target_property(sodium_INCLUDE_DIR unofficial-sodium::sodium INTERFACE_INCLUDE_DIRECTORIES)
GetSodiumVersion("${sodium_INCLUDE_DIR}")
find_package_handle_standard_args(${CMAKE_FIND_PACKAGE_NAME} REQUIRED_VARS sodium_INCLUDE_DIR VERSION_VAR sodium_VERSION)
message(STATUS "Using vcpkg unofficial-sodium configuration (${sodium_VERSION})")
return()
Expand Down Expand Up @@ -52,16 +66,7 @@ FIND_LIBRARY(
HINTS ${PCFG_SODIUM_LIBRARY_DIRS} ${PCFG_SODIUM_LIBDIR}
)

if(sodium_INCLUDE_DIR AND EXISTS "${sodium_INCLUDE_DIR}/sodium/version.h")
file(STRINGS "${sodium_INCLUDE_DIR}/sodium/version.h" SODIUM_VERSION_STRING_LINE REGEX "^#define[ \t]+SODIUM_VERSION_STRING[ \t]+\"[.0-9]+\"$")
string(REGEX REPLACE "^#define[ \t]+SODIUM_VERSION_STRING[ \t]+\"([.0-9]+)\"$" "\\1" sodium_VERSION "${SODIUM_VERSION_STRING_LINE}")
unset(SODIUM_VERSION_STRING_LINE)
else()
if (sodium_INCLUDE_DIR)
message ( WARNING "Can't find ${sodium_INCLUDE_DIR}/sodium/version.h" )
endif()
set(sodium_VERSION "")
endif()
GetSodiumVersion("${sodium_INCLUDE_DIR}")

find_package_handle_standard_args(${CMAKE_FIND_PACKAGE_NAME} REQUIRED_VARS sodium_INCLUDE_DIR sodium_LIBRARIES VERSION_VAR sodium_VERSION)

Expand Down
14 changes: 9 additions & 5 deletions configure_mac.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ cmake_minimum_required(VERSION 3.5)
########################################################

# To ensure reproducible builds, pin to a specific vcpkg commit
set(VCPKG_COMMIT_SHA "11e79b1072c7f12d84258b77948cda3b166aac59")
set(VCPKG_COMMIT_SHA "9de2e978bdfec6bb7852cc1d6ecf375c923c485c")

# WZ minimum supported macOS deployment target (< 10.9 is untested)
set(MIN_SUPPORTED_MACOSX_DEPLOYMENT_TARGET "10.9")
Expand Down Expand Up @@ -347,22 +347,26 @@ execute_process(COMMAND ${CMAKE_COMMAND} -E echo "++ vcpkg install finished")
# 3.) CMake configure (generate Xcode project)

set(_additional_configure_arguments "")
if(DEFINED WZ_DISTRIBUTOR)
set(_additional_configure_arguments "\"-DWZ_DISTRIBUTOR:STRING=${WZ_DISTRIBUTOR}\"")
if(NOT DEFINED WZ_DISTRIBUTOR)
set(WZ_DISTRIBUTOR "UNKNOWN")
endif()
list(APPEND _additional_configure_arguments "-DCMAKE_FIND_USE_CMAKE_SYSTEM_PATH=FALSE" "-DCMAKE_FIND_USE_INSTALL_PREFIX=FALSE" "-DCMAKE_FIND_USE_PACKAGE_REGISTRY=FALSE" "-DCMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY=FALSE")
if(DEFINED ADDITIONAL_CMAKE_ARGUMENTS)
list(APPEND _additional_configure_arguments ${ADDITIONAL_CMAKE_ARGUMENTS})
endif()

execute_process(COMMAND ${CMAKE_COMMAND} -E echo "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++")
execute_process(COMMAND ${CMAKE_COMMAND} -E echo "++ Running CMake configure (to generate Xcode project)...")
string(REPLACE ";" " " _debug_output_args "${_additional_configure_arguments}")
execute_process(COMMAND ${CMAKE_COMMAND} -E echo "++ ${CMAKE_COMMAND} \"-DCMAKE_TOOLCHAIN_FILE=${CMAKE_CURRENT_SOURCE_DIR}/vcpkg/scripts/buildsystems/vcpkg.cmake\" \"-DWZ_DISTRIBUTOR:STRING=${WZ_DISTRIBUTOR}\" ${_debug_output_args} -G Xcode -B . -S \"${_repoBase}\"")
execute_process(
COMMAND ${CMAKE_COMMAND}
"-DCMAKE_TOOLCHAIN_FILE=${CMAKE_CURRENT_SOURCE_DIR}/vcpkg/scripts/buildsystems/vcpkg.cmake"
-DGLEW_USE_STATIC_LIBS=ON
"-DWZ_DISTRIBUTOR:STRING=${WZ_DISTRIBUTOR}"
${_additional_configure_arguments}
-G Xcode
"${_repoBase}"
-B .
-S "${_repoBase}"
RESULT_VARIABLE _exstatus
)

Expand Down
2 changes: 1 addition & 1 deletion get-dependencies_win.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ param([string]$VCPKG_BUILD_TYPE = "")
############################

# To ensure reproducible builds, pin to a specific vcpkg commit
$VCPKG_COMMIT_SHA = "11e79b1072c7f12d84258b77948cda3b166aac59";
$VCPKG_COMMIT_SHA = "9de2e978bdfec6bb7852cc1d6ecf375c923c485c";

# WZ Windows features (for vcpkg install)
$VCPKG_INSTALL_FEATURES = @()
Expand Down
8 changes: 7 additions & 1 deletion lib/wzmaplib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,11 @@ target_link_libraries(wzmaplib PRIVATE quickjs)
##################################
# ZipIOProvider (requires libzip)

find_package(libzip QUIET)
set(LIBZIP_FIND_ADDITIONAL_PARAMS)
if (APPLE OR WIN32)
list(APPEND LIBZIP_FIND_ADDITIONAL_PARAMS NO_SYSTEM_ENVIRONMENT_PATH)
endif()
find_package(libzip QUIET ${LIBZIP_FIND_ADDITIONAL_PARAMS})
if (libzip_FOUND)
# Test linking libzip
include(CheckCXXSourceCompiles)
Expand Down Expand Up @@ -158,6 +162,8 @@ if (libzip_FOUND)
cmake_pop_check_state()
if(libzip_LINK_TEST)
message( STATUS "Found libzip... (link test successful)" )
get_target_property(_libzip_INCLUDE_DIR libzip::zip INTERFACE_INCLUDE_DIRECTORIES)
message( STATUS "- libzip include dir: ${_libzip_INCLUDE_DIR}" )
else()
message( STATUS "Found libzip, but link test NOT successful" )
endif()
Expand Down
Loading
Loading