-
Notifications
You must be signed in to change notification settings - Fork 14
/
dime-config.cmake.in
59 lines (52 loc) · 2.21 KB
/
dime-config.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
# CMake package configuration file for @PROJECT_NAME@
#
# Defines the target "@PROJECT_NAME@::@PROJECT_NAME@"
#
# Add the following lines to your CMakeLists.txt to depend on @PROJECT_NAME@
#
# find_package(@PROJECT_NAME@ REQUIRED)
# target_link_libraries(my_target_name @PROJECT_NAME@::@PROJECT_NAME@)
#
# Additionally you may one of the following variables (or their corresponding
# upper case version) that are also defined.
#
# @PROJECT_NAME@_COMPILE_DEFINITIONS
# @PROJECT_NAME@_DEFINITIONS
# @PROJECT_NAME@_INCLUDE_DIRS
# @PROJECT_NAME@_INCLUDE_DIR
# @PROJECT_NAME@_LIBRARY
# @PROJECT_NAME@_LIBRARIES
# @PROJECT_NAME@_LIBRARY_DIRS
# @PROJECT_NAME@_LIBRARY_DIR
#
# However, in most cases using the @PROJECT_NAME@::@PROJECT_NAME@ target is sufficient,
# and you won't need these variables.
@PACKAGE_INIT@
include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME_LOWER@-export.cmake")
get_property(@PROJECT_NAME@_COMPILE_DEFINITIONS TARGET @PROJECT_NAME@::@PROJECT_NAME@ PROPERTY INTERFACE_COMPILE_DEFINITIONS)
foreach(_def ${@PROJECT_NAME@_COMPILE_DEFINITIONS})
list(APPEND @PROJECT_NAME@_DEFINITIONS -D${_def})
endforeach()
set(@PROJECT_NAME@_VERSION @PROJECT_VERSION@)
get_property(@PROJECT_NAME@_INCLUDE_DIRS TARGET @PROJECT_NAME@::@PROJECT_NAME@ PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
set(@PROJECT_NAME@_INCLUDE_DIR ${@PROJECT_NAME@_INCLUDE_DIRS})
set(@PROJECT_NAME@_LIBRARY @PROJECT_NAME@::@PROJECT_NAME@)
get_property(@PROJECT_NAME@_LIBRARIES TARGET @PROJECT_NAME@::@PROJECT_NAME@ PROPERTY INTERFACE_LINK_LIBRARIES)
set(@PROJECT_NAME@_LIBRARIES @PROJECT_NAME@::@PROJECT_NAME@ ${@PROJECT_NAME@_LIBRARIES})
set_and_check(@PROJECT_NAME@_LIBRARY_DIRS "@PACKAGE_CMAKE_INSTALL_LIBDIR@")
set(@PROJECT_NAME@_LIBRARY_DIR ${@PROJECT_NAME@_LIBRARY_DIRS})
# For backwards compatibility define upper case versions of output variables
foreach(_var
@PROJECT_NAME@_COMPILE_DEFINITIONS
@PROJECT_NAME@_DEFINITIONS
@PROJECT_NAME@_INCLUDE_DIRS
@PROJECT_NAME@_INCLUDE_DIR
@PROJECT_NAME@_LIBRARY
@PROJECT_NAME@_LIBRARIES
@PROJECT_NAME@_LIBRARY_DIRS
@PROJECT_NAME@_LIBRARY_DIR
@PROJECT_NAME@_VERSION
)
string(TOUPPER ${_var} _uppercase_var)
set(${_uppercase_var} ${${_var}})
endforeach()