1 ############################################################################## 3 # @brief CMake package configuration use file. 5 # @note The MIRTKUse.cmake file is automatically generated 6 # by BASIS from the template file ConfigUse.cmake.in which is part of the 10 ############################################################################## 12 # ============================================================================ 14 # ============================================================================ 16 # prefix used for variable names 19 # allow caller to change
namespace - used by projects with modules
20 if (${NS}CONFIG_PREFIX)
21 set (NS
"${${NS}CONFIG_PREFIX}_")
24 # ============================================================================ 26 # ============================================================================ 28 if (__${NS}USE_FILE_INCLUDED)
31 set (__${NS}USE_FILE_INCLUDED 1)
34 # ============================================================================ 35 # use project settings 36 # ============================================================================ 39 if (${NS}INCLUDE_DIRS)
40 include_directories (${${NS}INCLUDE_DIRS})
41 elseif (${NS}INCLUDE_DIR)
42 include_directories (${${NS}INCLUDE_DIR})
46 if (${NS}LIBRARY_DIRS)
47 link_directories (${${NS}LIBRARY_DIRS})
48 elseif (${NS}LIBRARY_DIR)
49 link_directories (${${NS}LIBRARY_DIR})
52 # ============================================================================ 53 # import build targets 54 # ============================================================================ 56 ## @brief Whether to import the exported targets. 57 set (NO_${NS}IMPORTS
"${NO_${NS}IMPORTS}")
59 if (NOT NO_${NS}IMPORTS)
60 include (
"${${NS}EXPORTS_FILE}" OPTIONAL)
61 include (
"${${NS}CUSTOM_EXPORTS_FILE}" OPTIONAL)
64 # ============================================================================ 66 # ============================================================================ 68 foreach (M IN LISTS ${NS}MODULES_REQUESTED)
69 if (${NS}${M}_USE_FILE)
70 set (${M}_CONFIG_PREFIX
"${NS}${M}_")
71 include (
"${${NS}${M}_USE_FILE}")
72 unset (${M}_CONFIG_PREFIX)