Salome HOME
Windows compatibility.
[modules/yacs.git] / salome_adm / cmake_files / SalomeMacros.cmake
index 2f1b254eca397439f623da31ca01f5a563030230..cae6cbaba793e9ad3bc88a56d88f69fc126532f6 100644 (file)
@@ -507,7 +507,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 "${${_envvar}}")
+  IF(DEFINED ${_envvar})
+    SET(CMAKE_PREFIX_PATH "${${_envvar}}")
+  ENDIF()
     
   # Try find_package in config mode. This has the priority, but is 
   # performed QUIET and not REQUIRED:
@@ -942,7 +944,8 @@ MACRO(SALOME_CONFIGURE_PREPARE)
   FOREACH(_prereq IN LISTS _tmp_prereq)
     IF(${_prereq}_DIR)
       SET(_PREREQ_LIST "${_PREREQ_LIST} ${_prereq}")
-      SET(_PREREQ_DIR_LIST "${_PREREQ_DIR_LIST} \"${${_prereq}_DIR}\"")
+      FILE(TO_CMAKE_PATH ${${_prereq}_DIR} CURR_DIR)
+      SET(_PREREQ_DIR_LIST "${_PREREQ_DIR_LIST} \"${CURR_DIR}\"")
       SALOME_APPEND_LIST_OF_LIST(_PREREQ_COMPO_LIST Salome${_prereq}_COMPONENTS)
     ENDIF()
   ENDFOREACH()