-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure_script.cmake.in
65 lines (61 loc) · 2.53 KB
/
configure_script.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
# ============================================================================
# Copyright (c) 2011-2012 University of Pennsylvania
# Copyright (c) 2013-2016 Andreas Schuh
# All rights reserved.
#
# See COPYING file for license information or visit
# https://cmake-basis.github.io/download.html#license
# ============================================================================
##############################################################################
# @file configure_script.cmake.in
# @brief Build script module.
#
# @note This file is generated by BASIS from the template file
# configure_script.cmake.in which is part of the BASIS installation.
#
# This script is configured using CMake's configure_sript() function instead
# of providing its arguments using the -D option of CMake before the -P option
# such that build command can be made dependent on the configured build script.
# It calls the function basis_configure_script() twice, once to configure
# the script file for use in the build tree, and once for installation (optional).
#
# The build configuration name can be set using the
# -D CONFIGURATION=$<CONFIGURATION> CMake option with generator expression.
##############################################################################
cmake_minimum_required (VERSION 2.8.12 FATAL_ERROR)
include ("@BASIS_MODULE_PATH@/CommonTools.cmake") # basis_configure_script()
# settings
set (SOURCE_FILE "@SOURCE_FILE@")
set (OUTPUT_FILE "@OUTPUT_FILE@")
set (INSTALL_FILE "@INSTALL_FILE@")
set (DIRECTORY "@OUTPUT_DIR@")
set (DESTINATION "@DESTINATION@")
set (BUILD_LINK_DEPENDS "@BUILD_LINK_DEPENDS@")
set (INSTALL_LINK_DEPENDS "@INSTALL_LINK_DEPENDS@")
set (CACHE_FILE "@CACHE_FILE@")
set (CONFIG_FILE "@CONFIG_FILES@")
set (LANGUAGE "@LANGUAGE@")
set (OPTIONS "@OPTIONS@")
# configure ("build") script - always touch files to update build timestamp
basis_configure_script (
"${SOURCE_FILE}" "${OUTPUT_FILE}"
DIRECTORY "${DIRECTORY}"
LINK_DEPENDS "${BUILD_LINK_DEPENDS}"
CACHE_FILE "${CACHE_FILE}"
CONFIG_FILE "${CONFIG_FILE}"
LANGUAGE "${LANGUAGE}"
CONFIGURATION "${CONFIGURATION}"
${OPTIONS}
)
if (INSTALL_FILE AND DESTINATION)
basis_configure_script (
"${SOURCE_FILE}" "${INSTALL_FILE}"
DESTINATION "${DESTINATION}"
LINK_DEPENDS "${INSTALL_LINK_DEPENDS}"
CACHE_FILE "${CACHE_FILE}"
CONFIG_FILE "${CONFIG_FILE}"
LANGUAGE "${LANGUAGE}"
CONFIGURATION "${CONFIGURATION}"
${OPTIONS}
)
endif ()