-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshow_target_properties.cmake
66 lines (44 loc) · 3.02 KB
/
show_target_properties.cmake
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
include (display_list)
function(show_target_properties target)
message(STATUS "Properties for ${target}")
get_target_property(DEFINES ${target} COMPILE_DEFINITIONS)
display_list("Target defines : " ${DEFINES})
get_target_property(OPTIONS ${target} COMPILE_OPTIONS)
display_list("Target options : " ${OPTIONS})
get_target_property(INCLUDES ${target} INCLUDE_DIRECTORIES)
display_list("Target includes : " ${INCLUDES})
get_target_property(LIBRARIES ${target} LINK_LIBRARIES)
display_list("Target link libraries : " ${LIBRARIES})
get_target_property(LINK_OPTIONS ${target} LINK_FLAGS)
display_list("Target link options : " ${LINK_OPTIONS})
get_target_property(DEFINES_EXPORTS ${target} INTERFACE_COMPILE_DEFINITIONS)
display_list("Target exported defines : " ${DEFINES_EXPORTS})
get_target_property(OPTIONS_EXPORTS ${target} INTERFACE_COMPILE_OPTIONS)
display_list("Target exported options : " ${OPTIONS_EXPORTS})
get_target_property(INCLUDE_DIRS_EXPORTS ${target} INTERFACE_INCLUDE_DIRECTORIES)
display_list("Target exported includes : " ${INCLUDE_DIRS_EXPORTS})
get_target_property(LIBRARIES_EXPORTS ${target} INTERFACE_LINK_LIBRARIES)
display_list("Target exported link libraries : " ${LIBRARIES_EXPORTS})
get_test_property(IMPORT_DEPENDENCIES ${target} IMPORTED_LINK_DEPENDENT_LIBRARIES)
display_list("Target imported dependencies : " ${IMPORT_DEPENDENCIES})
get_test_property(IMPORT_LIBRARIES ${target} IMPORTED_LINK_INTERFACE_LIBRARIES)
display_list("Target imported link libraries : " ${IMPORT_LIBRARIES})
get_target_property(LINK_DEPENDENCIES ${target} LINK_DEPENDS)
display_list("Target link dependencies : " ${LINK_DEPENDENCIES})
get_target_property(EXPLICIT_DEPENDENCIES ${target} MANUALLY_ADDED_DEPENDENCIES)
display_list("Target manual dependencies : " ${EXPLICIT_DEPENDENCIES})
get_target_property(ARCHIVE_LOCATION ${target} ARCHIVE_OUTPUT_DIRECTORY)
display_list("Target static library location : " ${ARCHIVE_LOCATION})
get_target_property(LIBRARY_LOCATION ${target} LIBRARY_OUTPUT_DIRECTORY)
display_list("Target dynamic library location : " ${LIBRARY_LOCATION})
get_target_property(RUNTIME_LOCATION ${target} RUNTIME_OUTPUT_DIRECTORY)
display_list("Target binary location : " ${RUNTIME_LOCATION})
get_target_property(TARGET_LINK_FLAGS ${target} LINK_FLAGS)
display_list("Target link flags : " ${TARGET_LINK_FLAGS})
get_target_property(TARGET_VERSION ${target} VERSION)
display_list("Target version : " ${TARGET_VERSION})
get_target_property(TARGET_SOVERSION ${target} SOVERSION)
display_list("Target so-version : " ${TARGET_SOVERSION})
get_target_property(TARGET_OUTPUT_NAME ${target} OUTPUT_NAME)
display_list("Target output name : " ${TARGET_OUTPUT_NAME})
endfunction()