diff --git a/win/build-deps.py b/win/build-deps.py index b47ec4556b..5694887fbf 100644 --- a/win/build-deps.py +++ b/win/build-deps.py @@ -377,7 +377,7 @@ def main() -> None: install_occt(vs_cfg_vars, ARGS.build_type, build_deps_cache, ARGS.build_cfg, MSBUILD_MULTIPROC) pythonhome = install_python(vs_cfg_vars, ARGS.install_python, ARGS.python_version, build_deps_cache, nuget_exe) install_swig(vs_cfg_vars, ARGS.build_type, build_deps_cache, MSBUILD_MULTIPROC) - install_cgal(vs_cfg_vars, ARGS.build_type, ARGS.build_cfg, MSBUILD_MULTIPROC) + install_cgal(vs_cfg_vars, ARGS.build_type, build_deps_cache, ARGS.build_cfg, MSBUILD_MULTIPROC) install_eigen(vs_cfg_vars) install_zstd(vs_cfg_vars, ARGS.build_type, ARGS.build_cfg, MSBUILD_MULTIPROC) install_rocksdb(vs_cfg_vars, ARGS.build_type, ARGS.build_cfg, MSBUILD_MULTIPROC) diff --git a/win/installers.py b/win/installers.py index e93d38be75..0940cc98ac 100644 --- a/win/installers.py +++ b/win/installers.py @@ -1036,6 +1036,7 @@ def install_swig( def install_cgal( vs_cfg_vars: VsCfgResult, build_type: BuildType, + build_deps_cache: BuildDepsCache, build_cfg: BuildCfg, msbuild_multiproc: tuple[str, ...], ) -> None: @@ -1043,11 +1044,15 @@ def install_cgal( install_dir = vs_cfg_vars.install_dir # TODO: bump to v5.6.3 to match nix/build-all.py. - # TODO: add CGAL_VERSION to the install path during the next version bump. CGAL_VERSION = "5.5.5" DEPENDENCY_NAME = "cgal" dependency_dir = deps_dir / "cgal" - dependency_install_dir = install_dir / "cgal" + # The version is part of the install path: the CI dependency cache is keyed on the + # directory name and only ever adds to it, so the unversioned `cgal` directory kept + # serving CGAL 5.2.3 after the minimum was raised to 5.4. + dependency_install_dir = install_dir / f"cgal-{CGAL_VERSION}" + + build_deps_cache.add_entry("CGAL_INSTALL_DIR", str(dependency_install_dir)) if is_already_installed(dependency_install_dir): return diff --git a/win/run-cmake.py b/win/run-cmake.py index f50524aa98..9d296b1d99 100644 --- a/win/run-cmake.py +++ b/win/run-cmake.py @@ -68,7 +68,7 @@ class Deps: # We don't install Eigen currently, # so there's no Eigen3config.cmake and therefore we provide path explicitly. "eigen": Dep("EIGEN_DIR", Path("Eigen"), cmake_prefix=False, pass_as_cmake_arg=True), - "cgal": Dep("CGAL_INSTALL_DIR", Path("cgal")), + "cgal": Dep("CGAL_INSTALL_DIR", None), "gmp": Dep("GMP_INSTALL_DIR", Path("mpir")), "mpfr": Dep("MPFR_INSTALL_DIR", Path("mpfr")), # CCACHE_INSTALL_DIR is only set when ccache wasn't found on PATH.