-
Notifications
You must be signed in to change notification settings - Fork 44
Building WindNinja for FlamMap on Windows using the MSVC compiler and gisinternals.com dependencies
This is a 64-bit build for FlamMap and avoids compiling the GUI. gisinternals.com builds GDAL and most of the dependencies needed for WindNinja. Boost is the only dependency that needs to be built from source. These instructions were tested on MSVC 2019.
Choose the proper architecture and compiler version (MSVC 2008-2019).
- Download the proper package from here.
- Unzip the package into a known place, such as
C:\src_msvc2019\x64
- The zip file will create a folder named
release-1928-x64-dev
.
Download Boost 1.75.0 from here.
The link above also includes instructions for compiling boost; see these instructions for details. Briefly:
cd
into C:\src\xx64\src_msvc2019\boost
and run the following commands.
bootstrap
b2 --prefix=C:\src_msvc2019\x64 --build-dir=C:\src_msvc2019\x64 --with-date_time --with-program_options --with-test --type=complete toolset=msvc-14.2 architecture=x86 address-model=64 --stagedir=C:\src_msvc2019\x64 install
You should now see several libboost*.lib
files in x64\lib
and a boost-1_75
folder in x64\include
that contains a boost
folder with many subfolders containing header files. Move the boost
folder with the header files out of boost-1_75
and into x64\include
. You should now have a path x64\include\boost
with subfolders containing header files.
Clone the WindNinja repo to C:\src_msvc2019\windninja
. This will clone to a folder called windninja
. Create another folder at the same level as the cloned repo called build64
. This is where we will build WindNinja. You now have a path called C:\src_msvc2019\windninja\windninja
and a path called C:\src_msvc2019\windninja\build64
.
cd
into the WindNinja source tree and checkout the msvc2019 branch:
git checkout msvc2019
cd
into \build64
and run:
cmake-gui ..\windninja
- Click
Configure
. - Choose
NMake Makefiles
as the generator. - Add a new entry called
BOOST_ROOT=C:/src/x64
and clickConfigure
again. This should set all the other boost paths correctly. - Click
Configure
. - Check
USE_GIS_INTERNALS
. - Click
Configure
. - The variable
GIS_INTERNALS_HOME
will appear. Set it toC:/src_msvc2019/x64/release-1928-x64-dev/release-1928-x64-dev
. - Click
Configure
. There will still be errors. - Set the following values:
- NINJA/NINJA_CLI = checked
- NINJA/NINJA_QTGUI = unchecked
- WITH/WITH_LCP_CLIENT = checked
- WITH/WITH_NOMADS_SUPPORT = checked
- Ungrouped Entries/ENABLE_GMTED = checked
- Ungrouped Entries/STABILITY = checked
- BUILD/BUILD_TESTING = unchecked
- Click
Configure
- Click
Generate
- Run
nmake
in the console