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/24 10:10]
marisa
wiki:documentation:devguide:build [2018/09/17 15:35]
marisa [Building on Microsoft Windows with Microsoft Visual C++ 2017]
Line 50: Line 50:
  
   * Click in "Add entry":​   * 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/​Qt5.4.1/5.4/msvc2013_64_opengl/​lib/​cmake;​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 (;)+    * Add new variable named **CMAKE_PREFIX_PATH**((as a example c:​\terralib5\3rdparty;​c:​\terralib5\3rdparty/​lib/​cmake/​terralib-4.2.2;​C:/​Qt/​Qt5.10.1/5.10.1/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''​| 
 |Python ​   | ''​c:​\Python366''​| |Python ​   | ''​c:​\Python366''​|
  
Line 229: Line 228:
 </​code>​ </​code>​
  
-====== end of new one ====== 
- 
-====== TerraLib Developer'​s Guide - Build Instructions ====== 
- 
-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. 
- 
-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 ===== ===== Building on Microsoft Windows with Microsoft Visual C++ 2013 =====
Line 320: Line 301:
 **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>​