Skip to content

Standardize desktop GLFW/GLEW on vcpkg; fix CMake FetchContent warnings - #258

Merged
trailcode merged 4 commits into
mainfrom
Trailcode/cmake-work
Sep 6, 2026
Merged

Standardize desktop GLFW/GLEW on vcpkg; fix CMake FetchContent warnings#258
trailcode merged 4 commits into
mainfrom
Trailcode/cmake-work

Conversation

@trailcode

@trailcode trailcode commented Sep 6, 2026

Copy link
Copy Markdown
Owner

Summary

  • Standardize desktop MSVC GLFW/GLEW on vcpkg (vcpkg.json + toolchain); remove NuGet and thirdParty/ path glue so local matches CI.
  • Silence CMake 4.x FetchContent / policy warnings (CMP0135, MakeAvailable(lua), pybind11 policy floor, googletest v1.15.2).
  • Link glfw/GLEW PUBLIC on EzyCad_lib so ImGui backends resolve GLFW/glfw3.h.

Closes #257

Test plan

  • Configure with -DCMAKE_TOOLCHAIN_FILE=%VCPKG_ROOT%/scripts/buildsystems/vcpkg.cmake + OCCT 8 paths (match generator to IDE: VS 17 or 18).
  • Confirm configure without vcpkg toolchain fails clearly on MSVC.
  • Build EzyCad_lib / EzyCad (RelWithDebInfo); run briefly.
  • Confirm glfw3.dll / glew32.dll staged next to the exe.
  • CI windows-msvc.yml green (already vcpkg-based).
  • WASM path still independent of desktop GLFW/GLEW packages.

Note

Medium Risk
Build and runtime dependency acquisition for all Windows desktop developers changes (vcpkg required); misconfigured local setups will fail configure until the toolchain is set correctly.

Overview
Desktop MSVC builds now get GLFW and GLEW only through the repo vcpkg.json manifest and -DCMAKE_TOOLCHAIN_FILE=.../vcpkg.cmake, matching CI. The NuGet install/link/copy glue under thirdParty/ is removed; configure fails with a clear message if MSVC is used without vcpkg.

CMake finds glfw/GLEW via vcpkg CONFIG packages (with MODULE fallback on non-MSVC), links them PUBLIC on EzyCad_lib so ImGui GLFW/OpenGL backends compile, and stages glfw3.dll / glew32.dll (and debug glew32d.dll) from vcpkg install roots into Release/Debug output dirs. Test targets no longer duplicate GLFW links. FetchContent tweaks: CMP0135, policy floor for pybind11 on CMake 3.31+, FetchContent_MakeAvailable(lua) instead of Populate, googletest bumped to v1.15.2. .gitignore adds /vcpkg_installed.

Docs (README, local-dev, building-occt, third_party/README, CHANGELOG) now describe vcpkg prerequisites instead of NuGet; OCCT still comes from prebuilts, not vcpkg.

Reviewed by Cursor Bugbot for commit 8f789ae. Bugbot is set up for automated code reviews on this repo. Configure here.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit e908335. Configure here.

Comment thread CMakeLists.txt Outdated
@trailcode
trailcode merged commit 423bdf2 into main Sep 6, 2026
4 checks passed
@trailcode
trailcode deleted the Trailcode/cmake-work branch September 6, 2026 23:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Standardize desktop GLFW/GLEW on vcpkg; silence CMake 4.x FetchContent warnings

1 participant