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
Last revision Both sides next revision
wiki:terralib5_build [2014/08/18 10:22]
marisa
wiki:terralib5_build [2014/09/25 15:55]
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 119: Line 117:
  
  
-==== CMake command line ====+==== CMake command line notes====
  
 Using the CMake command line to build the compilation projects. Using the CMake command line to build the compilation projects.
Line 131: Line 129:
 ^Variable^Effect^Example^ ^Variable^Effect^Example^
 | CMAKE_BUILD_TYPE | Sets the build type. Such as Debug or Release | -DCMAKE_BUILD_TYPE=Debug | | CMAKE_BUILD_TYPE | Sets the build type. Such as Debug or Release | -DCMAKE_BUILD_TYPE=Debug |
-| BUILD_TERRALIB4 | Enable/​disable [ON/OFF] the TerraLib4 module | -DBUILD_TERRALIB4=OFF | 
 | QWT_INCLUDE_DIR | Sets the include path of the QWT library | -DQWT_INCLUDE_DIR=<​DIRECTORY>​ | | QWT_INCLUDE_DIR | Sets the include path of the QWT library | -DQWT_INCLUDE_DIR=<​DIRECTORY>​ |
 | QWT_LIBRARY_DEBUG | Sets the path of the QWT library in Debug | -DQWT_LIBRARY_DEBUG=<​LIBRARY_FILE_PATH>​ | | QWT_LIBRARY_DEBUG | Sets the path of the QWT library in Debug | -DQWT_LIBRARY_DEBUG=<​LIBRARY_FILE_PATH>​ |
 | QWT_LIBRARY_RELEASE | Sets the path of the QWT library in Release | -DQWT_LIBRARY_RELEASE=<​LIBRARY_FILE_PATH>​ | | QWT_LIBRARY_RELEASE | Sets the path of the QWT library in Release | -DQWT_LIBRARY_RELEASE=<​LIBRARY_FILE_PATH>​ |
-| TE_DEPENDENCIES_DIR | Used as an easy and convenient way to locate terralib'​s dependencies | -DTE_DEPENDENCIES_DIR=<​unpack_dir>/​terralib_3rdparty_win32 | 
 | LOG4CXX_INCLUDE_DIR | Log4Cxx headers include path | -DLOG4CXX_INCLUDE_DIR=<​DIRECTORY>​ | | LOG4CXX_INCLUDE_DIR | Log4Cxx headers include path | -DLOG4CXX_INCLUDE_DIR=<​DIRECTORY>​ |
 | LOG4CXX_LIBRARY_DEBUG | Log4Cxx debug library file path | -DLOG4CXX_LIBRARY_DEBUG=<​LIBRARY_FILE_PATH>​ | | LOG4CXX_LIBRARY_DEBUG | Log4Cxx debug library file path | -DLOG4CXX_LIBRARY_DEBUG=<​LIBRARY_FILE_PATH>​ |
Line 162: Line 158:
  
 A few examples of how to call CMake to build terralib: A few examples of how to call CMake to build terralib:
 +
 +  * 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=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 ==
Line 177: Line 177:
 ^Variable^Effect^Example^ ^Variable^Effect^Example^
 | LD_LIBRARY_PATH | A colon-separated set of directories where third party libraries should be searched for first, before the standard set of directories | LD_LIBRARY_PATH=/​home/​user/​mylibraries | | LD_LIBRARY_PATH | A colon-separated set of directories where third party libraries should be searched for first, before the standard set of directories | LD_LIBRARY_PATH=/​home/​user/​mylibraries |
- 
-==== CCmake ==== 
- 
-Using the curses based Interface (ccmake) to build the compilation projects. 
- 
-On some Unix platforms, you can install a curses based cmake gui that is a terminal based text application and can be used as well. The commands are basically the same as before, but instead of using "​cmake"​ use "​ccmake"​ instead. 
- 
-Example: ccmake /​home/<​username>/​source/​terralib5/​build (Executed from the <​building_dir>​) 
- 
-{{ :​wiki:​ccmake.png?​1080 |}} 
- 
-Once executed, the user can manually adjust the variables and customize the compilation. Once the options have been adjusted type c to configure the project and then type g to generate the build files and exit ccmake.