1 # ============================================================================ 2 # Copyright (c) 2011-2012 University of Pennsylvania 3 # Copyright (c) 2013-2016 Andreas Schuh 6 # See COPYING file for license information or visit 7 # https://cmake-basis.github.io/download.html#license 8 # ============================================================================ 10 ############################################################################## 11 # @file BasisConfigSettings.cmake 12 # @brief Sets basic variables used in CMake package configuration. 14 # It is suggested to use @c _CONFIG as suffix for variable names that are to be 15 # substituted in the Config.cmake.in template file in order to distinguish 16 # these variables from the build configuration. 18 # @ingroup BasisSettings 19 ############################################################################## 21 # ============================================================================ 22 # common configuration settings 23 # ============================================================================ 25 ## @brief Include directories of dependencies. 26 set (INCLUDE_DIRS_CONFIG)
27 ## @brief Directories of libraries
this package depends on.
28 set (LIBRARY_DIRS_CONFIG)
30 ## @brief Code to set cached <Pkg>_DIR variables in package configuration. 34 foreach (DEP IN LISTS PROJECT_DEPENDS PROJECT_OPTIONAL_DEPENDS)
36 if (DEPENDS_${PKG}_DIR)
37 list (APPEND PKGS ${PKG})
42 list (REMOVE_DUPLICATES PKGS)
46 set (DEPENDS_CONFIG
"set (_depwarn \" set to different value than during the configuration of ${PROJECT_NAME}.\"" 47 " \" Using different versions of a dependency may cause inconsistencies!\")")
49 foreach (PKG IN LISTS PKGS)
50 list (APPEND DEPENDS_CONFIG
52 "if (DEPENDS_${PKG}_DIR)" 53 " if (NOT DEPENDS_${PKG}_DIR STREQUAL \"${DEPENDS_${PKG}_DIR}\")" 54 " message (WARNING DEPENDS_${PKG}_DIR \${_depwarn})" 57 " basis_set_or_update_value (DEPENDS_${PKG}_DIR \"${DEPENDS_${PKG}_DIR}\")" 62 list (APPEND DEPENDS_CONFIG
"unset (_depwarn)")
64 basis_join (
"${DEPENDS_CONFIG}" "\n" DEPENDS_CONFIG)
66 # ============================================================================ 67 # build tree configuration settings 68 # ============================================================================ 88 # ============================================================================ 89 # installation configuration settings 90 # ============================================================================ 94 ## @brief Installation prefix. 96 ## @brief Directory of example files.
102 ## @brief Include directories. 104 ## @brief Directory where libraries are located.
106 ## @brief Directory of Python modules. 108 ## @brief Directory of Jython modules.
110 ## @brief Directory of Perl modules. 111 set (
PERL5LIB_CONFIG "\${\${NS}INSTALL_PREFIX}/${INSTALL_PERL_LIBRARY_DIR}")
112 ## @brief Directory of MATLAB modules.
114 ## @brief Directory of Bash modules. 115 set (
BASHPATH_CONFIG "\${\${NS}INSTALL_PREFIX}/${INSTALL_BASH_LIBRARY_DIR}")
116 ## @brief Directory of CMake package configuration files of project modules.
cmake PERL5LIB_CONFIG
Directory of Perl modules.
function basis_get_relative_path(out REL, in BASE, in PATH)
Get path relative to a given base directory.
cmake MATLABPATH_CONFIG
Directory of MATLAB modules.
cmake BASHPATH_CONFIG
Directory of Bash modules.
cmake PYTHONPATH_CONFIG
Directory of Python modules.
cmake LIBRARY_DIR_CONFIG
Directory where libraries are located.
option BUILD_EXAMPLE
Request build/installation of example.
cmake BUILD_CONFIG_SETTINGS
cmake INSTALL_PREFIX_CONFIG
Installation prefix.
cmake MODULES_DIR_CONFIG
Directory of CMake package configuration files of project modules.
function basis_join(in VALUES, in DELIMITER, out OUTPUT)
Concatenates all list elements into a single delimited string.
cmake EXAMPLE_DIR_CONFIG
Directory of example files.
cmake JYTHONPATH_CONFIG
Directory of Jython modules.
cmake INCLUDE_DIR_CONFIG
Include directories.
function basis_tokenize_dependency(in DEP, out PKG, out VER, out CMP)
Tokenize dependency specification.