diff --git a/CMakeLists.txt b/CMakeLists.txt index 9c2e80d8112fada71992c02d9d39ad9de3e47602..5f697fe64d335f1c725380472b4e319b25a114c8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -69,7 +69,8 @@ endif() #---------------------------------------------------------------------------- # Orfeo ToolBox -find_package(OTB REQUIRED) +find_package(OTB REQUIRED + COMPONENTS OTBApplicationEngine OTBQtWidget OTBImageIO OTBVectorDataIO OTBTestKernel OTBCarto) if(OTB_FOUND) include(${OTB_USE_FILE}) else(OTB_FOUND) @@ -140,8 +141,8 @@ endif(Mercurial_FOUND) #---------------------------------------------------------------------------- #Build shared libraries for monteverdi #By default, import the option from the OTB configuration -OPTION(BUILD_SHARED_LIBS "Build shared libraries" ON) +set(BUILD_SHARED_LIBS ${OTB_BUILD_SHARED}) #---------------------------------------------------------------------------- # Configure the default OTB_DATA_ROOT for the location of OTB Data. find_path(OTB_DATA_ROOT README-OTB-Data $ENV{OTB_DATA_ROOT})