From: vsr Date: Thu, 14 Jan 2016 13:24:59 +0000 (+0300) Subject: Fix problem with possible incorrect detection of native products due to overriding... X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ba69a9e46685aea6a0b559c759675958e18ccaec;p=modules%2Fyacs.git Fix problem with possible incorrect detection of native products due to overriding of the CMAKE_PREFIX_PATH. --- diff --git a/salome_adm/cmake_files/SalomeMacros.cmake b/salome_adm/cmake_files/SalomeMacros.cmake index 6b43e2277..1d05bc0b6 100644 --- a/salome_adm/cmake_files/SalomeMacros.cmake +++ b/salome_adm/cmake_files/SalomeMacros.cmake @@ -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 ENV{${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: