Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
wiki:terralib5_build [2014/08/18 11:07] marisa |
wiki:terralib5_build [2014/09/25 16:41] (current) 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: | ||
- | * [[wiki:terralib5_build#Cmake-GUI| Using the Cmake-GUI]] | + | * [[wiki:terralib5_build#CMake_Command_Line_Notes| Using Cmake Command line]] |
- | * [[wiki:terralib5_build#Cmake_Command_Line| Using Cmake Command line]] | + | |
- | * [[wiki:terralib5_build#ccmake| Using Ccmake]] | + | |
===== Building Terralib ===== | ===== Building Terralib ===== | ||
- | This section explains how to build the TerraLib from source code in some platforms. The original instructions are in BUILD-INSTRUCTIONS file at the terralib codebase. | + | 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 110: | 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. | ||
Line 162: | Line 201: | ||
* Calling from a building dir while pointing to the source (main CmakeLists location), specifying Unix Makefiles as a generator, compiling in Release | * Calling from a building dir while pointing to the source (main CmakeLists location), specifying Unix Makefiles as a generator, compiling in Release | ||
- | $ cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE:STRING="Release" -DCMAKE_INSTALL_PREFIX:PATH="/usr/local/terralib" ../codebase/build/cmake | + | |
+ | $ cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH="/usr/local/terralib" ../codebase/build/ | ||
* Specifying Visual Studio 10 as the generator, using source code located at C:\Dev\Terralib\build and setting the option to generate a NSIS installer as true: | * Specifying Visual Studio 10 as the generator, using source code located at C:\Dev\Terralib\build and setting the option to generate a NSIS installer as true: | ||
- | cmake -G 'Visual Studio 10' C:\Dev\Terralib\build -DTE_DEPENDENCIES_DIR=C:/Libs/terralib_3rdparty_win32 -DCPACK_BINARY_NSIS=True | + | $ cmake -G 'Visual Studio 10' C:\Dev\Terralib\build -DTE_DEPENDENCIES_DIR=C:/Libs/terralib_3rdparty_win32 -DCPACK_BINARY_NSIS=True |
* Calling from a building dir while pointing to the source (main CmakeLists location), specifying Unix Makefiles as a generator, compiling in Release and adjusting the QWT references to the path of a locally compiled version: | * Calling from a building dir while pointing to the source (main CmakeLists location), specifying Unix Makefiles as a generator, compiling in Release and adjusting the QWT references to the path of a locally compiled version: | ||
- | cmake -G 'Unix Makefiles' /home/<user>/terralib5/build -DCMAKE_BUILD_TYPE=Release -DQWT_INCLUDE_DIR=/usr/local/qwt-6.1.0/ include -DQWT_LIBRARY_RELEASE=/usr/local/qwt-6.1.0/lib/libqwt.so.6.1.0 | + | $ cmake -G 'Unix Makefiles' /home/<user>/terralib5/build -DCMAKE_BUILD_TYPE=Release -DQWT_INCLUDE_DIR=/usr/local/qwt-6.1.0/include -DQWT_LIBRARY_RELEASE=/usr/local/qwt-6.1.0/lib/libqwt.so.6.1.0 |
== Notes for Linux build == | == Notes for Linux build == |