Repository navigation
Add a portable multi-platform Visual Studio solution - #240
Conversation
|
The generation commands are now documented in the README. Run these on Windows with CMake 4.2+ and Visual Studio 2026, with the matching C++ architecture toolsets installed. One solution with all platforms in the dropdown cmake --preset vs2026-all
cmake --build build-vs2026-all --config Release --target FreeImageAllPlatformsOpen 32-bit x86 only cmake --preset vs2026 -A Win32 -B build-vs2026-win32
cmake --build build-vs2026-win32 --config ReleaseOpen ARM64 only cmake --preset vs2026 -A ARM64 -B build-vs2026-arm64
cmake --build build-vs2026-arm64 --config ReleaseOpen ARM64EC only cmake --preset vs2026 -A ARM64EC -B build-vs2026-arm64ec
cmake --build build-vs2026-arm64ec --config Release64-bit x86 only cmake --preset vs2026 -A x64 -B build-vs2026-x64
cmake --build build-vs2026-x64 --config ReleaseEach single-architecture directory contains its own Validation: VS 2022 and VS 2026 platform/relocation tests passed, and the full VS 2026 CMake all-platform target built FreeImage for all four architectures, verified library machine types, and passed x64/Win32 TestAPI suites. VS 2019 scope: the combined frontend in this PR currently supports VS 2022 and VS 2026. VS 2019 is not enabled or validated for this mode. A v142 variant could support Win32, x64 and ARM64; ARM64EC requires VS 2022 17.3 or later. |
|
@danoli3 According to this document https://github.com/danoli3/FreeImage/blob/master/doc/visual-studio.md I should be able to get all the projects in a single solution by performing the steps below.
|
|
@danoli3 |

Visual Studio users currently need separate CMake solutions for each architecture, and those generated build trees contain location-specific paths. Add
vs2022-allandvs2026-allpresets that generatevisualstudio/FreeImage.slnwith Win32, x64, ARM64, ARM64EC and All Platforms selections.The solution uses Visual Studio Makefile projects to run the authoritative CMake build with the selected architecture. Static/DLL and codec feature settings are copied to each build. Source/include references use relative paths and MSBuild directory macros; moving the whole tree creates fresh internal architecture caches automatically. Build, rebuild and clean use separate architecture/configuration output directories.
This is an optional CMake-backed IDE front end. It requires CMake on PATH and the matching Visual Studio C++ toolsets. It supports bundled dependencies/native MSVC; external SDK toolchains and system libraries still need their own architecture configurations. The README documents the commands and scope.
Validation:
Addresses #235 and #238.