cmake: workaround for dependencies resolver (bypass non-module deps w/o check)
authorAlexander Alekhin <alexander.alekhin@itseez.com>
Wed, 2 Oct 2013 22:20:54 +0000 (02:20 +0400)
committerAlexander Alekhin <alexander.alekhin@itseez.com>
Wed, 9 Oct 2013 13:49:10 +0000 (17:49 +0400)
cmake/OpenCVModule.cmake

index 7772476..86ce881 100644 (file)
@@ -312,11 +312,16 @@ function(__ocv_resolve_dependencies)
       set(__deps ${OPENCV_MODULE_${m}_REQ_DEPS} ${OPENCV_MODULE_${m}_PRIVATE_REQ_DEPS})
       while(__deps)
         ocv_list_pop_front(__deps d)
-        if(NOT (HAVE_${d} OR TARGET ${d} OR EXISTS ${d}))
-#          message(STATUS "Module ${m} disabled because ${d} dependency can't be resolved!")
-          __ocv_module_turn_off(${m})
-          set(has_changes ON)
-          break()
+        string(TOLOWER "${d}" upper_d)
+        if(NOT (HAVE_${d} OR HAVE_${upper_d} OR TARGET ${d} OR EXISTS ${d}))
+          if(d MATCHES "^opencv_") # TODO Remove this condition in the future and use HAVE_ variables only
+            message(STATUS "Module ${m} disabled because ${d} dependency can't be resolved!")
+            __ocv_module_turn_off(${m})
+            set(has_changes ON)
+            break()
+          else()
+            message(STATUS "Assume that non-module dependency is available: ${d} (for module ${m})")
+          endif()
         endif()
       endwhile()
     endforeach()