2 # mitkFunctionCheckMitkCompatibility(VERSIONS [<version_name> <minimum_required_version>]... [REQUIRED])
5 # mitkFunctionCheckMitkCompatibility(VERSIONS MITK_VERSION_PLUGIN_SYSTEM 1 REQUIRED)
9 cmake_parse_arguments(_COMPAT
"REQUIRED" "" "VERSIONS" ${ARGN})
11 set(_is_version_name 1)
12 foreach(_item ${_COMPAT_VERSIONS})
14 set(_is_version_name 0)
15 set(_version_name ${_item})
16 if(NOT ${_version_name})
17 set(_msg_version_name_not_defined
"Your MITK version is too old (${_version_name} not defined)")
19 message(SEND_ERROR "${_msg_version_name_not_defined}
")
21 message(WARNING "${_msg_version_name_not_defined}
")
25 set(_is_version_name 1)
27 set(_required_version ${_item})
28 if(${_version_name} VERSION_LESS ${_required_version})
29 set(_msg_version_mismatch "Your MITK version is too old, ${_version_name} version ${_required_version} or higher required, but only version ${${_version_name}} present.
")
31 message(SEND_ERROR "${_msg_version_mismatch}
")
33 message(WARNING "${_msg_version_mismatch}
")
mitkFunctionCheckMitkCompatibility()