Salome HOME
Synchronize adm files
[tools/documentation.git] / CMakeModules / SalomeMacros.cmake
index 6b43e227759ef3eef39db7ea4ebc9f7c7568242e..25a22bdf70988080f3b5b93572d375bdedb1826f 100644 (file)
@@ -503,7 +503,9 @@ MACRO(SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS pkg referenceVariable upCount)
   
   # Override the variable - don't append to it, as it would give precedence
   # to what was stored there before!  
-  SET(CMAKE_PREFIX_PATH "${${pkg_UC}_ROOT_DIR}")
+  IF(DEFINED ${pkg_UC}_ROOT_DIR)
+    SET(CMAKE_PREFIX_PATH "${${pkg_UC}_ROOT_DIR}")
+  ENDIF()
     
   # Try find_package in config mode. This has the priority, but is 
   # performed QUIET and not REQUIRED: