1 # ============================================================================ 2 # Copyright (c) 2015 <provider-name> 5 # See COPYING file for license information. 6 # ============================================================================ 8 ############################################################################## 10 # @brief CMake package configuration use file. 12 # @note The grlUse.cmake file is automatically generated 13 # by BASIS from the template file ConfigUse.cmake.in which is part of 16 # In the default package use file of BASIS, which can be included here using 17 # the \@BASIS_USE\@ variable, the prefix used by the package configuration 18 # file is defined as @c NS variable. Thus, to use any variable set by the 19 # corresponding package configuration file, use code similar to: 22 # include_directories (${${NS}INCLUDE_DIRS}) 25 # See the ConfigUse.cmake.in file of BASIS for details. 27 # @note The CMake code which is substituted for the \@BASIS_USE\@ variable 28 # contains an include guard. 30 # @ingroup BasisConfig 31 ############################################################################## 33 # ============================================================================ 35 # ============================================================================ 37 # prefix used for variable names 40 # allow caller to change
namespace - used by projects with modules
41 if (${NS}CONFIG_PREFIX)
42 set (NS
"${${NS}CONFIG_PREFIX}_")
45 # ============================================================================ 47 # ============================================================================ 49 if (__${NS}USE_FILE_INCLUDED)
52 set (__${NS}USE_FILE_INCLUDED 1)
55 # ============================================================================ 56 # use project settings 57 # ============================================================================ 60 if (${NS}INCLUDE_DIRS)
62 elseif (${NS}INCLUDE_DIR)
67 if (${NS}LIBRARY_DIRS)
69 elseif (${NS}LIBRARY_DIR)
73 # ============================================================================ 74 # import build targets 75 # ============================================================================ 77 ## @brief Whether to import the exported targets. 78 set (NO_${NS}IMPORTS
"${NO_${NS}IMPORTS}")
80 if (NOT NO_${NS}IMPORTS)
81 include (
"${${NS}EXPORTS_FILE}" OPTIONAL)
82 include (
"${${NS}CUSTOM_EXPORTS_FILE}" OPTIONAL)
85 # ============================================================================ 87 # ============================================================================ 89 foreach (M IN LISTS ${NS}MODULES_REQUESTED)
90 if (${NS}${M}_USE_FILE)
91 set (${M}_CONFIG_PREFIX
"${NS}${M}_")
92 include (
"${${NS}${M}_USE_FILE}")
93 unset (${M}_CONFIG_PREFIX)
97 # ============================================================================ 99 # ============================================================================ 101 # Use further project package configuration settings here. INCLUDE_DIRS include_directories(${${NS}INCLUDE_DIRS}) elseif($
USE_FILE_INCLUDED endif() if($
LIBRARY_DIRS link_directories(${${NS}LIBRARY_DIRS}) elseif($