BASIS  version 1.2.3 (revision 2104)
BasisConfigSettings.cmake
Go to the documentation of this file.
00001 ##############################################################################
00002 # @file  BasisConfigSettings.cmake
00003 # @brief Sets basic variables used in CMake package configuration.
00004 #
00005 # It is suggested to use @c _CONFIG as suffix for variable names that are to be
00006 # substituted in the Config.cmake.in template file in order to distinguish
00007 # these variables from the build configuration.
00008 #
00009 # Copyright (c) 2011, 2012 University of Pennsylvania. All rights reserved.<br />
00010 # See https://www.rad.upenn.edu/sbia/software/license.html or COPYING file.
00011 #
00012 # Contact: SBIA Group <sbia-software at uphs.upenn.edu>
00013 #
00014 # @ingroup BasisSettings
00015 ##############################################################################
00016 
00017 # ============================================================================
00018 # common configuration settings
00019 # ============================================================================
00020 
00021 ## @brief Include directories of dependencies.
00022 set (INCLUDE_DIRS_CONFIG)
00023 ## @brief Directories of libraries this package depends on.
00024 set (LIBRARY_DIRS_CONFIG)
00025 
00026 # ============================================================================
00027 # build tree configuration settings
00028 # ============================================================================
00029 
00030 if (BUILD_CONFIG_SETTINGS)
00031   set (INSTALL_PREFIX_CONFIG "${PROJECT_BINARY_DIR}")
00032   set (INCLUDE_DIR_CONFIG "${BINARY_INCLUDE_DIR};${PROJECT_INCLUDE_DIR}")
00033   set (LIBRARY_DIR_CONFIG "${BINARY_LIBRARY_DIR}")
00034   set (PYTHON_LIBRARY_DIR_CONFIG "${BINARY_PYTHON_LIBRARY_DIR}")
00035   set (PERL_LIBRARY_DIR_CONFIG "${BINARY_PERL_LIBRARY_DIR}")
00036   set (MODULES_DIR_CONFIG "${PROJECT_BINARY_DIR}/modules")
00037   return ()
00038 endif ()
00039 
00040 # ============================================================================
00041 # installation configuration settings
00042 # ============================================================================
00043 
00044 basis_get_relative_path (
00045   INSTALL_PREFIX_CONFIG
00046     "${INSTALL_PREFIX}/${INSTALL_CONFIG_DIR}"
00047     "${INSTALL_PREFIX}"
00048 )
00049 
00050 ## @brief Installation prefix.
00051 set (INSTALL_PREFIX_CONFIG "\${CMAKE_CURRENT_LIST_DIR}/${INSTALL_PREFIX_CONFIG}")
00052 ## @brief Include directories.
00053 set (INCLUDE_DIR_CONFIG "\${\${NS}INSTALL_PREFIX}/${INSTALL_INCLUDE_DIR}")
00054 ## @brief Directory where libraries are located.
00055 set (LIBRARY_DIR_CONFIG "\${\${NS}INSTALL_PREFIX}/${INSTALL_LIBRARY_DIR}")
00056 ## @brief Directory of Python modules.
00057 set (PYTHON_LIBRARY_DIR_CONFIG "\${\${NS}INSTALL_PREFIX}/${INSTALL_PYTHON_LIBRARY_DIR}")
00058 ## @brief Directory of Perl modules.
00059 set (PERL_LIBRARY_DIR_CONFIG "\${\${NS}INSTALL_PREFIX}/${INSTALL_PERL_LIBRARY_DIR}")
00060 ## @brief Directory of CMake package configuration files of project modules.
00061 set (MODULES_DIR_CONFIG "${INSTALL_CONFIG_DIR}")