This is an old revision of the document!
Warning: Declaration of syntax_plugin_iframe::handle($match, $state, $pos, &$handler) should be compatible with DokuWiki_Syntax_Plugin::handle($match, $state, $pos, Doku_Handler $handler) in /var/www/html/terralib5/wiki/lib/plugins/iframe/syntax.php on line 18
Warning: Declaration of syntax_plugin_iframe::render($mode, &$R, $data) should be compatible with DokuWiki_Syntax_Plugin::render($format, Doku_Renderer $renderer, $data) in /var/www/html/terralib5/wiki/lib/plugins/iframe/syntax.php on line 18
Warning: Declaration of syntax_plugin_externallink::handle($match, $state, $pos, &$handler) should be compatible with DokuWiki_Syntax_Plugin::handle($match, $state, $pos, Doku_Handler $handler) in /var/www/html/terralib5/wiki/lib/plugins/externallink/syntax.php on line 107
Warning: Declaration of syntax_plugin_externallink::render($mode, &$renderer, $data) should be compatible with DokuWiki_Syntax_Plugin::render($format, Doku_Renderer $renderer, $data) in /var/www/html/terralib5/wiki/lib/plugins/externallink/syntax.php on line 107
SRS
1. Script CMake
cmake_minimum_required(VERSION 2.8.12) project(curso_terralib_srs) add_definitions(-DBOOST_ALL_NO_LIB -DBOOST_FILESYSTEM_VERSION=3 -DBOOST_UBLAS_TYPE_CHECK=0 -DBOOST_LOG_DYN_LINK) if(APPLE) add_definitions(-ftemplate-depth-1024) endif() if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR (CMAKE_CXX_COMPILER MATCHES ".*clang") OR (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic -std=c++11") endif() find_package(Boost 1.54.0 REQUIRED system chrono timer filesystem) find_package(terralib REQUIRED) include_directories(${Boost_INCLUDE_DIR} ${terralib_INCLUDE_DIRS} ${terralib_DIR}) file(GLOB CURSO_SRC_FILES *.cpp) add_executable(curso_terralib_srs ${CURSO_SRC_FILES}) target_link_libraries(curso_terralib_srs terralib_mod_srs ${BOOST_SYSTEM_LIBRARY})
2. Código do Exemplo:
// TerraLib #include <terralib/common/TerraLib.h> #include <terralib/srs.h> // STL #include <iostream> #include <memory> int main(int argc, char* argv[]) { TerraLib::getInstance().initialize(); // Seu código vai aqui!! TerraLib::getInstance().finalize(); return EXIT_SUCCESS; }
3. Opções do CMake:
-DCMAKE_BUILD_TYPE:STRING="Debug" -DCMAKE_PREFIX_PATH:PATH="/home/terralib5/mylibs;/home/terralib5/mylibs/terralib5.1/lib/cmake" -DCMAKE_BUILD_TYPE:STRING="Debug"