Salome HOME
Synchronize adm files
authormnt <mnt@opencascade.com>
Thu, 26 May 2016 18:11:45 +0000 (21:11 +0300)
committermnt <mnt@opencascade.com>
Thu, 26 May 2016 18:11:45 +0000 (21:11 +0300)
CMakeModules/SalomeMacros.cmake

index f78ffe4ac1c29134793b733015d5b61dc6f4b781..2581731420f9d8092bfd2715bda386be8949f0ea 100644 (file)
@@ -563,8 +563,13 @@ MACRO(SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS pkg referenceVariable upCount)
        #  Note the double de-reference of "referenceVariable":
        SET(_tmp_ROOT_DIR "${${referenceVariable}}")
     ENDIF()
-    IF(${upCount}) 
-      FOREACH(_unused RANGE 1 ${upCount})        
+    # Up cound can be reset by detection procedure
+    SET(_upCount ${upCount})
+    IF(DEFINED ${pkg_UC}_UPCOUNT)
+      SET(_upCount ${${pkg_UC}_UPCOUNT})
+    ENDIF()
+    IF(${_upCount}) 
+      FOREACH(_unused RANGE 1 ${_upCount})        
         GET_FILENAME_COMPONENT(_tmp_ROOT_DIR "${_tmp_ROOT_DIR}" PATH)
       ENDFOREACH()
     ENDIF()