Skip to content

Latest commit

 

History

History
182 lines (114 loc) · 8.4 KB

File metadata and controls

182 lines (114 loc) · 8.4 KB

Setting up and Compiling TUM Open Infra Platform

Guide on how to compile the project TUM Open Infra Platform (OIP) from scratch.

NOTE: Additional information about known errors and warnings is provided in FAQ.

NOTE 2: Although the system is set up to function cross-platform (CMake), we are currently only developing actively for Windows platform. No guarantees for Linux (although it should theoretically function).

Content

  1. Prerequisites
  2. Preparing VS solution
  3. Building the Open Infra Platform in Visual Studio

Prerequisites

These steps need to be completed before you can proceed even to think to compile OIP.

NOTE: The OIP only works with the versions listed (see tested versions for further combinations).

Development environment

You will need to install:

  1. Visual Studio 2019 - find here.
  2. CMake 3.20.5 - find here.
  3. git - find here.

Download source code

Fork & clone Open-Infra-Platform repository.

NOTE: for detailed instructions consult our Git Guidelines.

Third-party libraries

  1. Qt 5.15.1 - find here.
  • Download Qt Online Installer
  • While your computer is downloading Qt installer, create Qt account.
  • Sign in with your new account to Qt installer and select directory, where Qt will be installed (C:\Qt should be default option).

NOTE: OIP expects Qt at C:\Qt, which is the default option. If you deviate from this, please set the OIP_QT_DIR variable correspondingly.

  • Choose Custom installation

  • (recommended) Deselect Associate common file types with Qt creator

  • Select components to install:

    • Check the Archive and Latest releases box
    • Click Filter
    • Open section Qt 5.15.1
    • Mandatory: Select MSVC 2019 64-bit
    • Mandatory: Select MinGW 8.1.0 64-bit

NOTE: There are components, which Qt Online Installer selects as default options. You can uncheck these components for saving computer memory.

  1. Boost 1_75_0 - vs2019

    • Create a folder C:\thirdparty and install Boost 1_75_0 to C:\thirdparty\vs2019\x64\boost_1_75_0.

NOTE: OIP expects boost at the path specified above. If you deviate from this, please set the OIP_Boost_DIR variable correspondingly.

* Add this path to the environment variables. (Create new environment variable called `Boost_INCLUDE_DIR`. This variable should point to the binary folder, where **Boost 1_75_0** is staged (e.g. `C:\thirdparty\vs2019\x64\boost_1_75_0`).
  1. Anaconda 2 (version with Python 2.7) - find here.

  2. PROJ

    • Download OSGeo4W Installer using the OSGeo4W Network Installer link - find here.
    • In installer, select Advanced Install.
    • Choose to install from Internet.
    • Select directory, where PROJ will be installed.

NOTE: OIP expects PROJ at C:\OSGeo4W, which is the default option. If you deviate from this, please set the OIP_PROJ_DIR variable correspondingly.

  • Select local package directory (e.g. C:\OSGeo4W\local).

  • Select https://download.osgeo.org/ as a download site.

  • Select components to install:

    • Open Libs
    • Find proj-devel package
    • Click on skip to refresh the line and select version 8.2.0-2.
    • Select binary (Bin) package (the left column).

  1. Doxygen & DOT
    • Download & install Doxygen - find here.
      • Default search path is C:/thirdparty/doxygen/bin
      • If deviating, please set the DOXYGEN_EXECUTABLE variable correspondingly
    • Download & install DOT - find here
      • Default search path is C:/thirdparty/graphviz_dot
      • If deviating, please set the DOXYGEN_DOT_EXECUTABLE variable correspondingly

Preparing VS solution

  1. Launch CMake.
  2. In the line Where is the source code: input the path to your clone's source folder (e.g. C:\dev\Open-Infra-Platform).
  3. In the line Where to build the binaries: input the path to the binaries folder (e.g. C:\dev\build\Open-Infra-Platform).

NOTE: The source folder as well as Program Files and Windows folders are invalid locations for the binary folder.

  1. Check the Grouped and Advanced boxes (top right in CMake GUI).
  2. Click Configure.
  3. Select the Generator:
    • Select Visual Studio 16 2019 Win64.
    • Select x64
    • Write host=x64 as optional toolset.

  1. For detailed descriptions of all configuration options that can be selected in the CMake GUI, consult CMake options documentation.

NOTE: Plenty of red warnings in the log panel are fine.

  1. After configuration process has successfully finished, click Generate.
  2. After generation process is done click Open Project. It will open the solution in Visual Studio.

Building the Open Infra Platform in Visual Studio

First Time

When compiling OIP for the first time, these projects should first be built.

  • In the project browser open OpenInfraPlatform project folder. In the folder Commands build OpenInfraPlatform.Commands.UpdateBoostMpl.

  • Build all projects within the Copy project folder.

NOTE: This only needs to happen when compiling for the first time, or after a deletion of the binaries folder.

Generating IFC early binding libraries

NOTE: If you are using Open Infra Platform only with point clouds, you can skip these steps.

  1. Find the folder ExpressBindingGenerator. Build project OpenInfraPlatform.ExpressBindingGenerator.

  2. In the folder ExpressBindingGenerator find the folder Commands. There you should build project Commands.GenerateEarlyBinding.IFC? where ? stands for the chosen IFC version.

NOTE: By default settings, this will build Commands.GenerateEarlyBinding.IFC4X3_RC1. If you want to change the schema to another, you need to select the corresponding option in CMake and generate in CMake again.

NOTE: To generate faster, make sure you have compiled OpenInfraPlatform.ExpressBindingGenerator with Release configuration.

  1. Important: Now open CMake and select Generate to include newly generated IFC early binding code in the solution.

  2. Find the folder EarlyBinding. Build project OpenInfraPlatform.IFC?.

NOTE: This step may take quite some time.

Compiling user interface

NOTE: Build dependencies are set through CMake, so building only the last step should automatically build all.

  1. Build project OpenInfraPlatform.Base.
  2. If you are using point clouds build project OpenInfraPlatform.PointCloudProcessing.
  3. Build project OpenInfraPlatform.Core.
  4. Build project OpenInfraPlatform.Rendering.
  5. Build project OpenInfraPlatform.UI.

Generating documentation

Build the project OpenInfraPlatform.GenerateDocumentation within Commands folder in the solution.

NOTE: This step may take quite some time.

Read more about Doxygen in our guidelines.

Please consult our CMake options documentation for different options available for customizing the doxygeneration.