summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2024-05-01 17:25:26 +0200
committerAlbrecht Schlosser <albrechts.fltk@online.de>2024-05-01 17:25:26 +0200
commitf194d8596f4a9761fa180ae5cc49b0f9d421bfb5 (patch)
treed956f1f121f88a2fa782bf1f0ce51a752ba83408
parent175931bccd2ee9b58b19f92b7f3ca38bba765621 (diff)
CMake/debug: add more properties to fl_debug_target()
This commit is only for CMake debugging.
-rw-r--r--CMake/fl_debug_var.cmake24
1 files changed, 19 insertions, 5 deletions
diff --git a/CMake/fl_debug_var.cmake b/CMake/fl_debug_var.cmake
index 8f429889b..6b52e4db2 100644
--- a/CMake/fl_debug_var.cmake
+++ b/CMake/fl_debug_var.cmake
@@ -96,13 +96,27 @@ function(fl_debug_target name)
message(STATUS "+++ fl_debug_target(${name})")
set(var "${name}")
fl_expand_name(var "${name}" 40)
+
+ # these properties are always supported:
+ set(_props ALIASED_TARGET TYPE)
+
+ # these properties are not supported before 3.20 for *some* target types
+ if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.20)
+ list(APPEND _props
+ LOCATION
+ IMPORTED_LOCATION
+ INTERFACE_LOCATION)
+ endif()
+
+ # these properties are always supported:
+ list(APPEND _props
+ INTERFACE_INCLUDE_DIRECTORIES
+ INTERFACE_LINK_DIRECTORIES
+ INTERFACE_LINK_LIBRARIES)
+
if(TARGET ${name})
message(STATUS "${var} = <target>")
- foreach(prop
- ALIASED_TARGET
- INTERFACE_INCLUDE_DIRECTORIES
- INTERFACE_LINK_DIRECTORIES
- INTERFACE_LINK_LIBRARIES)
+ foreach(prop ${_props})
get_target_property(${prop} ${name} ${prop})
if(NOT ${prop})
set(${prop} "")