1 ###############################################################################
3 # mitkFunctionCreateWhitelistPaths
5 #! Creates advanced cache variables for setting the internal and external
6 #! whitelist directories.
11 #! mitkFunctionCreateWhitelistPaths(<prefix>)
14 #! The <prefix> parameter specifies the prefix used for the created variables
15 #! <prefix>_WHITELISTS_INTERNAL_PATH and <prefix>_WHITELISTS_EXTERNAL_PATH.
18 #! <prefix>_WHITELISTS_INTERNAL_PATH = <prefix>_SOURCE_DIR/CMake/Whitelists
19 #! <prefix>_WHITELISTS_EXTERNAL_PATH = %HOME%/.mitk/Whitelists
21 #! List of variables available after the function is called:
22 #! - <prefix>_WHITELISTS_INTERNAL_PATH
23 #! - <prefix>_WHITELISTS_EXTERNAL_PATH
26 #! \param <prefix> The prefix of the created cache variables.
28 ###############################################################################
31 set(${ARGV0}_WHITELISTS_INTERNAL_PATH
"${${ARGV0}_SOURCE_DIR}/CMake/Whitelists" CACHE PATH
"")
32 set(${ARGV0}_WHITELISTS_EXTERNAL_PATH
".mitk/Whitelists")
35 set(${ARGV0}_WHITELISTS_EXTERNAL_PATH
"$ENV{HOMEDRIVE}$ENV{HOMEPATH}/${${ARGV0}_WHITELISTS_EXTERNAL_PATH}")
37 set(${ARGV0}_WHITELISTS_EXTERNAL_PATH
"$ENV{HOME}/${${ARGV0}_WHITELISTS_EXTERNAL_PATH}")
40 FILE(TO_CMAKE_PATH "${${ARGV0}_WHITELISTS_EXTERNAL_PATH}
" ${ARGV0}_WHITELISTS_EXTERNAL_PATH)
42 set(${ARGV0}_WHITELISTS_EXTERNAL_PATH "${${ARGV0}_WHITELISTS_EXTERNAL_PATH}
" CACHE PATH "")
45 ${ARGV0}_WHITELISTS_INTERNAL_PATH
46 ${ARGV0}_WHITELISTS_EXTERNAL_PATH
50 ###############################################################################
52 # mitkFunctionFindWhitelists
54 #! Adds all whitelists found in specfied whitelist paths to the advanced cache
55 #! variable <prefix>_WHITELIST as enumeration entries.
60 #! mitkFunctionFindWhitelists(<prefix>)
63 #! The <prefix> parameter specifies the prefix used for the created
64 #! cache variable <prefix>_WHITELIST. Its default value is "None
".
65 #! The function mitkFunctionCreateWhitelistPaths must be called
66 #! with the same <prefix> prior to this function.
68 #! Whitelists are *.cmake files which set the two list variables
69 #! enabled_modules and enabled_plugins.
71 #! List of variables available after the function is called:
72 #! - <prefix>_WHITELIST
74 #! \sa mitkFunctionCreateWhitelistPaths
77 #! \param <prefix> The prefix of the created cache variable.
79 ###############################################################################
81 function(mitkFunctionFindWhitelists)
82 set(whitelists "None
")
84 file(GLOB internalWhitelistFiles "${${ARGV0}_WHITELISTS_INTERNAL_PATH}
mitkFunctionCreateWhitelistPaths()