From 73a84b93734e5dfa2145261168f29a0c413cab32 Mon Sep 17 00:00:00 2001 From: vsr Date: Fri, 19 Mar 2021 10:43:23 +0300 Subject: [PATCH] Maintain aliases for product names (med-fichier as alias for medfile) --- cmake/FindSalomeMEDFile.cmake | 2 +- cmake/SalomeMacros.cmake | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/cmake/FindSalomeMEDFile.cmake b/cmake/FindSalomeMEDFile.cmake index bb5e0de..6676389 100644 --- a/cmake/FindSalomeMEDFile.cmake +++ b/cmake/FindSalomeMEDFile.cmake @@ -24,7 +24,7 @@ # !! Please read the generic detection procedure in SalomeMacros.cmake !! # -SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(MEDFile MEDFILE_INCLUDE_DIRS 1) +SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(MEDFile MEDFILE_INCLUDE_DIRS 1 NAMES med-fichier) #MARK_AS_ADVANCED() SET(MED_INT_IS_LONG FALSE) # fallback value diff --git a/cmake/SalomeMacros.cmake b/cmake/SalomeMacros.cmake index 33078a9..e1df8ce 100644 --- a/cmake/SalomeMacros.cmake +++ b/cmake/SalomeMacros.cmake @@ -426,12 +426,14 @@ MACRO(SALOME_FIND_PACKAGE englobPkg stdPkg mode) IF(${englobPkg}_FIND_COMPONENTS) FIND_PACKAGE(${stdPkg} ${${englobPkg}_FIND_VERSION} ${_tmp_exact} NO_MODULE ${_tmp_quiet} ${_tmp_req} COMPONENTS ${${englobPkg}_FIND_COMPONENTS} + NAMES ${stdPkg} ${SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS_NAMES} PATH_SUFFIXES "salome_adm/cmake_files" "adm_local/cmake_files" "adm/cmake" NO_CMAKE_BUILDS_PATH NO_CMAKE_PACKAGE_REGISTRY NO_CMAKE_SYSTEM_PACKAGE_REGISTRY NO_CMAKE_SYSTEM_PATH NO_SYSTEM_ENVIRONMENT_PATH) ELSE() FIND_PACKAGE(${stdPkg} ${${englobPkg}_FIND_VERSION} ${_tmp_exact} NO_MODULE ${_tmp_quiet} ${_tmp_req} + NAMES ${stdPkg} ${SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS_NAMES} PATH_SUFFIXES "salome_adm/cmake_files" "adm_local/cmake_files" "adm/cmake" NO_CMAKE_BUILDS_PATH NO_CMAKE_PACKAGE_REGISTRY NO_CMAKE_SYSTEM_PACKAGE_REGISTRY NO_CMAKE_SYSTEM_PATH NO_SYSTEM_ENVIRONMENT_PATH) @@ -495,7 +497,7 @@ MACRO(SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS pkg referenceVariable upCount) ## ## 0. Initialization ## - PARSE_ARGUMENTS(SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS "ENVVAR" "" ${ARGN}) + PARSE_ARGUMENTS(SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS "ENVVAR;NAMES" "" ${ARGN}) # Package name, upper case STRING(TOUPPER ${pkg} pkg_UC) -- 2.39.2