From d4a4e1a826acd0d5afe4dbb581716f9a28744cba Mon Sep 17 00:00:00 2001 From: Varun Agrawal Date: Mon, 4 Jan 2021 12:41:11 -0500 Subject: [PATCH 1/2] documentation for compiling on windows --- INSTALL.md | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index 3dbc3a850c..d570e6daaf 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -70,7 +70,34 @@ execute commands as follows for an out-of-source build: This will build the library and unit tests, run all of the unit tests, and then install the library itself. -## CMake Configuration Options and Details +# Windows Installation + +This section details how to build and install GTSAM using Visual Studio. + +### Prerequisites + +- Visual Studio with C++ CMake tools for Windows +- Python >= 3.6 (we prefer Anaconda) + +### Steps + +1. Open Visual Studio. +2. Select `Open a local folder` and select the GTSAM source directory. +3. Go to `Project -> CMake Settings`. + - (Optional) Set `Configuration name`. + - (Optional) Set `Configuration type`. + - Set the `Toolset` to `msvc_x64_x64`. If you know what toolset you require, then skip this step. + - Update the `Build root` to `${projectDir}\build\${name}`. + - You can optionally create a new configuration for a `Release` build. + - Set the necessary CMake variables for your use case. + - Click on `Show advanved settings`. + - For `CMake generator`, select a version which matches `Visual Studio Win64`, e.g. `Visual Studio 16 2019 Win64`. + - Save. +4. Click on `Project -> Generate Cache`. This will generate the CMake build files (as seen in the Output window). +5. The last step will generate a `GTSAM.sln` file in the `build` directory. At this point, GTSAM can be used as a regular Visual Studio project. + + +# CMake Configuration Options and Details GTSAM has a number of options that can be configured, which is best done with one of the following: @@ -78,7 +105,7 @@ one of the following: - ccmake the curses GUI for cmake - cmake-gui a real GUI for cmake -### Important Options: +## Important Options: #### CMAKE_BUILD_TYPE We support several build configurations for GTSAM (case insensitive) From b14b3b75e253b2685bda5e025c66c3d3b9b56628 Mon Sep 17 00:00:00 2001 From: Varun Agrawal Date: Mon, 4 Jan 2021 12:45:05 -0500 Subject: [PATCH 2/2] improvements to windows doc --- INSTALL.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index d570e6daaf..1fddf4df01 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -72,12 +72,12 @@ execute commands as follows for an out-of-source build: # Windows Installation -This section details how to build and install GTSAM using Visual Studio. +This section details how to build a GTSAM `.sln` file using Visual Studio. ### Prerequisites - Visual Studio with C++ CMake tools for Windows -- Python >= 3.6 (we prefer Anaconda) +- All the other pre-requisites listed above. ### Steps @@ -90,9 +90,9 @@ This section details how to build and install GTSAM using Visual Studio. - Update the `Build root` to `${projectDir}\build\${name}`. - You can optionally create a new configuration for a `Release` build. - Set the necessary CMake variables for your use case. - - Click on `Show advanved settings`. + - Click on `Show advanced settings`. - For `CMake generator`, select a version which matches `Visual Studio Win64`, e.g. `Visual Studio 16 2019 Win64`. - - Save. + - Save the settings (Ctrl + S). 4. Click on `Project -> Generate Cache`. This will generate the CMake build files (as seen in the Output window). 5. The last step will generate a `GTSAM.sln` file in the `build` directory. At this point, GTSAM can be used as a regular Visual Studio project.