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
wiki:terralib5_build [2014/09/18 10:31]
marisa [Building Terralib]
wiki:terralib5_build [2014/09/25 16:41]
marisa
Line 1: Line 1:
-====== TerraLib 5.0.0-alpha - Build and Install ======+====== TerraLib 5.0 - General guide for Building ​and Install ======
  
 Useful links: Useful links:
Line 7: Line 7:
 ===== Building Terralib ===== ===== Building Terralib =====
  
-This section explains how to build the TerraLib from source code in some platforms. The most updated instructions are in BUILD-INSTRUCTIONS ​text file located at the root of the terralib codebase directory. Here are the general instructions and might not have all variables needed for a specific release.+This section explains how to build the TerraLib from source code in some platforms. The most updated instructions are in BUILD-INSTRUCTIONS file located at the root of the terralib codebase directory. Here are the general instructions and might not have all variables needed for a specific release.
  
 ==== 1. Build instructions on Linux with g++ (GNU gcc) ==== ==== 1. Build instructions on Linux with g++ (GNU gcc) ====
Line 108: Line 108:
 j) To run and debug terraview application,​ set it as StartUp Project at Microsoft Visual C++ 2010. j) To run and debug terraview application,​ set it as StartUp Project at Microsoft Visual C++ 2010.
  
-k) To run and debug examples and/or unittests make sure the data used are located at the default directory:+k) To run and debug examples and/or unittests make sure the data (http://​www.dpi.inpe.br/​terralib5-devel/​data.zip) ​used are located at the default directory:
    ​TERRALIB_DATA_DIR ​  ​C:​\terralib\build-win32\data    ​TERRALIB_DATA_DIR ​  ​C:​\terralib\build-win32\data
        
 l) Make sure the default directory used to save the reports generated by the unittests exist, otherwise no report will be saved: l) Make sure the default directory used to save the reports generated by the unittests exist, otherwise no report will be saved:
    ​TERRALIB_REPORT_DIR ​  ​C:​\terralib\build-win32\report    ​TERRALIB_REPORT_DIR ​  ​C:​\terralib\build-win32\report
 +   
 +2.2 On MacOs and Linux:
 +
 +a) We will assume that the TerraLib source tree (git clone) is located at:
 +   /​home/​user/​terralib5
 +
 +b) We wil assume that the build tree where will be generated the binaries is located at:
 +   /​home/​user/​build_terralib5
 +
 +c) We will assume that all the third-party libraries that TerraLib needs to be compiled are installed in your system, and the Qt5 version is used.
 +
 +d) Open CMake-GUI in order to generate a build project for MacOS or Linux:
 +
 +e) Then assure that the following variables are set to the locations defined above:
 +   Where is the source code => /​home/​user/​terralib5
 +   Where to build the binaries => /​home/​user/​build_terralib5
 +
 +f) Then press the Add Entry button containing the following CMake variables:
 +   
 +   Name: CMAKE_PREFIX_PATH
 +   Type: PATH
 +   ​Value:​ /​qt5_install_dir/​lib/​cmake/​Qt5 ​         and 
 +   Name: CMAKE_BUILD_TYPE
 +   Type: String
 +   ​Value:​ Release(or Debug)
 + 
 +g) Then press "​Configure"​ button. If it is the first time that you press this button, select the Generator to be used (Makefile or a selected IDE like Eclipse for Linux, or XCode for MacOS)
 + 
 +Note: Some projects may be disabled through the following variables:
 +        TERRALIB_BUILD_EXAMPLES_ENABLED => OFF
 +        TERRALIB_BUILD_UNITTEST_ENABLED => OFF
 +
 +h) According to the generator selected previously, in the build tree directory(/​home/​user/​build_terralib5) will be generated a Makefile or the file corresponding to the IDE selected.
 +
 +i) TerraLib/​TerraView can be compiled calling make for the Makefile Generator, Eclipse (for Linux) or XCode (for MacOS).
 +   
 +j) To run and debug terralib_example_* and/or terralib_unittest_* make it the current project and make sure the data (http://​www.dpi.inpe.br/​terralib5-devel/​data.zip) used are located at the build directory:
 +   ​TERRALIB_DATA_DIR ​  /​home/​user/​build_terralib5/​data
 +   
 +k) Make sure the default directory used to save the reports generated by the terralib_unittest_* exists, otherwise no report will be saved:
 +   ​TERRALIB_REPORT_DIR ​  /​home/​user/​build_terralib5/​report
  
 For more information on TerraLib, please, visit its main web page at: http://​www.terralib.org. For more information on TerraLib, please, visit its main web page at: http://​www.terralib.org.