TerraLib and TerraView Wiki Page

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
wiki:documentation:devguide:build [2018/08/23 18:20]
marisa
wiki:documentation:devguide:build [2020/10/22 23:45]
marisa [Building on Linux Ubuntu 18.04 with GNU G++]
Line 7: Line 7:
 The //​**build/​cmake**//​ folder (under the source tree) contains a CMake project for building TerraLib. The //​**build/​cmake**//​ folder (under the source tree) contains a CMake project for building TerraLib.
  
-Until now, TerraLib build has been tested on: +TerraLib ​5.5 build has been tested on: 
-  * Linux Ubuntu ​14.04 and 16.04 +  * Linux Ubuntu ​18.04 
-  * Mac OS X Yosemite, El Capitan and Sierra+  * Mac OS X Sierra
   * Microsoft Windows 10   * Microsoft Windows 10
  
Line 18: Line 18:
 ===== Building on Microsoft Windows with Microsoft Visual C++ 2017 ===== ===== Building on Microsoft Windows with Microsoft Visual C++ 2017 =====
  
-**1.** Microsoft Visual Studio 2017 C++ users can download and unpack the suitable third-party libraries compiled for building 64-bit version of TerraLib with Qt5.10.support. Choose the right version specified by ''​x.y.z''​ at terralib-x.y.z-3rdparty-msvc-2017-win64:​+**1.** Microsoft Visual Studio 2017 C++ users can download and unpack the suitable third-party libraries compiled for building 64-bit version of TerraLib with Qt5.12.support. Choose the right version specified by ''​x.y.z''​ at terralib-x.y.z-3rdparty-msvc-2017-win64:​
  
   *[[http://​www.dpi.inpe.br/​terralib5/​terralib5-3rdparty/​|Choose the right version specified by x.y.z]]   *[[http://​www.dpi.inpe.br/​terralib5/​terralib5-3rdparty/​|Choose the right version specified by x.y.z]]
Line 50: Line 50:
  
   * Click in "Add entry":​   * Click in "Add entry":​
-    * Add new variable named **CMAKE_PREFIX_PATH**,​ select type as **PATH** and fill its value with the following dependencies paths separated by semicolon (;)+    * Add new variable named **CMAKE_PREFIX_PATH**((as a example c:​\terralib5\3rdparty;​c:​\terralib5\3rdparty/​lib/​cmake/​terralib-4.2.2;​C:​\Qt\5.12.3\msvc2017_64\lib\cmake\Qt5;​c:​\terralib5\3rdparty\lib\cmake\wtss_cxx-0.4.0;​c:​\Python366)), select type as **PATH** and fill its value with the following dependencies paths separated by semicolon (;)
  
 ^Dependencies^PATH^ ^Dependencies^PATH^
Line 56: Line 56:
 |Qt         | ''​c:​\<​Qt5 path>​\lib\cmake''​ (or something similar)((This is the folder where the dir **Qt5** containing the **Qt5Config.cmake** file can be find))| |Qt         | ''​c:​\<​Qt5 path>​\lib\cmake''​ (or something similar)((This is the folder where the dir **Qt5** containing the **Qt5Config.cmake** file can be find))|
 |Terralib4 | ''​c:​\terralib5\3rdparty\lib\cmake\terralib-4.2.2''​| |Terralib4 | ''​c:​\terralib5\3rdparty\lib\cmake\terralib-4.2.2''​|
-|Swig      ​| ''​c:​\terralib5\3rdparty\swig''​|+|swig | ''​c:​\terralib5\3rdparty\swig''​|
 |Python ​   | ''​c:​\Python366''​| |Python ​   | ''​c:​\Python366''​|
  
   * Click in "​Configure"​ button.   * Click in "​Configure"​ button.
     * Select option "​Visual Studio 15 2017 Win64"     * Select option "​Visual Studio 15 2017 Win64"
-    * If the output folder does not exist, CMake GUI will prompt you for creating it: just confirm the creation.+    * If the output folder ​(c:​\terralib5\build) ​does not exist, CMake GUI will prompt you for creating it: just confirm the creation.
  
   * if no problem occurs, set the following variables:   * if no problem occurs, set the following variables:
-    * CPACK => See the CPACK entries and keep ON onlythe NSIS package generator (used in release). All other kind of packages must be disabled. 
-    * TERRALIB entry => See the TERRALIB entries and set 
-      * TERRALIB_BUILD_AS_BUNDLE => ON 
-      * TERRALIB_BUILD_AS_DEV => ON 
-      * TERRALIB_MOD_VM_ENABLED => ON  -> it will enable TERRALIB_MOD_VM_PYTHON_ENABLED and TERRALIB_MOD_VM_LUA_ENABLED 
-      * TERRALIB_TRACK_3RDPARTY_DEPENDENCIES => ON 
-      * TERRALIB_QHELP_ENABLED => ON 
-      * TERRALIB_QTRANSLATION_ENABLED => ON 
  
-    *  Some projects may be disabled through the following variables:​ +^Entry^Variable^Value^ 
-    ​* ​TERRALIB_DOXYGEN_ENABLED ​=> OFF  ​=> ​if you want to distribute the API documentation this should be turn to on. But keep in mind that this option may take a considerable time, so you should do this only for final releases. +|CPACK| CPACK_BINARY_NSYS| ON ((package generator (used in release)-disable the others))| 
-    ​* ​TERRALIB_BUILD_EXAMPLES_ENABLED ​=> OFF +|TERRALIB| TERRALIB_BUILD_AS_BUNDLE| ON| 
-    ​* ​TERRALIB_BUILD_UNITTEST_ENABLED ​=> OFF +|TERRALIB| TERRALIB_BUILD_AS_DEV| ON| 
-   ​+|TERRALIB| TERRALIB_TRACK_3RDPARTY_DEPENDENCIES| ON| 
 +|TERRALIB| TERRALIB_QHELP_ENABLED| ON| 
 +|TERRALIB| TERRALIB_QTRANSLATION_ENABLED| ON| 
 +|TERRALIB| TERRALIB_MOD_VM_ENABLED| ON ((it enable TERRALIB_MOD_VM_PYTHON_ENABLED,​TERRALIB_MOD_VM_LUA_ENABLED))| 
 + 
 +  Some projects may be disabled through the following variables:​ 
 + 
 +|TERRALIB| ​TERRALIB_DOXYGEN_ENABLED ​OFF((if you want to distribute the API documentation this should be turn to on. But keep in mind that this option may take a considerable time, so you should do this only for final releases))| 
 +|TERRALIB| ​TERRALIB_BUILD_EXAMPLES_ENABLED ​OFF| 
 +|TERRALIB| ​TERRALIB_BUILD_UNITTEST_ENABLED ​OFF| 
   * Press ''​Configure''​ again.   * Press ''​Configure''​ again.
 +  * Some entries might not be filled automatically by cmake, so do it manually. Examples of entries not filled are:
  
-  * Check if all BOOST_PYTHON entries and fill the path if CMAKE did not fount automatically:​ +|Boost| Boost_PYTHON_LIBRARY_RELEASE |''​c:​\terralib5\3rdparty\lib/​boost_python3-mt.lib''​| 
-    * Boost_PYTHON_RELEASE => ''​c:​\terralib5\3rdparty\lib/​boost_python3-mt.lib +|Boost| Boost_PYTHON_LIBRARY_DEBUG |''​c:​\terralib5\3rdparty\lib/​boost_python3-mt-gd.lib''​| 
-    * Boost_PYTHON_DEBUG =>   ''​c:​\terralib5\3rdparty\lib/​boost_python3-mt-gd.lib +|Qscintilla| Qscintilla_LIBRARY_RELEASE |''​c:​\terralib5\3rdparty\lib/​qscintilla2.lib''​|
-     +
-  * Press "​Generate":​ this will generate a solution file for Visual Studio 2017 under the folder ​''​c:​\terralib5\build'' ​((The location set in "Where to build the binaries"​)).+
  
-**5.** ​Open the solution file located ​at:+  * Press ''​Configure''​ again. ​    
 +  * Press ''​Generate'':​ this will generate a solution file for Visual Studio 2017 under the folder ''​c:​\terralib5\build\terralib.sln''​ ((The location set in "Where to build the binaries"​)). 
 +  * Press ''​Open Project''​ to open Visual Studio 2017 
 + 
 +**5.** ​Inside Visual Studio right click over the project ALL_BUILD and build. Before running, set it as ''​StartUp''​ Project and set the local environment of terraview project ((terraview->​Properties->​Configuration Properties->​ Debugging, set the Environment entry as ''​PATH=c:​\terralib5\3rdparty\lib;​c:​\<​Qt5 path>​\bin''​)). 
 + 
 +**6.** If TERRALIB_BUILD_EXAMPLES_ENABLED => ON or TERRALIB_BUILD_EXAMPLES_ENABLED => ON: to run and debug one of the terralib_example_* or terralib_unitest_*,​ set it as ''​StartUp''​ Project and make sure the data ([[http://​www.dpi.inpe.br/​terralib5-devel/​data/​data.zip| data.zip]]) used by these examples/​unittest are uncompressed ​at the default directory specified by TERRALIB_DATA_DIR :    
 +   ​TERRALIB_DATA_DIR ​  ​C:​\terralib\build-win64\data 
 +    
 +===== Adding Plugin TerraPrint as part of TerraView/​TerraLib ===== 
 + 
 +==== Building Plugin TerraPrint with Visual C++ 2017 ==== 
 + 
 +TerraPrint is a plugin originally developed externally and its source code is maintained in a separated directory structure. As it depends on TerraLib, firstly it is necessary to built TerraPrint according with the instructions below: 
 + 
 +  *Make a new folder to host TerraPrint source code: 
 +<code bash> 
 +$ mkdir C:/TPrint 
 +$cd TPrint 
 +</​code>​ 
 + 
 +  * Make a local copy of TerraPrint repository and go to the right branch: 
 +<code bash> 
 +$ GIT_SSL_NO_VERIFY=true git clone -b release-1.4 https://​gitlab.dpi.inpe.br/​terralib/​terraprint.git . 
 +$ git pull 
 +</​code>​ 
 + 
 +  *Open the CMake GUI: 
 +  * Set the "Where is the source code" edit text to:
 <​code>​ <​code>​
-c:\terralib5\build\terralib.sln or press ''​Open Project''​+   C:/TPrint/build/cmake
 </​code>​ </​code>​
  
-**6.** Build ALL_BUILD ((Inside Visual Studio, right click over the project ALL_BUILD and build)), and before running, set it as ''​StartUp''​ Project and set the local environment of terraview project ((terraview->Properties->​Configuration Properties->​ Debugging, set the Environment entry as ''​PATH=c:​\terralib5\3rdparty\lib;​c:\<Qt5 path>\bin''​)).+  ​Set the "Where to build the binaries"​ edit text to: 
 +<code> 
 +   C:/​TPrint_build 
 +</code>
  
-**7.** If TERRALIB_BUILD_EXAMPLES_ENABLED => ON or TERRALIB_BUILD_EXAMPLES_ENABLED => ONto run and debug one of the terralib_example_* ​or terralib_unitest_*, set it as ''​StartUp'' ​Project and make sure the data ([[http://www.dpi.inpe.br/terralib5-devel/data/data.zip| data.zip]]) used by these examples/unittest are uncompressed at the default directory specified by TERRALIB_DATA_DIR ​  ​ +  ​Mark the "​Grouped"​ and "​Advanced"​ check box. 
-   TERRALIB_DATA_DIR ​  C:\terralib\build-win64\data+ 
 +  ​Click in "Add entry":​ 
 +    ​Add new variable named **CMAKE_PREFIX_PATH**((as a example c:\terralib5\3rdparty;​c:​\terralib5\3rdparty/​lib/​cmake/​terralib-4.2.2;​C:​\Qt\5.12.3\msvc2017_64\lib\cmake\Qt5;​C:​\Qt\5.12.3\msvc2017_64\lib\cmake\Qt5LinguistTools)),​ select type as **PATH** ​and fill its value with the following dependencies paths separated by semicolon (;) 
 + 
 +^Dependencies^PATH^ 
 +|third-party| ''​c:​\terralib5\3rdparty''​| 
 +|Terralib4 | ''​c:​\terralib5\3rdparty\lib\cmake\terralib-4.2.2''​| 
 +|Qt         | ''​C:​\Qt\5.12.3\msvc2017_64\lib\cmake\Qt5;''​ (or something similar)((This is the folder where the dir **Qt5** containing the **Qt5Config.cmake** file can be find))| 
 +|Qt| ''​C:​\Qt\5.12.3\msvc2017_64\lib\cmake\Qt5LinguistTools''​|  
 + 
 +  * Click in "​Configure"​ button. 
 +    * Select option "​Visual Studio 15 2017 Win64"​ 
 +    * If the output folder (C:/​TPrint_build) does not exist, CMake GUI will prompt you for creating it: just confirm the creation. 
 + 
 +  * if no problem occurs, set the following variables:​ 
 + 
 +^Entry^Variable^Value^ 
 +|CPACK| CPACK_BINARY_NSYS| ON ((package generator (used in release)-disable the others))| 
 +|TERRALIB| TERRALIB_BUILD_AS_BUNDLE| OFF| 
 +|TERRALIB| TERRALIB_BUILD_EXAMPLES_ENABLED| OFF| 
 +|TERRALIB| TERRALIB_BUILD_LAYOUT_TEST_ENABLED| OFF| 
 +|TERRALIB| TERRALIB_MOD_LAYOUT_ENABLED |ON| 
 +|TERRALIB| TERRALIB_MOD_QT_PLUGINS_ENABLED |ON| 
 +|TERRALIB| TERRALIB_TRACK_3RDPARTY_DEPENDENCIES| ON| 
 +|TERRALIB_DIR_VAR_NAME|<​remove ​it because you will use your build version specified in terralib_DIR>​| 
 + 
 +  * Press ''​Configure'' ​again. 
 +  * Some entries might be filled automatically by cmake with the wrong values.  
 +  Check under ''​Ungrouged Entries''​ which terralib is set ((in my case an old one were set C:/Program Files/terralib5.2.2/lib/cmake/terralib-5.2.2)): 
 +and set the one you just built before: 
 + 
 +|terralib_DIR|''​c:​\terralib5\build''​ |building dir used by terralib/terraview| 
 + 
 +  * Press ''​Configure''​ again. ​    
 +  * Press ''​Generate'':​ this will generate a solution file for Visual Studio 2017 under the folder ''​C:/​TPrint_build''​ ((The location set in "Where to build the binaries"​)). 
 +  * Press ''​Open Project''​ to open Visual C++ interface using ''​C:/​TPrint_build\terralib_layout.sln''​ ((or Open the solution file located at ''​C:/​TPrint_build\terralib_layout.sln'' ​TerraPrint is internally defined by terralib_layout_DIR)) 
 + 
 +  * On Visual Studio C++ 2017 interface, build ''​ALL_BUILD''​ on ''​debug''​ version first (some problems must be solved here) and afterwards the ''​release''​ version. 
 +  * Close Visual Studio ​  
 + 
 +  * Go back to **Terralib/​TerraView** CMAKE and set the path to the plugin just built: 
 + 
 + 
 +|terralib_layout_DIR| ''​C:/​TPrint_build''​| informe where is Directory containing a CMake configuration file for TerraPrint| 
 + 
 +  * Press ''​Configure''​ and ''​Generate''​ to generate the solution including the plugin as part of package. 
 +  * Press ''​Open Project''​ to open Visual C++ 
 + 
 +  * On Visual Studio C++ 2017 interface, build ''​ALL_BUILD''​ to build TerraView with TerraPrint as its plugin 
 +  * Rebuild the project called PACKAGE to generate the TerraView installer with TerraPrint plugin. 
 + 
 +  * Install the  c:​\terralib5\_CPack_Packages\win64\NSIS\TerraView-5.5.0-win64.exe to check the TerraPrint plugin ((Plugins|Manage Plugins...|TerraPrint))
  
-===== Building on Linux Ubuntu ​14.04 and 16.04 with GNU G++ =====+===== Building on Linux Ubuntu ​18.04 with GNU G++ =====
  
 **1.** Open a Command Prompt (Shell). **1.** Open a Command Prompt (Shell).
Line 107: Line 190:
 **3.** Create a folder out of the TerraLib source tree to generate the build system, for example: **3.** Create a folder out of the TerraLib source tree to generate the build system, for example:
 <code bash> <code bash>
-$ cd /​home/​user/​mydevel/​terralib +$cd /​home/​user/​mydevel/​terralib 
-$ mkdir build-release +$mkdir build-release 
-$ cd build-release+$cd build-release
 </​code>​ </​code>​
  
-**Note:** for the sake of simplicity create this directory in the same level as the source tree (as showned ​above).+**Note:** for the sake of simplicity create this directory in the same level as the source tree (as shown above).
  
 **4.** For Linux systems you must choose the build configuration:​ **4.** For Linux systems you must choose the build configuration:​
 <code bash> <code bash>
-$ cmake -G "Unix Makefiles"​ -DCMAKE_BUILD_TYPE:​STRING="​Release"​ -DCMAKE_INSTALL_PREFIX:​PATH="/​home/​user/​myinstall/​terralib"​ -DCMAKE_PREFIX_PATH:​PATH="/​home/​user/​mylibs"​ ../​codebase/​build/​cmake+$> cmake -G "Unix Makefiles"​ -DCMAKE_BUILD_TYPE:​STRING="​Release"​ -DCMAKE_INSTALL_PREFIX:​PATH="/​home/​user/​myinstall/​terralib"​ -DCMAKE_PREFIX_PATH:​PATH="/​home/​user/​mylibs"​ ../​codebase/​build/​cmake 
 +:: or inform some paths before as bellow: 
 +$> QT5_BASE_DIR="/​home/​user/​Qt/"​ PATH=/​home/​user/​Qt/​5.12.3/​gcc_64/​bin/:​$PATH ​cmake -G "Unix Makefiles"​ -DCMAKE_BUILD_TYPE:​STRING="​Release"​ -DCMAKE_INSTALL_PREFIX:​PATH="/​home/​user/​myinstall/​terralib"​ -DCMAKE_PREFIX_PATH:​PATH="/​home/​user/​mylibs"​ ../​codebase/​build/​cmake
 </​code>​ </​code>​
  
 **5.** Building (with 4 process in parallel): **5.** Building (with 4 process in parallel):
 <code bash> <code bash>
-$ make -j 4+$make -j 4 
 +:: or inform some paths before as bellow: 
 +$> QT5_BASE_DIR="/​home/​user/​Qt/"​ PATH=/​home/​user/​Qt/​5.12.3/​gcc_64/​bin/:​$PATH make
 </​code>​ </​code>​
  
 **6.** Installing: **6.** Installing:
 <code bash> <code bash>
-$ make install+$make install
 </​code>​ </​code>​
  
 **7.** Uninstalling:​ **7.** Uninstalling:​
 <code bash> <code bash>
-$ make uninstall+$make uninstall
 </​code>​ </​code>​
  
Line 168: Line 255:
 </​code>​ </​code>​
  
-===== Building on Mac OS X El Capitan and Sierra =====+===== Building on Mac OS X  Sierra =====
  
 **1.** Open a Command Prompt (Shell). **1.** Open a Command Prompt (Shell).
Line 188: Line 275:
 **4.** For Mac OS X systems you must choose the build configuration:​ **4.** For Mac OS X systems you must choose the build configuration:​
 <​code>​ <​code>​
-$ cmake -G "Unix Makefiles"​ -DCMAKE_BUILD_TYPE:​STRING="​Release"​ -DCMAKE_INSTALL_PREFIX:​PATH="/​Users/​user/​myinstall/​terralib"​ -DCMAKE_PREFIX_PATH:​PATH="/​Users/​user/​mylibs;/​Users/​user/​mylibs/​terralib5/​lib/​cmake;/​Users/​user/​Qt5.4.1/​5.4/​clang_64/​lib/​cmake"​ ../​codebase/​build/​cmake+$ cmake -G "Unix Makefiles"​ -DCMAKE_BUILD_TYPE:​STRING="​Release"​ -DCMAKE_INSTALL_PREFIX:​PATH="/​Users/​user/​myinstall/​terralib"​ -DCMAKE_PREFIX_PATH:​PATH="/​Users/​user/​mylibs;/​Users/​user/​mylibs/​terralib5/​lib/​cmake;/​Users/​user/​Qt5.12.3/​lib/​cmake"​ ../​codebase/​build/​cmake
 </​code>​ </​code>​
  
Line 209: Line 296:
  
 **Notes:** **Notes:**
-  * You have to specify valid paths for **CMAKE_PREFIX_PATH**. If you have a Qt version installed as a framework in your home directory, you have to tell CMake where to locate its CMake support. For instance, if you have Qt version 5.4.installed, you have to add to **CMAKE_PREFIX_PATH** the following directory:+  * You have to specify valid paths for **CMAKE_PREFIX_PATH**. If you have a Qt version installed as a framework in your home directory, you have to tell CMake where to locate its CMake support. For instance, if you have Qt version 5.12.installed, you have to add to **CMAKE_PREFIX_PATH** the following directory:
 <​code>​ <​code>​
-/​Users/​user/​Qt5.4.1/​5.4/​clang_64/lib/cmake+/​Users/​user/​Qt5.12.3/lib/cmake
 </​code>​ </​code>​
  
Line 225: Line 312:
 </​code>​ </​code>​
  
-====== end of new one ====== 
  
-====== TerraLib Developer'​s Guide - Build Instructions ======+===== Building on Microsoft Windows with Microsoft Visual C++ 2013 (not supported anymore)=====
  
-Make sure you have all the third-party library dependencies listed in the section **[[[[:​wiki:​documentation:​devguide:​dependencies|Dependencies]]** before trying to build TerraLib/​TerraView. +**1.** Microsoft Visual Studio 2013 C++ users can download and unpack the suitable third-party libraries compiled for building 64-bit version of TerraLib with Qt5.12.support. Choose the right version specified by ''​x.y.z''​ at terralib-x.y.z-3rdparty-msvc-2013-win64:​
- +
-After **[[:​wiki:​documentation:​devguide:​cloning|cloning the TerraLib repository]]**,​ choose the right **[[:​wiki:​documentation:​devguide:​branches_and_tags|branch or tag]]** to work on. +
- +
-The //​**build/​cmake**//​ folder (under the source tree) contains a CMake project for building TerraLib. +
- +
-Until now, TerraLib build has been tested on: +
-  * Linux Ubuntu 14.04 and 16.04 +
-  * Mac OS X Yosemite, El Capitan and Sierra +
-  * Microsoft Windows 7 and Windows 10 +
- +
-You should use at least CMake version 2.8.12 for building TerraLib. Older versions than this may not work properly. +
- +
-Follow the build steps below according to your platform. +
- +
-===== Building on Microsoft Windows with Microsoft Visual C++ 2013 ===== +
- +
-**1.** Microsoft Visual Studio 2013 C++ users can download and unpack the suitable third-party libraries compiled for building 64-bit version of TerraLib with Qt5.4.support. Choose the right version specified by ''​x.y.z''​ at terralib-x.y.z-3rdparty-msvc-2013-win64:​+
  
   *[[http://​www.dpi.inpe.br/​terralib5/​terralib5-3rdparty/​|Choose the right version specified by x.y.z]]   *[[http://​www.dpi.inpe.br/​terralib5/​terralib5-3rdparty/​|Choose the right version specified by x.y.z]]
Line 316: Line 385:
 **7.** If TERRALIB_BUILD_EXAMPLES_ENABLED => ON or TERRALIB_BUILD_EXAMPLES_ENABLED => ON: to run and debug one of the terralib_example_* or terralib_unitest_*,​ set it as ''​StartUp''​ Project and make sure the data ([[http://​www.dpi.inpe.br/​terralib5-devel/​data/​data.zip| data.zip]]) used by these examples/​unittest are uncompressed at the default directory specified by TERRALIB_DATA_DIR :    **7.** If TERRALIB_BUILD_EXAMPLES_ENABLED => ON or TERRALIB_BUILD_EXAMPLES_ENABLED => ON: to run and debug one of the terralib_example_* or terralib_unitest_*,​ set it as ''​StartUp''​ Project and make sure the data ([[http://​www.dpi.inpe.br/​terralib5-devel/​data/​data.zip| data.zip]]) used by these examples/​unittest are uncompressed at the default directory specified by TERRALIB_DATA_DIR :   
    ​TERRALIB_DATA_DIR ​  ​C:​\terralib\build-win64\data    ​TERRALIB_DATA_DIR ​  ​C:​\terralib\build-win64\data
- 
-===== Building on Linux Ubuntu 14.04 and 16.04 with GNU G++ ===== 
- 
-**1.** Open a Command Prompt (Shell). 
- 
-**2.** We will assume that the codebase (all the source tree) is located at: 
-<code bash> 
-/​home/​user/​mydevel/​terralib/​codebase 
-</​code>​ 
- 
-**3.** Create a folder out of the TerraLib source tree to generate the build system, for example: 
-<code bash> 
-$ cd /​home/​user/​mydevel/​terralib 
-$ mkdir build-release 
-$ cd build-release 
-</​code>​ 
- 
-**Note:** for the sake of simplicity create this directory in the same level as the source tree (as showned above). 
- 
-**4.** For Linux systems you must choose the build configuration:​ 
-<code bash> 
-$ cmake -G "Unix Makefiles"​ -DCMAKE_BUILD_TYPE:​STRING="​Release"​ -DCMAKE_INSTALL_PREFIX:​PATH="/​home/​user/​myinstall/​terralib"​ -DCMAKE_PREFIX_PATH:​PATH="/​home/​user/​mylibs"​ ../​codebase/​build/​cmake 
-</​code>​ 
- 
-**5.** Building (with 4 process in parallel): 
-<code bash> 
-$ make -j 4 
-</​code>​ 
- 
-**6.** Installing: 
-<code bash> 
-$ make install 
-</​code>​ 
- 
-**7.** Uninstalling:​ 
-<code bash> 
-$ make uninstall 
-</​code>​ 
- 
-**Notes:** 
-  * Some Linux flavours with different versions of GNU gcc and Boost will need more parameters such as: 
-<​code>​ 
--DCMAKE_INCLUDE_PATH:​PATH="/​usr/​local;/​opt/​include"​ 
--DCMAKE_LIBRARY_PATH:​PATH="/​usr/​local;/​opt/​lib"​ 
--DCMAKE_PROGRAM_PATH:​PATH="/​usr/​local/​bin;/​opt/​bin"​ 
--DBOOST_ROOT:​PATH="/​opt/​boost"​ 
-</​code>​ 
- 
-  * Boost can also be indicated by ''​BOOST_INCLUDEDIR''​ (note: without an '​_'​ separating ''​INCLUDE''​ and ''​DIR''​):​ 
-<​code>​ 
-  -DBOOST_INCLUDEDIR:​PATH="/​usr/​local/​include"​ 
-</​code>​ 
- 
- * The parameter ''​-lpthread''​ must be informed only if your Boost was not built as a shared library: 
-<​code>​ 
-  -DCMAKE_CXX_FLAGS:​STRING="​-lpthread"​ 
-</​code>​ 
- 
-  * For building with Qt5 you can provide the ''​Qt5_DIR''​ variable as: 
-<​code>​ 
-  -DQt5_DIR:​PATH="/​usr/​local/​lib/​cmake/​Qt5"​ 
-</​code>​ 
- 
-  * For generating a debug version set ''​CMAKE_BUILD_TYPE''​ as: 
-<​code>​ 
-  -DCMAKE_BUILD_TYPE:​STRING="​Debug"​ 
-</​code>​ 
- 
-  * If you are using default Ubuntu Desktop, you may have problems with menus. In this case, you may need to set the ''​QT_QPA_PLATFORMTHEME''​ environment variable before running Qt applications such as TerraView: 
-<​code>​ 
-export QT_QPA_PLATFORMTHEME=""​ 
-</​code>​ 
- 
-===== Building on Mac OS X El Capitan and Sierra ===== 
- 
-**1.** Open a Command Prompt (Shell). 
- 
-**2.** We will assume that the codebase (all the source tree) is located at: 
-<​code>​ 
-/​Users/​user/​mydevel/​terralib/​codebase 
-</​code>​ 
- 
-**3.** Create a folder out of the TerraLib source tree to generate the build system, for example: 
-<​code>​ 
-$ cd /​Users/​user/​mydevel/​terralib 
-$ mkdir build-release 
-$ cd build-release 
-</​code>​ 
- 
-**Note:** for the sake of simplicity create this directory in the same level as the source tree (as showned above). 
- 
-**4.** For Mac OS X systems you must choose the build configuration:​ 
-<​code>​ 
-$ cmake -G "Unix Makefiles"​ -DCMAKE_BUILD_TYPE:​STRING="​Release"​ -DCMAKE_INSTALL_PREFIX:​PATH="/​Users/​user/​myinstall/​terralib"​ -DCMAKE_PREFIX_PATH:​PATH="/​Users/​user/​mylibs;/​Users/​user/​mylibs/​terralib5/​lib/​cmake;/​Users/​user/​Qt5.4.1/​5.4/​clang_64/​lib/​cmake"​ ../​codebase/​build/​cmake 
-</​code>​ 
- 
-**Note:** Please, in the cmake call above, take special attention to the key *CMAKE_PREFIX_PATH* and Qt location. 
- 
-**5.** Building (with 4 process in parallel): 
-<​code>​ 
-$ make -j 4 
-</​code>​ 
- 
-**6.** Installing: 
-<​code>​ 
-$ make install 
-</​code>​ 
- 
-**7.** Uninstalling:​ 
-<​code>​ 
-$ make uninstall 
-</​code>​ 
- 
-**Notes:** 
-  * You have to specify valid paths for **CMAKE_PREFIX_PATH**. If you have a Qt version installed as a framework in your home directory, you have to tell CMake where to locate its CMake support. For instance, if you have Qt version 5.4.1 installed, you have to add to **CMAKE_PREFIX_PATH** the following directory: 
-<​code>​ 
-/​Users/​user/​Qt5.4.1/​5.4/​clang_64/​lib/​cmake 
-</​code>​ 
- 
-  * You can also generate an Xcode project by using the "Xcode generator"​ option: 
-<​code>​ 
--G "​Xcode"​ 
-</​code>​ 
- 
-  * There are some useful variables that can be set inside Xcode in order to run an application. The following environment variable can be set: 
-<​code>​ 
-DYLD_FALLBACK_LIBRARY_PATH 
-DYLD_FALLBACK_FRAMEWORK_PATH 
-</​code>​