BASIS  version 1.2.3 (revision 2104)
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 ## @brief List of enabled BASIS utilities.
00027 set (UTILITIES_ENABLED ${BASIS_UTILITIES_ENABLED})
00028 
00029 basis_get_fully_qualified_target_uid (UTILITIES_LIBRARY_CONFIG "${BASIS_UTILITIES_LIBRARY}")
00030 basis_get_fully_qualified_target_uid (TEST_LIBRARY_CONFIG      "${BASIS_TEST_LIBRARY}")
00031 basis_get_fully_qualified_target_uid (TEST_MAIN_LIBRARY_CONFIG "${BASIS_TEST_MAIN_LIBRARY}")
00032 
00033 ## @brief Name of BASIS C++ utilities library.
00034 set (UTILITIES_LIBRARY_CONFIG "${UTILITIES_LIBRARY_CONFIG}")
00035 ## @brief Name of C++ unit testing library.
00036 set (TEST_LIBRARY_CONFIG "${TEST_LIBRARY_CONFIG}")
00037 ## @brief Name of C++ unit testing library with definition of main() function.
00038 set (TEST_MAIN_LIBRARY_CONFIG "${TEST_MAIN_LIBRARY_CONFIG}")
00039 
00040 # ============================================================================
00041 # build tree configuration settings
00042 # ============================================================================
00043 
00044 if (BUILD_CONFIG_SETTINGS)
00045     # CMake module path
00046     set (MODULE_PATH_CONFIG "${PROJECT_CODE_DIR}/cmake")
00047     # project template
00048     set (TEMPLATE_DIR_CONFIG "${PROJECT_DATA_DIR}/template-${TEMPLATE_VERSION}")
00049     # paths to utilities templates files
00050     foreach (U CXX JAVA PYTHON PERL BASH MATLAB)
00051       string (TOLOWER "${U}" L)
00052       set (${U}_TEMPLATES_DIR_CONFIG "${PROJECT_CODE_DIR}/utilities/${L}")
00053     endforeach ()
00054 
00055     return ()
00056 endif ()
00057 
00058 # ============================================================================
00059 # installation configuration settings
00060 # ============================================================================
00061 
00062 ## @brief Directory of BASIS CMake modules.
00063 set (MODULE_PATH_CONFIG "\${\${NS}INSTALL_PREFIX}/${INSTALL_MODULES_DIR}")
00064 ## @brief Dirctory of @ref ProjectTemplate.
00065 set (TEMPLATE_DIR_CONFIG "\${\${NS}INSTALL_PREFIX}/${INSTALL_TEMPLATE_DIR}-${TEMPLATE_VERSION}")
00066 # paths to templates files of utilities
00067 foreach (U CXX JAVA PYTHON PERL BASH MATLAB)
00068   set (${U}_TEMPLATES_DIR_CONFIG "\${\${NS}INSTALL_PREFIX}/${INSTALL_${U}_TEMPLATES_DIR}")
00069 endforeach ()