BASIS  r3148
ConfigSettings.cmake
Go to the documentation of this file.
00001 ##############################################################################
00002 # @file  ConfigSettings.cmake
00003 # @brief Sets variables used in CMake package configuration.
00004 #
00005 # It is suggested to use @c _CONFIG as suffix for variable names that are to
00006 # be substituted in the Config.cmake.in template file in order to distinguish
00007 # these variables from the build configuration.
00008 #
00009 # @note The default BasisConfigSettings.cmake file which is part of the BASIS
00010 #       installation is included prior to this file. Hence, the variables are
00011 #       valid even if a custom project-specific configuration is used and
00012 #       default values can further be overwritten in this file.
00013 #
00014 # Copyright (c) 2011 University of Pennsylvania. All rights reserved.<br />
00015 # See https://www.cbica.upenn.edu/sbia/software/license.html or COPYING file.
00016 #
00017 # Contact: SBIA Group <sbia-software at uphs.upenn.edu>
00018 #
00019 # @ingroup BasisSettings
00020 ##############################################################################
00021 
00022 # ============================================================================
00023 # common settings
00024 # ============================================================================
00025 
00026 # if a project does not specify the following in the BasisProject.cmake
00027 # file as argument to basis_project(), the defaults are used which are the
00028 # corresponding settings of BASIS itself
00029 
00030 ## @brief Default package vendor used if none specified by BASIS-based project.
00031 set (PACKAGE_VENDOR_CONFIG "${PROJECT_PACKAGE_VENDOR}")
00032 ## @brief Default copyright used if none specified by BASIS-based project.
00033 set (COPYRIGHT_CONFIG "${PROJECT_COPYRIGHT}")
00034 ## @brief Default contact used if none specified by BASIS-based project.
00035 set (CONTACT_CONFIG "${PROJECT_CONTACT}")
00036 
00037 ## @brief List of enabled BASIS utilities.
00038 set (UTILITIES_ENABLED ${BASIS_UTILITIES_ENABLED})
00039 
00040 basis_get_fully_qualified_target_uid (CXX_UTILITIES_LIBRARY_CONFIG    "${BASIS_CXX_UTILITIES_LIBRARY}")
00041 basis_get_fully_qualified_target_uid (PYTHON_UTILITIES_LIBRARY_CONFIG "${BASIS_PYTHON_UTILITIES_LIBRARY}")
00042 basis_get_fully_qualified_target_uid (JYTHON_UTILITIES_LIBRARY_CONFIG "${BASIS_JYTHON_UTILITIES_LIBRARY}")
00043 basis_get_fully_qualified_target_uid (PERL_UTILITIES_LIBRARY_CONFIG   "${BASIS_PERL_UTILITIES_LIBRARY}")
00044 basis_get_fully_qualified_target_uid (MATLAB_UTILITIES_LIBRARY_CONFIG "${BASIS_MATLAB_UTILITIES_LIBRARY}")
00045 basis_get_fully_qualified_target_uid (BASH_UTILITIES_LIBRARY_CONFIG   "${BASIS_BASH_UTILITIES_LIBRARY}")
00046 
00047 basis_get_fully_qualified_target_uid (TEST_LIBRARY_CONFIG      "${BASIS_TEST_LIBRARY}")
00048 basis_get_fully_qualified_target_uid (TEST_MAIN_LIBRARY_CONFIG "${BASIS_TEST_MAIN_LIBRARY}")
00049 
00050 # the following set() statements are simply used to document the variables
00051 # note that this documentation is included in the Doxygen generated documentation
00052 
00053 ## @brief Name of BASIS utilities library for C++.
00054 set (CXX_UTILITIES_LIBRARY_CONFIG    "${CXX_UTILITIES_LIBRARY_CONFIG}")
00055 ## @brief Name of BASIS utilities library for Python.
00056 set (PYTHON_UTILITIES_LIBRARY_CONFIG "${PYTHON_UTILITIES_LIBRARY_CONFIG}")
00057 ## @brief Name of BASIS utilities library for Jython.
00058 set (JYTHON_UTILITIES_LIBRARY_CONFIG "${JYTHON_UTILITIES_LIBRARY_CONFIG}")
00059 ## @brief Name of BASIS utilities library for Perl.
00060 set (PERL_UTILITIES_LIBRARY_CONFIG   "${PERL_UTILITIES_LIBRARY_CONFIG}")
00061 ## @brief Name of BASIS utilities library for MATLAB.
00062 set (MATLAB_UTILITIES_LIBRARY_CONFIG "${MATLAB_UTILITIES_LIBRARY_CONFIG}")
00063 ## @brief Name of BASIS utilities library for Bash.
00064 set (BASH_UTILITIES_LIBRARY_CONFIG   "${BASH_UTILITIES_LIBRARY_CONFIG}")
00065 
00066 ## @brief Name of C++ unit testing library.
00067 set (TEST_LIBRARY_CONFIG "${TEST_LIBRARY_CONFIG}")
00068 ## @brief Name of C++ unit testing library with definition of main() function.
00069 set (TEST_MAIN_LIBRARY_CONFIG "${TEST_MAIN_LIBRARY_CONFIG}")
00070 
00071 # ============================================================================
00072 # build tree configuration settings
00073 # ============================================================================
00074 
00075 if (BUILD_CONFIG_SETTINGS)
00076     # CMake module path
00077     set (MODULE_PATH_CONFIG "${PROJECT_CODE_DIR}/cmake")
00078     # project template
00079     set (TEMPLATE_DIR_CONFIG "${PROJECT_DATA_DIR}/template-${TEMPLATE_VERSION}")
00080     # paths to template files of BASIS utilities
00081     foreach (U CXX PYTHON JYTHON PERL MATLAB BASH)
00082       string (TOLOWER "${U}" L)
00083       set (${U}_TEMPLATES_DIR_CONFIG "${PROJECT_CODE_DIR}/utilities/${L}")
00084     endforeach ()
00085     # Sphinx
00086     set (SPHINX_EXTENSIONS_PATH_CONFIG "${BASIS_SPHINX_EXTENSIONS_PATH}")
00087     set (SPHINX_HTML_THEME_PATH_CONFIG "${PROJECT_CODE_DIR}/sphinx/themes")
00088 
00089     return ()
00090 endif ()
00091 
00092 # ============================================================================
00093 # installation configuration settings
00094 # ============================================================================
00095 
00096 ## @brief Directory of BASIS CMake modules.
00097 set (MODULE_PATH_CONFIG "\${\${NS}INSTALL_PREFIX}/${INSTALL_MODULES_DIR}")
00098 ## @brief Dirctory of project template.
00099 set (TEMPLATE_DIR_CONFIG "\${\${NS}INSTALL_PREFIX}/${INSTALL_TEMPLATE_DIR}-${TEMPLATE_VERSION}")
00100 # paths to templates files of utilities
00101 foreach (U CXX PYTHON JYTHON PERL MATLAB BASH)
00102   set (${U}_TEMPLATES_DIR_CONFIG "\${\${NS}INSTALL_PREFIX}/${INSTALL_${U}_TEMPLATES_DIR}")
00103 endforeach ()
00104 # Sphinx
00105 set (SPHINX_EXTENSIONS_PATH_CONFIG "\${\${NS}INSTALL_PREFIX}/${INSTALL_PYTHON_LIBRARY_DIR}/${SPHINX_EXTENSIONS_PREFIX}")
00106 set (SPHINX_HTML_THEME_PATH_CONFIG "\${\${NS}INSTALL_PREFIX}/${INSTALL_SPHINX_THEMES_DIR}")