From 5b30f706e7e02b380d503b10a2192141a758f1de Mon Sep 17 00:00:00 2001
From: Rashad Kanavath <rashad.kanavath@c-s.fr>
Date: Tue, 24 Nov 2015 15:38:42 +0100
Subject: [PATCH] COMP: relative path to OTB/CMake/ should not be used when
 building examples asstandalone

---
 Examples/CMakeLists.txt | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/Examples/CMakeLists.txt b/Examples/CMakeLists.txt
index f27eef36c1..d8b583a5e3 100644
--- a/Examples/CMakeLists.txt
+++ b/Examples/CMakeLists.txt
@@ -15,8 +15,6 @@ if(PROJECT_NAME STREQUAL "OTBExamples")
     include(CTest)
   endif()
 
-  include(${CMAKE_CURRENT_SOURCE_DIR}/../CMake/OTBManageLargeInputPaths.cmake)
-
   # dashboard build. Why do I need to see the deprecated warnings on dashboard!
   # It just fades the actual warnings and most importantly very annoying.
   if(NOT "$ENV{DASHBOARD_TEST_FROM_CTEST}" STREQUAL "")
@@ -93,6 +91,10 @@ if(PROJECT_NAME STREQUAL "OTBExamples")
   endfunction()
 
   ########################## end copied from OTB/CMakeLists.txt ##########################
+else()
+
+  #Examples that require large input cannot be enabled when building as standalone
+  include(${CMAKE_CURRENT_SOURCE_DIR}/../CMake/OTBManageLargeInputPaths.cmake)
 
 endif()
 
-- 
GitLab