BASISConfig.cmake
Go to the documentation of this file.
00001 ############################################################################## 00002 # @file BASISConfig.cmake 00003 # @brief CMake package configuration file. 00004 # 00005 # @note The BASISConfig.cmake file is automatically generated 00006 # by BASIS from the template file Config.cmake.in which is part of 00007 # the BASIS package. 00008 # 00009 # Variables in this file have to be prefixed by the name of this package. 00010 # In the default package configuration file of BASIS, which can be included 00011 # here using the \@BASIS_CONFIG\@ variable, this prefix is defined as @c NS 00012 # variable. Moreover, the macro basis_set_config() should be used for 00013 # convenience to set any configuration variable, e.g., 00014 # 00015 # @code 00016 # basis_set_config (INCLUDE_DIR "\@INCLUDE_DIR_CONFIG\@") 00017 # @endcode 00018 # 00019 # where the variable @c INCLUDE_DIR_CONFIG is set in the ConfigSettings.cmake 00020 # file of the BASIS installation. Note that this statement will set the 00021 # variable ${NS}INCLUDE_DIR, where by default @c NS is the package name 00022 # followed by an underscore (_). 00023 # 00024 # See the Config.cmake.in file of BASIS for details. 00025 # 00026 # Copyright (c) 2011, 2012 University of Pennsylvania. All rights reserved.<br /> 00027 # See https://www.cbica.upenn.edu/sbia/software/license.html or COPYING file. 00028 # 00029 # Contact: SBIA Group <sbia-software at uphs.upenn.edu> 00030 # 00031 # @ingroup BasisConfig 00032 ############################################################################## 00033 00034 ## @addtogroup BasisConfig 00035 # @{ 00036 00037 00038 # ============================================================================ 00039 # namespace 00040 # ============================================================================ 00041 00042 # prefix used for variable names 00043 set (NS "BASIS_") 00044 00045 # allow caller to change namespace - used by projects with modules 00046 if (${NS}CONFIG_PREFIX) 00047 set (NS "${${NS}CONFIG_PREFIX}") 00048 endif () 00049 00050 # ---------------------------------------------------------------------------- 00051 macro (basis_set_config NAME) 00052 set (${NS}${NAME} ${ARGN}) 00053 endmacro () 00054 00055 # ---------------------------------------------------------------------------- 00056 macro (basis_copy_config NAME SRC) 00057 set (${NS}${NAME} ${${NS}${SRC}}) 00058 endmacro () 00059 00060 # ---------------------------------------------------------------------------- 00061 macro (basis_append_config NAME) 00062 list (APPEND ${NS}${NAME} ${ARGN}) 00063 endmacro () 00064 00065 # ---------------------------------------------------------------------------- 00066 macro (basis_remove_duplicates_config NAME) 00067 if (${NS}${NAME}) 00068 list (REMOVE_DUPLICATES ${NS}${NAME}) 00069 endif () 00070 endmacro () 00071 00072 # ============================================================================ 00073 # general 00074 # ============================================================================ 00075 00076 ## @brief Installation prefix or root of build tree. 00077 basis_set_config (INSTALL_PREFIX "${CMAKE_CURRENT_LIST_DIR}/../../../") 00078 get_filename_component (${NS}INSTALL_PREFIX "${${NS}INSTALL_PREFIX}" ABSOLUTE) 00079 00080 ## @brief Project use file to be included by other projects. 00081 basis_set_config (USE_FILE "${CMAKE_CURRENT_LIST_DIR}/BASISUse.cmake") 00082 00083 ## @brief Directory of example files. 00084 basis_set_config (EXAMPLE_DIR "${${NS}INSTALL_PREFIX}/share/example") 00085 00086 # ============================================================================ 00087 # libraries 00088 # ============================================================================ 00089 00090 ## @brief Directory of header files. 00091 basis_set_config (INCLUDE_DIR "${${NS}INSTALL_PREFIX}/include") 00092 00093 ## @brief Directory of header files including dependencies. 00094 basis_set_config (INCLUDE_DIRS) # to have a set recognized by Doxygen filter 00095 basis_copy_config (INCLUDE_DIRS INCLUDE_DIR) 00096 basis_append_config (INCLUDE_DIRS "") 00097 00098 ## @brief Directory of libraries. 00099 basis_set_config (LIBRARY_DIR "${${NS}INSTALL_PREFIX}/lib") 00100 00101 ## @brief Directory of libraries including dependencies. 00102 basis_set_config (LIBRARY_DIRS) # to have a set() recognized by Doxygen filter 00103 basis_copy_config (LIBRARY_DIRS LIBRARY_DIR) 00104 basis_append_config (LIBRARY_DIRS "") 00105 00106 ## @brief Search path for Python modules. 00107 basis_set_config (PYTHONPATH "${${NS}INSTALL_PREFIX}/lib/python") 00108 00109 ## @brief Search path for Jython modules. 00110 basis_set_config (JYTHONPATH "${${NS}INSTALL_PREFIX}/lib/jython") 00111 00112 ## @brief Search path for Perl modules. 00113 basis_set_config (PERL5LIB "${${NS}INSTALL_PREFIX}/lib/perl") 00114 00115 ## @brief Search path for MATLAB modules. 00116 basis_set_config (MATLABPATH "${${NS}INSTALL_PREFIX}/lib/matlab") 00117 00118 ## @brief Search path for Bash modules. 00119 # 00120 # See the import() function of the BASIS Bash utilities. 00121 basis_set_config (BASHPATH "${${NS}INSTALL_PREFIX}/lib/bash") 00122 00123 # ============================================================================ 00124 # exports 00125 # ============================================================================ 00126 00127 ## @brief Absolute path of exports file to be included by other projects. 00128 basis_set_config (EXPORTS_FILE "${CMAKE_CURRENT_LIST_DIR}/BASISExports.cmake") 00129 00130 ## @brief Absolute path of custom exports file to be included by other projects. 00131 basis_set_config (CUSTOM_EXPORTS_FILE "${CMAKE_CURRENT_LIST_DIR}/BASISCustomExports.cmake") 00132 00133 # ============================================================================ 00134 # modules 00135 # ============================================================================ 00136 00137 ## @brief List of project modules. 00138 basis_set_config (MODULES "") 00139 00140 ## @brief List of built project modules. 00141 basis_set_config (MODULES_ENABLED "") 00142 00143 ## @brief List of modules requested by external package using the 00144 # @c COMPONENTS argument of 00145 # <a href="http://www.cmake.org/cmake/help/cmake-2-8-docs.html#command:find_package"> 00146 # find_package()</a>. 00147 if (${NS}FIND_COMPONENTS) 00148 basis_set_config (MODULES_REQUESTED "${${NS}FIND_COMPONENTS}") 00149 endif() 00150 if(NOT ${NS}MODULES_REQUESTED) 00151 basis_set_config (MODULES_REQUESTED "${${NS}MODULES_ENABLED}") 00152 endif() 00153 00154 foreach (${NS}MODULE IN LISTS ${NS}MODULES_REQUESTED) 00155 # check if requested module is available 00156 list (FIND ${NS}MODULES_ENABLED ${NS}MODULE IDX) 00157 if (IDX EQUAL -1) 00158 message (FATAL_ERROR "Requested module ${${NS}MODULE} of package BASIS" 00159 " was not enabled when building BASIS. Rebuild" 00160 " the BASIS package with MODULE_${${NS}MODULE}" 00161 " set to ON and try again.") 00162 endif () 00163 # include configuration files of modules 00164 set (${${NS}MODULE}_CONFIG_PREFIX "${NS}${MODULE}_") 00165 include ("lib/cmake/basis/BASIS${${NS}MODULE}Config.cmake") 00166 unset (${${NS}MODULE}_CONFIG_PREFIX) 00167 # append include directories 00168 if (${NS}${${NS}MODULE}_INCLUDE_DIRS) 00169 basis_append_config (INCLUDE_DIRS ${${NS}${${NS}MODULE}_INCLUDE_DIRS}) 00170 elseif (${NS}${M}_INCLUDE_DIR) 00171 basis_append_config (INCLUDE_DIRS ${${NS}${${NS}MODULE}_INCLUDE_DIR}) 00172 endif () 00173 # append library directories 00174 if (${NS}${${NS}MODULE}_LIBRARY_DIRS) 00175 basis_append_config (LIBRARY_DIRS ${${NS}${${NS}MODULE}_LIBRARY_DIRS}) 00176 elseif (${NS}${${NS}MODULE}_LIBARY_DIR) 00177 basis_append_config (LIBRARY_DIRS ${${NS}${${NS}MODULE}_LIBRARY_DIR}) 00178 endif () 00179 endforeach () 00180 unset (${NS}MODULE) 00181 00182 basis_remove_duplicates_config (INCLUDE_DIR) 00183 basis_remove_duplicates_config (INCLUDE_DIRS) 00184 basis_remove_duplicates_config (LIBRARY_DIR) 00185 basis_remove_duplicates_config (LIBRARY_DIRS) 00186 00187 # ============================================================================ 00188 # dependencies 00189 # ============================================================================ 00190 00191 # MATLAB 00192 set (MATLAB_DIR "/sbia/sbiasfw/external/matlab/R2012A") 00193 # Sphinx 00194 set (Sphinx_DIR "/sbia/sbiasfw/external/python/epd/7.3.1") 00195 # ITK 00196 set (ITK_DIR "/sbiasfw/lab/ITK-3.14/lib/InsightToolkit") 00197 00198 00199 # ============================================================================ 00200 # BASIS configuration 00201 # ============================================================================ 00202 00203 # ---------------------------------------------------------------------------- 00204 # default settings 00205 basis_set_config (PACKAGE_VENDOR "SBIA") 00206 basis_set_config (COPYRIGHT "2011, 2012, 2013 University of Pennsylvania") 00207 basis_set_config (CONTACT "SBIA Group <sbia-software at uphs.upenn.edu>") 00208 00209 # ---------------------------------------------------------------------------- 00210 # CMake modules 00211 00212 ## @brief Absolute path to CMake modules. 00213 basis_set_config (MODULE_PATH "${${NS}INSTALL_PREFIX}/share/cmake-modules") 00214 00215 # ---------------------------------------------------------------------------- 00216 # project template 00217 00218 ## @brief Top directory of project template. 00219 basis_set_config (TEMPLATE_DIR "${${NS}INSTALL_PREFIX}/share/template-1.7") 00220 00221 # ---------------------------------------------------------------------------- 00222 # utilities 00223 00224 ## @brief List of enabled BASIS utilities. 00225 basis_set_config (UTILITIES_ENABLED "CXX;PYTHON;PERL;BASH") 00226 00227 ## @brief Python interpreter used to build/configure BASIS Python modules. 00228 basis_set_config (PYTHON_EXECUTABLE "/sbia/sbiasfw/external/python/epd/7.3.1/bin/python") 00229 ## @brief Jython interpreter used to build/configure BASIS Jython modules. 00230 basis_set_config (JYTHON_EXECUTABLE "/sbiasfw/external/jython/2.5.1/jython") 00231 ## @brief Perl interpreter used to build/configure BASIS Perl modules. 00232 basis_set_config (PERL_EXECUTABLE "/usr/bin/perl") 00233 ## @brief Bash executable used to build/configure BASIS Bash modules. 00234 basis_set_config (BASH_EXECUTABLE "/bin/bash") 00235 00236 ## @brief Absolute path to C++ utilities files. 00237 basis_set_config (CXX_TEMPLATES_DIR "${${NS}INSTALL_PREFIX}/share/utilities") 00238 ## @brief Absolute path to Python utilities files. 00239 basis_set_config (PYTHON_TEMPLATES_DIR "${${NS}INSTALL_PREFIX}/share/utilities") 00240 ## @brief Absolute path to Python utilities files. 00241 basis_set_config (JYTHON_TEMPLATES_DIR "${${NS}INSTALL_PREFIX}/") 00242 ## @brief Absolute path to Perl utilities files. 00243 basis_set_config (PERL_TEMPLATES_DIR "${${NS}INSTALL_PREFIX}/share/utilities") 00244 ## @brief Absolute path to MATLAB utilities files. 00245 basis_set_config (MATLAB_TEMPLATES_DIR "${${NS}INSTALL_PREFIX}/share/utilities") 00246 ## @brief Absolute path to Bash utilities files. 00247 basis_set_config (BASH_TEMPLATES_DIR "${${NS}INSTALL_PREFIX}/share/utilities") 00248 00249 ## @brief C++ utilities library. 00250 basis_set_config (CXX_UTILITIES_LIBRARY "basis.utilities_cxx") 00251 ## @brief Python utilities library. 00252 basis_set_config (PYTHON_UTILITIES_LIBRARY "basis.utilities_python") 00253 ## @brief Jython utilities library. 00254 basis_set_config (JYTHON_UTILITIES_LIBRARY "") 00255 ## @brief Perl utilities library. 00256 basis_set_config (PERL_UTILITIES_LIBRARY "basis.utilities_perl") 00257 ## @brief MATLAB utilities library. 00258 basis_set_config (MATLAB_UTILITIES_LIBRARY "") 00259 ## @brief Bash utilities library. 00260 basis_set_config (BASH_UTILITIES_LIBRARY "basis.utilities_bash") 00261 00262 ## @brief Unit testing library. 00263 basis_set_config (TEST_LIBRARY "basis.testlib") 00264 ## @brief Implementation of main() function of unit test driver. 00265 basis_set_config (TEST_MAIN_LIBRARY "basis.testmain") 00266 00267 ## @brief Main libraries. 00268 basis_set_config (LIBRARIES 00269 ${${NS}UTILITIES_LIBRARY} 00270 ${${NS}TEST_LIBRARY} 00271 ) 00272 00273 # ---------------------------------------------------------------------------- 00274 # Sphinx 00275 00276 ## @brief Path of Sphinx extensions. 00277 basis_set_config (SPHINX_EXTENSIONS_PATH "${${NS}INSTALL_PREFIX}/lib/python/basis/sphinx/ext/") 00278 ## @brief Path of Sphinx HTML themes. 00279 basis_set_config (SPHINX_HTML_THEME_PATH "${${NS}INSTALL_PREFIX}/share/sphinx-themes") 00280 00281 # ---------------------------------------------------------------------------- 00282 # CMake tools 00283 00284 include ("${${NS}MODULE_PATH}/BasisTools.cmake") 00285 include ("${${NS}MODULE_PATH}/BasisSettings.cmake" NO_POLICY_SCOPE) 00286 00287 00288 ## @} 00289 # end of Doxygen group - keep at end of file