From: mpa Date: Thu, 31 Oct 2013 07:50:39 +0000 (+0000) Subject: CMake: Add for checking an argument that this is not a standard system path (starting... X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=577e214dc098dd8ab500a1bbb2c80578a4bd56fe;p=modules%2Fyacs.git CMake: Add for checking an argument that this is not a standard system path (starting with "/bin" and "/lib") --- diff --git a/salome_adm/cmake_files/SalomeMacros.cmake b/salome_adm/cmake_files/SalomeMacros.cmake index 658e3f688..38e29a210 100755 --- a/salome_adm/cmake_files/SalomeMacros.cmake +++ b/salome_adm/cmake_files/SalomeMacros.cmake @@ -680,10 +680,10 @@ MACRO(SALOME_ACCUMULATE_ENVIRONMENT envvar) IF(TARGET ${_item}) GET_TARGET_PROPERTY(_item ${_item} LOCATION) ENDIF() - GET_FILENAME_COMPONENT(_item ${_item} PATH) + GET_FILENAME_COMPONENT(_item ${_item} PATH) ENDIF() IF(EXISTS ${_item}) - STRING(REGEX MATCH "^/usr" _usr_find ${_item}) + STRING(REGEX MATCH "^(/usr|/lib|/bin)" _usr_find ${_item}) LIST(FIND _${PROJECT_NAME}_EXTRA_ENV_${envvar} ${_item} _res) IF(NOT _usr_find AND _res EQUAL -1) LIST(APPEND _${PROJECT_NAME}_EXTRA_ENV_${envvar} ${_item})