-
Notifications
You must be signed in to change notification settings - Fork 16
/
ConfigUse.cmake.in
77 lines (64 loc) · 2.52 KB
/
ConfigUse.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
# ============================================================================
# Copyright (c) 2011-2012 University of Pennsylvania
# Copyright (c) 2013-2014 Andreas Schuh
# All rights reserved.
#
# See COPYING file for license information or visit
# http://opensource.andreasschuh.com/cmake-basis/download.html#license
# ============================================================================
##############################################################################
# @file @USE_FILE@
# @brief CMake package configuration use file.
#
# @note The @USE_FILE@ file is automatically generated
# by BASIS from the template file ConfigUse.cmake.in which is part of the
# BASIS installation.
#
# @ingroup BasisConfig
##############################################################################
# ============================================================================
# namespace
# ============================================================================
@BASIS_NS@
# ============================================================================
# include guard
# ============================================================================
if (__${NS}USE_FILE_INCLUDED)
return ()
else ()
set (__${NS}USE_FILE_INCLUDED 1)
endif ()
# ============================================================================
# use project settings
# ============================================================================
# include directories
if (${NS}INCLUDE_DIRS)
include_directories (${${NS}INCLUDE_DIRS})
elseif (${NS}INCLUDE_DIR)
include_directories (${${NS}INCLUDE_DIR})
endif ()
# library directories
if (${NS}LIBRARY_DIRS)
link_directories (${${NS}LIBRARY_DIRS})
elseif (${NS}LIBRARY_DIR)
link_directories (${${NS}LIBRARY_DIR})
endif ()
# ============================================================================
# import build targets
# ============================================================================
## @brief Whether to import the exported targets.
set (NO_${NS}IMPORTS "${NO_${NS}IMPORTS}")
if (NOT NO_${NS}IMPORTS)
include ("${${NS}EXPORTS_FILE}" OPTIONAL)
include ("${${NS}CUSTOM_EXPORTS_FILE}" OPTIONAL)
endif ()
# ============================================================================
# use modules
# ============================================================================
foreach (M IN LISTS ${NS}MODULES_REQUESTED)
if (${NS}${M}_USE_FILE)
set (${M}_CONFIG_PREFIX "${NS}${M}_")
include ("${${NS}${M}_USE_FILE}")
unset (${M}_CONFIG_PREFIX)
endif ()
endforeach ()