Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
otb
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sébastien Peillet
otb
Commits
2c11b543
Commit
2c11b543
authored
9 years ago
by
Rashad Kanavath
Browse files
Options
Downloads
Patches
Plain Diff
BUG: use find_package(.. COMPONENTS) to check all required modules when buiding as standalone
parent
29b9f425
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Examples/CMakeLists.txt
+16
-15
16 additions, 15 deletions
Examples/CMakeLists.txt
with
16 additions
and
15 deletions
Examples/CMakeLists.txt
+
16
−
15
View file @
2c11b543
...
...
@@ -9,6 +9,7 @@ if(NOT PROJECT_NAME)
endif
()
#check if this is a standalone build?
if
(
PROJECT_NAME STREQUAL
"OTBExamples"
)
if
(
BUILD_TESTING
)
include
(
CTest
)
...
...
@@ -80,27 +81,27 @@ if(PROJECT_NAME STREQUAL "OTBExamples")
########################## end copied from OTB/CMakeLists.txt ##########################
set
(
OTB_BUILD_DEFAULT_MODULES ON
)
#must be updated for new modules!
set
(
REQUIRED_MODULES
"OTB6S;OTBITK;OTBAnomalyDetection;OTBBoost;OTBCommon;OTBGDAL;OTBOpenThreads;OTBOssim;OTBGeoTIFF;OTBOssimPlugins;OTBOSSIMAdapters;OTBObjectList;OTBMetadata;OTBImageBase;OTBBoostAdapters;OTBGdalAdapters;OTBTinyXML;OTBVectorDataBase;OTBIOGDAL;OTBExtendedFilename;OTBIOBSQ;OTBIOLUM;OTBIOMSTAR;OTBIOMW;OTBIOONERA;OTBIORAD;OTBCurl;OTBCurlAdapters;OTBIOTileMap;OTBStreaming;OTBImageIO;OTBInterpolation;OTBTransform;OTBImageManipulation;OTBTestKernel;OTBPath;OTBVectorDataManipulation;OTBProjection;OTBlibkml;OTBIOKML;OTBVectorDataIO;OTBApplicationEngine;OTBStatistics;OTBChangeDetection;OTBAppChangeDetection;OTBCommandLine;OTBColorMap;OTBMoments;OTBLabelMap;OTBConversion;OTBFuzzy;OTBMuParser;OTBMathParser;OTBSupervised;OTBDempsterShafer;OTBIOXML;OTBIndices;OTBMajorityVoting;OTBSOM;OTBAppClassification;OTBPointSet;OTBSiftFast;OTBDescriptors;OTBAppDescriptors;OTBDimensionalityReduction;OTBAppDimensionalityReduction;OTBSpatialObjects;OTBEdge;OTBAppEdge;OTBImageNoise;OTBAppFiltering;OTBConvolution;OTBPanSharpening;OTBAppFusion;OTBEndmembersExtraction;OTBWavelet;OTBUnmixing;OTBAppHyperspectral;OTBCarto;OTBAppImageUtils;OTBAppIndices;OTBKMZWriter;OTBAppKMZ;OTBAppMathParser;OTBMuParserX;OTBMathParserX;OTBAppMathParserX;OTBAppMoments;OTBAppMorphology;OTBOpticalCalibration;OTBAppOpticalCalibration;OTBAppProjection;OTBSARCalibration;OTBAppSARCalibration;OTBCCOBIA;OTBSmoothing;OTBMeanShift;OTBMetrics;OTBMorphologicalProfiles;OTBLabelling;OTBOGRProcessing;OTBWatersheds;OTBAppSegmentation;OTBDEM;OTBStereo;OTBDisparityMap;OTBAppStereo;OTBAppTest;OTBTextures;OTBAppTextures;OTBAppVectorDataTranslation;OTBAppVectorUtils;OTBCommandLineParser;OTBOpenThreadsAdapters;OTBCloudDetection;OTBComplexImage;OTBCorner;OTBDensity;OTBDisplacementField;OTBLandSatClassifier;OTBLearningBase;OTBMarkov;OTBMorphologicalPyramid;OTBObjectDetection;OTBPolarimetry;OTBRoadExtraction;OTBRCC8;OTBSWIGWrapper;OTBSeamCarving;OTBSimulation;OTBTimeSeries;OTBUrbanArea"
)
find_package
(
OTB REQUIRED COMPONENTS
${
REQUIRED_MODULES
}
)
include
(
${
OTB_USE_FILE
}
)
message
(
STATUS
"Found OTB:
${
OTB_USE_FILE
}
"
)
else
()
if
(
NOT OTB_BUILD_DEFAULT_MODULES
)
message
(
FATAL_ERROR
"BUILD_EXAMPLES requires OTB_BUILD_DEFAULT_MODULES to be ON"
)
endif
()
# We also need to prevent any OTB_USE_XXX option to be OFF (except mapnik and openjpeg)
# For now we parse module activation list and test if option is ON. If not the cmake configuration stop.
#TODO We should provide a better mechanism here wich will deactivate only examples required by deactivated options.
foreach
(
_activationOption
${
OTB_MODULE_ACTIVATION_OPTION_LIST
}
)
if
(
NOT
${
_activationOption
}
AND NOT
"x
${
_activationOption
}
"
STREQUAL
"xOTB_USE_MAPNIK"
AND NOT
"x
${
_activationOption
}
"
STREQUAL
"xOTB_USE_OPENJPEG"
)
message
(
FATAL_ERROR
"BUILD_EXAMPLES requires
${
_activationOption
}
to be ON"
)
endif
()
endforeach
()
endif
()
# We also need to prevent any OTB_USE_XXX option to be OFF (except mapnik and openjpeg)
# For now we parse module activation list and test if option is ON. If not the cmake configuration stop.
#TODO We should provide a better mechanism here wich will deactivate only examples required by deactivated options.
foreach
(
_activationOption
${
OTB_MODULE_ACTIVATION_OPTION_LIST
}
)
if
(
NOT
${
_activationOption
}
AND NOT
"x
${
_activationOption
}
"
STREQUAL
"xOTB_USE_MAPNIK"
AND NOT
"x
${
_activationOption
}
"
STREQUAL
"xOTB_USE_OPENJPEG"
)
message
(
FATAL_ERROR
"BUILD_EXAMPLES requires
${
_activationOption
}
to be ON"
)
endif
()
endforeach
()
find_package
(
OTB REQUIRED
)
include
(
${
OTB_USE_FILE
}
)
message
(
STATUS
"Found OTB:
${
OTB_USE_FILE
}
"
)
set
(
OTB_TEST_DRIVER otbTestDriver
)
if
(
OTBApplicationEngine_LOADED
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment