-
Notifications
You must be signed in to change notification settings - Fork 0
/
ScriptConfig.cmake.in
154 lines (128 loc) · 7.33 KB
/
ScriptConfig.cmake.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
##############################################################################
# @file BasisScriptConfig.cmake
# @brief BASIS script configuration.
#
# @note The file BasisScriptConfig.cmake is automatically generated by BASIS
# from the template file ScriptConfig.cmake.in which is part of BASIS.
#
# This script configuration file is included before the default script
# configuration file which is part of the package itself (ScriptConfig.cmake),
# if such file exists in the @c PROJECT_CONFIG_DIR.
# Therefore, the BASIS script configuration can be overwritten by the
# default script configuration of the project, which in turn can be
# overwritten specifically for each script target by specifying a
# script target-specific script configuration using the @c CONFIG and/or
# @c CONFIG_FILE option of the basis_add_executable() or basis_add_library()
# command, respectively.
#
# @sa https://cmake-basis.github.io/standard/scripttargets.html#script-configuration
#
# @ingroup BasisScriptConfig
##############################################################################
## @addtogroup BasisScriptConfig
# @{
# ============================================================================
# script attributes
# ============================================================================
# Note: The following set() commands are required for the API documentation.
## @brief Detected scripting language or UNKNOWN.
set (LANGUAGE "${LANGUAGE}")
## @brief Directory of script file.
#
# @note Mainly used in script configuration itself to make relative paths
# absolute. In particular, basis_set_script_path() uses this variable.
set (__DIR__ "${__DIR__}")
## @brief Absolute path of script file.
#
# @note As this path is fixed after the build, it should be used only if
# it is not otherwise possible to determine the path of the current
# script file. It prohibits the relocation of the installation.
set (__FILE__ "${__FILE__}")
## @brief Name of script file.
set (__NAME__ "${__NAME__}")
## @brief Name of script file in uppercase only.
string (TOUPPER "${__NAME__}" __NAME_U__)
## @brief Name of script file in lowercase only.
string (TOLOWER "${__NAME__}" __NAME_L__)
# ============================================================================
# aliases of script attributes for backward compatibility
# ============================================================================
set (DIR ${__DIR__})
set (FILE ${__FILE__})
set (NAME ${__NAME__})
set (NAME_U ${__NAME_U__})
set (NAME_L ${__NAME_L__})
# ============================================================================
# directories
# ============================================================================
# ----------------------------------------------------------------------------
# relative to script file
# Example:
# @code
# #! /usr/bin/env bash
# get_executable_directory exec_dir
# libexec_dir=${exec_dir}/__LIBEXEC_DIR__
# @endcode
## @brief Installation prefix relative to script location.
basis_set_script_path (PREFIX_DIR "@CMAKE_BINARY_DIR@" "@CMAKE_INSTALL_PREFIX@")
## @brief Directory of main executables relative to script location.
basis_set_script_path (RUNTIME_DIR "@BINARY_RUNTIME_DIR@" "@INSTALL_RUNTIME_DIR@")
## @brief Directory of auxiliary executables relative to script location.
basis_set_script_path (LIBEXEC_DIR "@BINARY_LIBEXEC_DIR@" "@INSTALL_LIBEXEC_DIR@")
## @brief Directory of shared and module libraries relative to script location.
basis_set_script_path (LIBRARY_DIR "@BINARY_LIBRARY_DIR@" "@INSTALL_LIBRARY_DIR@")
## @brief Directory of static and import libraries relative to script location.
basis_set_script_path (ARCHIVE_DIR "@BINARY_ARCHIVE_DIR@" "@INSTALL_ARCHIVE_DIR@")
## @brief Directory of auxiliary data files relative to script location.
basis_set_script_path (DATA_DIR "@PROJECT_DATA_DIR@" "@INSTALL_DATA_DIR@")
## @brief Directory of Python modules relative to script location.
basis_set_script_path (PYTHON_LIBRARY_DIR "@BINARY_PYTHON_LIBRARY_DIR@" "@INSTALL_PYTHON_LIBRARY_DIR@")
## @brief Directory of Jython modules relative to script location.
basis_set_script_path (JYTHON_LIBRARY_DIR "@BINARY_JYTHON_LIBRARY_DIR@" "@INSTALL_JYTHON_LIBRARY_DIR@")
## @brief Directory of Perl modules relative to script location.
basis_set_script_path (PERL_LIBRARY_DIR "@BINARY_PERL_LIBRARY_DIR@" "@INSTALL_PERL_LIBRARY_DIR@")
## @brief Directory of MATLAB modules relative to script location.
basis_set_script_path (MATLAB_LIBRARY_DIR "@BINARY_MATLAB_LIBRARY_DIR@" "@INSTALL_MATLAB_LIBRARY_DIR@")
## @brief Directory of Bash modules relative to script location.
basis_set_script_path (BASH_LIBRARY_DIR "@BINARY_BASH_LIBRARY_DIR@" "@INSTALL_BASH_LIBRARY_DIR@")
# ----------------------------------------------------------------------------
# relative to installation prefix
# Example:
# @code
# #! /usr/bin/env bash
# get_executable_directory exec_dir
# libexec_dir=${exec_dir}/__PREFIX_DIR__/__LIBEXEC_DIR_SUFFIX__
# @endcode
basis_get_relative_path (RUNTIME_DIR_SUFFIX "${__DIR__}/${PREFIX_DIR}" "${__DIR__}/${RUNTIME_DIR}")
basis_get_relative_path (LIBEXEC_DIR_SUFFIX "${__DIR__}/${PREFIX_DIR}" "${__DIR__}/${LIBEXEC_DIR}")
basis_get_relative_path (LIBRARY_DIR_SUFFIX "${__DIR__}/${PREFIX_DIR}" "${__DIR__}/${LIBRARY_DIR}")
basis_get_relative_path (ARCHIVE_DIR_SUFFIX "${__DIR__}/${PREFIX_DIR}" "${__DIR__}/${ARCHIVE_DIR}")
basis_get_relative_path (DATA_DIR_SUFFIX "${__DIR__}/${PREFIX_DIR}" "${__DIR__}/${DATA_DIR}")
basis_get_relative_path (PYTHON_LIBRARY_DIR_SUFFIX "${__DIR__}/${PREFIX_DIR}" "${__DIR__}/${PYTHON_LIBRARY_DIR}")
basis_get_relative_path (JYTHON_LIBRARY_DIR_SUFFIX "${__DIR__}/${PREFIX_DIR}" "${__DIR__}/${JYTHON_LIBRARY_DIR}")
basis_get_relative_path (PERL_LIBRARY_DIR_SUFFIX "${__DIR__}/${PREFIX_DIR}" "${__DIR__}/${PERL_LIBRARY_DIR}")
basis_get_relative_path (MATLAB_LIBRARY_DIR_SUFFIX "${__DIR__}/${PREFIX_DIR}" "${__DIR__}/${MATLAB_LIBRARY_DIR}")
basis_get_relative_path (BASH_LIBRARY_DIR_SUFFIX "${__DIR__}/${PREFIX_DIR}" "${__DIR__}/${BASH_LIBRARY_DIR}")
# Note: The following set() commands are needed for the API documentation.
## @brief Directory of main executables relative to installation prefix.
set (RUNTIME_DIR_SUFFIX "${RUNTIME_DIR_SUFFIX}")
## @brief Directory of auxiliary executables relative to installation prefix.
set (LIBEXEC_DIR_SUFFIX "${LIBEXEC_DIR_SUFFIX}")
## @brief Directory of shared and module libraries relative to installation prefix.
set (LIBRARY_DIR_SUFFIX "${LIBRARY_DIR_SUFFIX}")
## @brief Directory of static and import libraries relative to installation prefix.
set (ARCHIVE_DIR_SUFFIX "${ARCHIVE_DIR_SUFFIX}")
## @brief Directory of auxiliary data files relative to installation prefix.
set (DATA_DIR_SUFFIX "${DATA_DIR_SUFFIX}")
## @brief Directory of Python modules relative to installation prefix.
set (PYTHON_LIBRARY_DIR_SUFFIX "${PYTHON_LIBRARY_DIR_SUFFIX}")
## @brief Directory of Jython modules relative to installation prefix.
set (JYTHON_LIBRARY_DIR_SUFFIX "${JYTHON_LIBRARY_DIR_SUFFIX}")
## @brief Directory of Perl modules relative to installation prefix.
set (PERL_LIBRARY_DIR_SUFFIX "${PERL_LIBRARY_DIR_SUFFIX}")
## @brief Directory of MATLAB modules relative to installation prefix.
set (MATLAB_LIBRARY_DIR_SUFFIX "${MATLAB_LIBRARY_DIR_SUFFIX}")
## @brief Directory of Bash modules relative to installation prefix.
set (BASH_LIBRARY_DIR_SUFFIX "${BASH_LIBRARY_DIR_SUFFIX}")
## @}
# end of Doxygen group