These main steps are based on Visual Studio 2022, and the overall workflow is to generate first a .sln project from cmake command line and then open and build the project under VS 2022. These steps were tested on Windows 10.
- Download and install git if not already present.
- Download cmake
- During the installation select the installation be sure to select the option to have it the system path:
-
Get ZLib source: http://zlib.net/zlib1213.zip (copy past link in new windows since the url is not in https) or here.
-
Unzip the library in the directory of your choice.
-
Open PowerShell.
-
Go to the directory from the unziped library.
-
Do a classical:
mkdir build; cd build; cmake..
-
The previous command should have generated the VS project zlib.sln that you can open.
-
Generate the solution and locate from the log the location of the dll library path:
-
Copy the file zconf.h located in zlib1213\zlib-1.2.13\build into the source directory: zlib1213\zlib-1.2.13
- Download boost for instance from here: https://boostorg.jfrog.io/artifactory/main/release/1.80.0/source/boost_1_80_0.zip
- Move it on C:\Program Files\ to make easier the detection from cmake.
- Uncompress it (be patient around 10 minutes to uncompress it).
- Clic on
C:\Program Files\boost_1_80_0\bootstrap.bat
- Clone the DGtal project:
git clone https://github.com/DGtal-team/DGtal.git
- Go to the DGtal dir and make the classical:
cd DGtal; mkdir build; cd build;
- Then from the path of the previous steps:
cmake .. -DZLIB_LIBRARY="C:\yourChosenPath\zlib1213\zlib-1.2.13\build\Debug\" -DZLIB_INCLUDE_DIR="C:\yourChosenPath\zlib1213\zlib-1.2.13
This command will generate the VS DGtal project DGtal.sln