From 6da051e1a82832b791c843a6b8187de6539500b4 Mon Sep 17 00:00:00 2001 From: kervala Date: Sat, 18 Aug 2018 11:12:47 +0200 Subject: [PATCH] Changed: New macro FIX_PACKAGE_OPTIONS --HG-- branch : develop --- code/CMakeModules/FindHelpers.cmake | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/code/CMakeModules/FindHelpers.cmake b/code/CMakeModules/FindHelpers.cmake index 874555820..ab8df32a6 100644 --- a/code/CMakeModules/FindHelpers.cmake +++ b/code/CMakeModules/FindHelpers.cmake @@ -38,6 +38,21 @@ MACRO(PARSE_VERSION_OTHER FILENAME) ENDIF() ENDMACRO() +# macro to define FIND_PACKAGE options with a different package name +MACRO(FIX_PACKAGE_OPTIONS OLDNAME NEWNAME) + # append other options if needed + SET(_OPTIONS COMPONENTS REQUIRED QUIETLY) + + # process each options + FOREACH(_OPTION ${_OPTIONS}) + SET(OLD_OPTION ${OLDNAME}_FIND_${_OPTION}) + IF(DEFINED ) + SET(NEW_OPTION ${NEWNAME}_FIND_${_OPTION}) + SET(${NEW_OPTION} ${OLD_OPTION}) + ENDIF() + ENDFOREACH() +ENDMACRO() + MACRO(FIND_PACKAGE_HELPER NAME INCLUDE) # Looks for a directory containing NAME. #