Commit 31a5e9fd authored by Guillaume Pasero's avatar Guillaume Pasero

Synchronization, merge branch 'develop' into masked_iterator_decorator

parents 867b9229 16fc6cd6
......@@ -16,15 +16,12 @@ before_script:
- export MAKE_CMD=/tmp/ninja
- export CMAKE_GEN='Ninja'
- cd /tmp
-
- wget https://cmake.org/files/v3.4/cmake-3.4.1-Linux-x86_64.tar.gz --no-check-certificate
- wget https://raw.githubusercontent.com/rkanavath/otb_cmake_scripts/master/rashad-cm.cmake --no-check-certificate
- tar -xzf cmake-3.4.1-Linux-x86_64.tar.gz
- wget https://github.com/martine/ninja/releases/download/v1.6.0/ninja-linux.zip --no-check-certificate
- unzip ninja-linux.zip
- wget https://www.orfeo-toolbox.org/packages/xdk/OTB-5.2/OTB-5.2.0-xdk-Linux64.run --no-check-certificate
- wget https://www.orfeo-toolbox.org/packages/xdk/OTB-5.2/OTB-5.2.0-xdk-Linux64.run --no-check-certificate
- chmod +x /tmp/OTB-5.2.0-xdk-Linux64.run
- /tmp/OTB-5.2.0-xdk-Linux64.run
script: /tmp/cmake-3.4.1-Linux-x86_64/bin/ctest -VV -S /tmp/rashad-cm.cmake
script: /tmp/cmake-3.4.1-Linux-x86_64/bin/ctest -VV -S /home/travis/build/orfeotoolbox/OTB/Utilities/Maintenance/TravisBuild.cmake
......@@ -31,6 +31,10 @@ set(CTEST_CUSTOM_COVERAGE_EXCLUDE
# Exclude files from the Examples directories
#".*/Examples/.*"
# Exclude files from the Testing directories
".*/test/.*"
".*/Testing/.*"
# Exclude files from the ThirdParty Utilities directories
".*/Modules/ThirdParty/.*"
".*/Utilities/.*"
......
# Courtesy of: https://raw.github.com/progschj/OpenGL-Examples/
#
# Try to find GLEW library and include path.
# Once done this will define
#
# GLEW_FOUND
# GLEW_INCLUDE_PATH
# GLEW_LIBRARY
#
IF (WIN32)
FIND_PATH( GLEW_INCLUDE_PATH GL/glew.h
$ENV{PROGRAMFILES}/GLEW/include
${GLEW_ROOT_DIR}/include
DOC "The directory where GL/glew.h resides")
FIND_LIBRARY( GLEW_LIBRARY
NAMES glew GLEW glew32 glew32s
PATHS
$ENV{PROGRAMFILES}/GLEW/lib
${GLEW_ROOT_DIR}/lib
${PROJECT_SOURCE_DIR}/src/nvgl/glew/bin
${PROJECT_SOURCE_DIR}/src/nvgl/glew/lib
DOC "The GLEW library")
ELSE (WIN32)
FIND_PATH( GLEW_INCLUDE_PATH GL/glew.h
/usr/include
/usr/local/include
/sw/include
/opt/local/include
${GLEW_ROOT_DIR}/include
DOC "The directory where GL/glew.h resides")
# Prefer the static library.
FIND_LIBRARY( GLEW_LIBRARY
NAMES libGLEW.so GLEW
PATHS
/usr/lib64
/usr/lib
/usr/local/lib64
/usr/local/lib
/sw/lib
/opt/local/lib
${GLEW_ROOT_DIR}/lib
DOC "The GLEW library")
ENDIF (WIN32)
SET(GLEW_FOUND "NO")
IF (GLEW_INCLUDE_PATH AND GLEW_LIBRARY)
SET(GLEW_LIBRARIES ${GLEW_LIBRARY})
SET(GLEW_FOUND "YES")
ENDIF (GLEW_INCLUDE_PATH AND GLEW_LIBRARY)
INCLUDE(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GLEW DEFAULT_MSG GLEW_LIBRARY)
# Locate the glfw library
# This module defines the following variables:
# GLFW_LIBRARY, the name of the library;
# GLFW_INCLUDE_DIR, where to find glfw include files.
# GLFW_FOUND, true if both the GLFW_LIBRARY and GLFW_INCLUDE_DIR have been found.
#
# To help locate the library and include file, you could define an environment variable called
# GLFW_ROOT which points to the root of the glfw library installation. This is pretty useful
# on a Windows platform.
#
#
# Usage example to compile an "executable" target to the glfw library:
#
# FIND_PACKAGE (glfw REQUIRED)
# INCLUDE_DIRECTORIES (${GLFW_INCLUDE_DIR})
# ADD_EXECUTABLE (executable ${EXECUTABLE_SRCS})
# TARGET_LINK_LIBRARIES (executable ${GLFW_LIBRARY})
#
# TODO:
# Allow the user to select to link to a shared library or to a static library.
#Search for the include file...
FIND_PATH(GLFW_INCLUDE_DIR GLFW/glfw3.h DOC "Path to GLFW include directory."
HINTS
$ENV{GLFW_ROOT}
PATH_SUFFIX
include # For finding the include file under the root of the glfw expanded archive, typically on Windows.
)
FIND_LIBRARY(GLFW_LIBRARY DOC "Absolute path to GLFW library."
NAMES glfw glfw3dll glfw3
HINTS
$ENV{GLFW_ROOT}
PATH_SUFFIXES
lib # For finding the library file under the root of the glfw expanded archive, typically on Windows.
)
IF(GLFW_INCLUDE_DIR AND EXISTS "${GLFW_INCLUDE_DIR}/GLFW/glfw3.h")
FILE(STRINGS "${GLFW_INCLUDE_DIR}/GLFW/glfw3.h" glfw_version_str
REGEX "^#[\t ]*define[\t ]+GLFW_VERSION_(MAJOR|MINOR|REVISION)[\t ]+[0-9]+$")
UNSET(GLFW_VERSION_STRING)
FOREACH(VPART MAJOR MINOR REVISION)
FOREACH(VLINE ${glfw_version_str})
IF(VLINE MATCHES "^#[\t ]*define[\t ]+GLFW_VERSION_${VPART}")
STRING(REGEX REPLACE "^#[\t ]*define[\t ]+GLFW_VERSION_${VPART}[\t ]+([0-9]+)$" "\\1"
GLFW_VERSION_PART "${VLINE}")
IF(GLFW_VERSION_STRING)
SET(GLFW_VERSION_STRING "${GLFW_VERSION_STRING}.${GLFW_VERSION_PART}")
ELSE()
SET(GLFW_VERSION_STRING "${GLFW_VERSION_PART}")
ENDIF()
UNSET(GLFW_VERSION_PART)
ENDIF()
ENDFOREACH()
ENDFOREACH()
ENDIF()
INCLUDE(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GLFW
REQUIRED_VARS GLFW_LIBRARY GLFW_INCLUDE_DIR
VERSION_VAR GLFW_VERSION_STRING)
\ No newline at end of file
......@@ -16,6 +16,7 @@ set(group_list
Remote
Segmentation
ThirdParty
Visualization
Wrappers
)
......@@ -34,8 +35,10 @@ set(Radiometry_documentation "This group contains algorithms related to the proc
set(Registration_documentation "This group contains algorithms related to registration of images")
set(Segmentation_documentation "This group contains algorithms related to image segmentaiton")
set(ThirdParty_documentation "This group contains all Orfeo ToolBox third parties")
set(Visualization_documentation "This group contains Ice (visualization framework) and IceViewer (visualization tool)")
set(Wrappers_documentation "This group contains the application framework and the wrappers to use it")
set(Remote_documentation "This group of modules is for OTB based code that have
additional third-party dependencies not bundled with the toolkit,
new algorithms or implementations seeking greater exposure and adoption,
......
......@@ -213,7 +213,14 @@ private:
goesOn2 = feature2.addr() != 0;
count++;
}
layer2.ogr().CommitTransaction();
const OGRErr err = layer2.ogr().CommitTransaction();
if (err != OGRERR_NONE)
{
itkExceptionMacro(<< "Unable to commit transaction for OGR layer " << layer2.ogr().GetName() << ".");
}
source2->SyncToDisk();
clock_t toc = clock();
......
......@@ -335,7 +335,12 @@ private:
firstFeature=nextFeature;
}
layer.ogr().CommitTransaction();
const OGRErr err = layer.ogr().CommitTransaction();
if (err != OGRERR_NONE)
{
itkExceptionMacro(<< "Unable to commit transaction for OGR layer " << layer.ogr().GetName() << ".");
}
if(extension==".shp"){
sqloss.str("");
......
......@@ -48,7 +48,7 @@ otb_test_application(NAME apTvDmStereoFramework
#----------- StereoRectificationGridGenerator TESTS ----------------
otb_test_application(NAME apTuDmStereoRectificationGridGeneratorTest
otb_test_application(NAME apTvDmStereoRectificationGridGeneratorTest
APP StereoRectificationGridGenerator
OPTIONS -io.inleft ${EXAMPLEDATA}/sensor_stereo_left.tif
......
......@@ -18,7 +18,13 @@
#ifndef _otbConfigurationManager_h
#define _otbConfigurationManager_h
#include "itkVersion.h"
#if ITK_VERSION_MAJOR < 4 || (ITK_VERSION_MAJOR == 4 && ITK_VERSION_MINOR <= 8)
#include "itksys/FundamentalType.h"
#else
#include "itk_kwiml.h"
#endif
#include <string>
#include <boost/cstdint.hpp>
......@@ -38,7 +44,11 @@ namespace otb
class ConfigurationManager
{
public:
#if ITK_VERSION_MAJOR < 4 || (ITK_VERSION_MAJOR == 4 && ITK_VERSION_MINOR <= 8)
typedef ::itksysFundamentalType_UInt64 RAMValueType;
#else
typedef KWIML_INT_uint64_t RAMValueType;
#endif
/**
* DEMDirectory is a directory were DEM tiles are stored.
......
......@@ -90,7 +90,7 @@ otb_add_test(NAME coTvExtractROI2 COMMAND otbImageBaseTestDriver
26 97 209 100 )
otb_add_test(NAME bfTuComplexToVectorImageCastFilterTest COMMAND otbImageBaseTestDriver
otb_add_test(NAME bfTvComplexToVectorImageCastFilterTest COMMAND otbImageBaseTestDriver
--compare-n-images ${NOTOL} 2
${BASELINE}/bfTvComplexToVectorImageCastFilterTest.tif
${TEMP}/bfTvComplexToVectorImageCastFilterTest.tif
......
......@@ -40,7 +40,7 @@ otb_add_test(NAME bfTuImageToPointSetFilterTest COMMAND otbPointSetTestDriver
otb_add_test(NAME bfTvTransformPointSetFilter COMMAND otbPointSetTestDriver
otbTransformPointSetFilterTest)
otb_add_test(NAME feTuThresholdImageToPointSet1 COMMAND otbPointSetTestDriver
otb_add_test(NAME feTvThresholdImageToPointSet1 COMMAND otbPointSetTestDriver
--compare-ascii ${EPSILON_3} ${BASELINE_FILES}/feThresholdImageToPointSet_Threshold_0To255.txt
${TEMP}/feThresholdImageToPointSet_Threshold_0To255.txt
otbThresholdImageToPointSetTest
......@@ -48,7 +48,7 @@ otb_add_test(NAME feTuThresholdImageToPointSet1 COMMAND otbPointSetTestDriver
${TEMP}/feThresholdImageToPointSet_Threshold_0To255.txt
0 255 )
otb_add_test(NAME feTuThresholdImageToPointSet2 COMMAND otbPointSetTestDriver
otb_add_test(NAME feTvThresholdImageToPointSet2 COMMAND otbPointSetTestDriver
--compare-ascii ${EPSILON_3} ${BASELINE_FILES}/feThresholdImageToPointSet_Threshold_0To0.txt
${TEMP}/feThresholdImageToPointSet_Threshold_0To0.txt
otbThresholdImageToPointSetTest
......@@ -56,7 +56,7 @@ otb_add_test(NAME feTuThresholdImageToPointSet2 COMMAND otbPointSetTestDriver
${TEMP}/feThresholdImageToPointSet_Threshold_0To0.txt
0 0 )
otb_add_test(NAME feTuThresholdImageToPointSet3 COMMAND otbPointSetTestDriver
otb_add_test(NAME feTvThresholdImageToPointSet3 COMMAND otbPointSetTestDriver
--compare-ascii ${EPSILON_3} ${BASELINE_FILES}/feThresholdImageToPointSet_Threshold_255To255.txt
${TEMP}/feThresholdImageToPointSet_Threshold_255To255.txt
otbThresholdImageToPointSetTest
......@@ -64,7 +64,7 @@ otb_add_test(NAME feTuThresholdImageToPointSet3 COMMAND otbPointSetTestDriver
${TEMP}/feThresholdImageToPointSet_Threshold_255To255.txt
255 255 )
otb_add_test(NAME feTuThresholdImageToPointSet4 COMMAND otbPointSetTestDriver
otb_add_test(NAME feTvThresholdImageToPointSet4 COMMAND otbPointSetTestDriver
--compare-ascii ${EPSILON_3} ${BASELINE_FILES}/feThresholdImageToPointSet_Threshold_1To200.txt
${TEMP}/feThresholdImageToPointSet_Threshold_1To200.txt
otbThresholdImageToPointSetTest
......
......@@ -19,7 +19,11 @@
#define __otbPipelineMemoryPrintCalculator_h
#include "itkProcessObject.h"
#if ITK_VERSION_MAJOR < 4 || (ITK_VERSION_MAJOR == 4 && ITK_VERSION_MINOR <= 8)
#include "itksys/FundamentalType.h"
#else
#include "itk_kwiml.h"
#endif
#include <set>
namespace otb
......@@ -75,7 +79,11 @@ public:
typedef ProcessObjectType::Pointer ProcessObjectPointerType;
typedef itk::DataObject DataObjectType;
typedef DataObjectType::Pointer DataObjectPointerType;
#if ITK_VERSION_MAJOR < 4 || (ITK_VERSION_MAJOR == 4 && ITK_VERSION_MINOR <= 8)
typedef ::itksysFundamentalType_UInt64 MemoryPrintType;
#else
typedef KWIML_INT_uint64_t MemoryPrintType;
#endif
typedef std::set<const ProcessObjectType *> ProcessObjectPointerSetType;
/** Run-time type information (and related methods). */
......
......@@ -71,7 +71,7 @@ otb_add_test(NAME bfTvPolygonCompacityFunctor COMMAND otbVectorDataManipulationT
${TEMP}/bfPolygonCompacityFunctorTest.txt
)
otb_add_test(NAME bfTuVectorDataToRandomLineGenerator COMMAND otbVectorDataManipulationTestDriver
otb_add_test(NAME bfTvVectorDataToRandomLineGenerator COMMAND otbVectorDataManipulationTestDriver
--compare-ogr ${NOTOL}
${BASELINE_FILES}/bfTvVectorDataToRandomLineGeneratorOutput.shp
${TEMP}/bfTvVectorDataToRandomLineGeneratorOutput.shp
......
......@@ -441,11 +441,14 @@ bool GDALImageIO::GetSubDatasetInfo(std::vector<std::string> &names, std::vector
char** papszMetadata;
papszMetadata = m_Dataset->GetDataSet()->GetMetadata("SUBDATASETS");
std::cout << m_Dataset->GetDataSet()->GetDriver()->GetDescription() << std::endl;
// Have we find some dataSet ?
// This feature is supported only for hdf4 and hdf5 file (regards to the bug 270)
if ( (CSLCount(papszMetadata) > 0) &&
( (strcmp(m_Dataset->GetDataSet()->GetDriver()->GetDescription(),"HDF4") == 0) ||
(strcmp(m_Dataset->GetDataSet()->GetDriver()->GetDescription(),"HDF5") == 0) ) )
(strcmp(m_Dataset->GetDataSet()->GetDriver()->GetDescription(),"HDF5") == 0) ||
(strcmp(m_Dataset->GetDataSet()->GetDriver()->GetDescription(),"SENTINEL2") == 0) ) )
{
for (int cpt = 0; papszMetadata[cpt] != NULL; ++cpt)
{
......
......@@ -560,9 +560,14 @@ bool writeReadDatasetMetadata(std::string filename, std::vector<std::string> opt
}
poBand = poDstDS->GetRasterBand(1);
poBand->RasterIO( GF_Write, 0, 0, 128, 128,
abyRaster, 128, 128, GDT_Byte, 0, 0 );
const OGRErr errRasterIO = poBand->RasterIO( GF_Write, 0, 0, 128, 128,
abyRaster, 128, 128, GDT_Byte, 0, 0 );
if (errRasterIO != OGRERR_NONE)
{
std::cerr << "Unable to write image data." << std::endl;
return false;
}
// Get some information from dataset
infoDatasetCreate->m_Name = "Create";
......
......@@ -17,6 +17,7 @@
=========================================================================*/
#include "gdal_priv.h"
#include "ogr_core.h"
#include <iostream>
#include <complex>
......@@ -54,7 +55,7 @@ int otbGDALReadPxlComplexGeneric(int argc, char * argv[])
poDataset = (GDALDataset *) GDALOpen( argv[1], GA_ReadOnly );
if( poDataset == NULL )
return EXIT_FAILURE;
return EXIT_FAILURE;
// Get some information from file
int nbBand = poDataset->GetRasterCount();
......@@ -72,7 +73,7 @@ int otbGDALReadPxlComplexGeneric(int argc, char * argv[])
std::cout << "**** METHOD 1 : Use RasterIO to read all selected data in file ****" << std::endl;
std::streamoff nbBytes = static_cast<std::streamoff>(nbBand) * static_cast<std::streamoff>(nbPixelToRead) * static_cast<std::streamoff>(bytePerPixel);
std::cout << "nbBytes of the buffer = " << nbBytes << " = " \
<< nbBand << " x " << nbPixelToRead << " x " << bytePerPixel<< std::endl;
<< nbBand << " x " << nbPixelToRead << " x " << bytePerPixel<< std::endl;
char * loadBuffer = new char[static_cast<unsigned int>(nbBytes)];
......@@ -132,9 +133,15 @@ int otbGDALReadPxlComplexGeneric(int argc, char * argv[])
{
poBand = poDataset->GetRasterBand( itBand +1 );
poBand->RasterIO( GF_Read, posX, posY, sizeX, sizeY,
&(pPixelValue[itBand*nbPixelToRead]), sizeX, sizeY, poBand->GetRasterDataType(),
0, 0 );
OGRErr errRasterIO = poBand->RasterIO( GF_Read, posX, posY, sizeX, sizeY,
&(pPixelValue[itBand*nbPixelToRead]), sizeX, sizeY, poBand->GetRasterDataType(),
0, 0 );
if (errRasterIO != OGRERR_NONE)
{
std::cerr << "Unable to read image data." << std::endl;
return EXIT_FAILURE;
}
for (unsigned int itPxl = 0; itPxl < (unsigned int) nbPixelToRead; itPxl++)
{
......
......@@ -173,7 +173,7 @@ otb_add_test(NAME raTvSarBrightnessToImageWithComplexPixelFilter COMMAND otbSAR
1000 1000 250 250 # Extract
)
otb_add_test(NAME raTuSarParametricMapFunction COMMAND otbSARCalibrationTestDriver
otb_add_test(NAME raTvSarParametricMapFunction COMMAND otbSARCalibrationTestDriver
--compare-ascii ${NOTOL}
${BASELINE_FILES}/raTvSarParametricMapFunctionOutputAscii.txt
${TEMP}/raTvSarParametricMapFunctionOutputAscii.txt
......
......@@ -173,7 +173,14 @@ PersistentImageToOGRDataFilter<TImage>
//Copy features contained in the memory layer (srcLayer) in the output layer
itk::TimeProbe chrono;
chrono.Start();
dstLayer.ogr().StartTransaction();
OGRErr err = dstLayer.ogr().StartTransaction();
if (err != OGRERR_NONE)
{
itkExceptionMacro(<< "Unable to start transaction for OGR layer " << dstLayer.ogr().GetName() << ".");
}
OGRLayerType::const_iterator featIt = srcLayer.begin();
for(; featIt!=srcLayer.end(); ++featIt)
{
......@@ -182,10 +189,15 @@ PersistentImageToOGRDataFilter<TImage>
dstLayer.CreateFeature( dstFeature );
}
dstLayer.ogr().CommitTransaction();
err = dstLayer.ogr().CommitTransaction();
if (err != OGRERR_NONE)
{
itkExceptionMacro(<< "Unable to commit transaction for OGR layer " << dstLayer.ogr().GetName() << ".");
}
chrono.Stop();
otbMsgDebugMacro(<< "write ogr tile took " << chrono.GetTotal() << " sec");
}
template<class TImage>
......
......@@ -144,16 +144,29 @@ PersistentImageToOGRLayerFilter<TImage>
//Copy features contained in the memory layer (srcLayer) in the output layer
itk::TimeProbe chrono;
chrono.Start();
m_OGRLayer.ogr().StartTransaction();
OGRErr err = m_OGRLayer.ogr().StartTransaction();
if (err != OGRERR_NONE)
{
itkExceptionMacro(<< "Unable to start transaction for OGR layer " << m_OGRLayer.ogr().GetName() << ".");
}
OGRLayerType::const_iterator featIt = srcLayer.begin();
for(; featIt!=srcLayer.end(); ++featIt)
{
OGRFeatureType dstFeature(m_OGRLayer.GetLayerDefn());
dstFeature.SetFrom( *featIt, TRUE );
m_OGRLayer.CreateFeature( dstFeature );
}
{
OGRFeatureType dstFeature(m_OGRLayer.GetLayerDefn());
dstFeature.SetFrom( *featIt, TRUE );
m_OGRLayer.CreateFeature( dstFeature );
}
err = m_OGRLayer.ogr().CommitTransaction();
if (err != OGRERR_NONE)
{
itkExceptionMacro(<< "Unable to commit transaction for OGR layer " << m_OGRLayer.ogr().GetName() << ".");
}
m_OGRLayer.ogr().CommitTransaction();
chrono.Stop();
otbMsgDebugMacro(<< "write ogr tile took " << chrono.GetTotal() << " sec");
......
......@@ -127,7 +127,13 @@ OGRLayerStreamStitchingFilter<TInputImage>
for(unsigned int x=1; x<=nbColStream; x++)
{
m_OGRLayer.ogr().StartTransaction();
OGRErr errStart = m_OGRLayer.ogr().StartTransaction();
if (errStart != OGRERR_NONE)
{
itkExceptionMacro(<< "Unable to start transaction for OGR layer " << m_OGRLayer.ogr().GetName() << ".");
}
for(unsigned int y=1; y<=nbRowStream; y++)
{
......@@ -351,14 +357,28 @@ OGRLayerStreamStitchingFilter<TInputImage>
progress.CompletedPixel();
} //end for x
m_OGRLayer.ogr().CommitTransaction();
if(m_OGRLayer.ogr().TestCapability("Transactions"))
{
OGRErr errCommitX = m_OGRLayer.ogr().CommitTransaction();
if (errCommitX != OGRERR_NONE)
{
itkExceptionMacro(<< "Unable to commit transaction for OGR layer " << m_OGRLayer.ogr().GetName() << ".");
}
}
} //end for y
m_OGRLayer.ogr().CommitTransaction();
if(m_OGRLayer.ogr().TestCapability("Transactions"))
{
const OGRErr errCommitY = m_OGRLayer.ogr().CommitTransaction();
if (errCommitY != OGRERR_NONE)
{
itkWarningMacro(<< "Unable to commit transaction for OGR layer " << m_OGRLayer.ogr().GetName() << ". Gdal error code " << errCommitY << "." << std::endl);
}
}
}
template<class TImage>
void
OGRLayerStreamStitchingFilter<TImage>
......
......@@ -11,7 +11,7 @@ otb_module_target_label(otbOGRProcessingTestDriver)
# Tests Declaration
otb_add_test(NAME obTuOGRLayerStreamStitchingFilter COMMAND otbOGRProcessingTestDriver
otb_add_test(NAME obTvOGRLayerStreamStitchingFilter COMMAND otbOGRProcessingTestDriver
--compare-ogr ${EPSILON_8}
${BASELINE_FILES}/obTvFusionOGRTile.shp
${TEMP}/obTvFusionOGRTile.shp
......
project(OTBGLFW)
set(OTBGLFW_THIRD_PARTY 1)
set(OTBGLFW_SYSTEM_INCLUDE_DIRS ${GLFW_INCLUDE_DIR})
set(OTBGLFW_LIBRARIES ${GLFW_LIBRARY})
otb_module_impl()
find_package(GLFW REQUIRED)
mark_as_advanced(GLFW_INCLUDE_DIR)
mark_as_advanced(GLFW_LIBRARY)
if(NOT GLFW_FOUND)
message(FATAL_ERROR "Cannot find GLFW. Set GLFW_INCLUDE_DIR and GLFW_LIBRARY")
endif()
set(DOCUMENTATION "This module imports GLFW to the build system")
otb_module(OTBGLFW
DEPENDS
TEST_DEPENDS
DESCRIPTION
"${DOCUMENTATION}"
)
otb_module_activation_option("Enable GLFW dependent modules" OFF)
project(OTBGlew)
set(OTBGlew_THIRD_PARTY 1)
set(OTBGlew_SYSTEM_INCLUDE_DIRS ${GLEW_INCLUDE_PATH})
set(OTBGlew_LIBRARIES ${GLEW_LIBRARY})
otb_module_impl()
find_package(GLEW REQUIRED)
mark_as_advanced(GLEW_INCLUDE_DIR)
mark_as_advanced(GLEW_LIBRARY)
if(NOT GLEW_FOUND)
message(FATAL_ERROR "Cannot find Glew. Set GLEW_INCLUDE_DIR and GLEW_LIBRARY")