mirror of
https://github.com/fltk/fltk.git
synced 2026-05-31 22:04:26 +08:00
CMake/debug: add more properties to fl_debug_target()
This commit is only for CMake debugging.
This commit is contained in:
@@ -96,13 +96,27 @@ function(fl_debug_target name)
|
|||||||
message(STATUS "+++ fl_debug_target(${name})")
|
message(STATUS "+++ fl_debug_target(${name})")
|
||||||
set(var "${name}")
|
set(var "${name}")
|
||||||
fl_expand_name(var "${name}" 40)
|
fl_expand_name(var "${name}" 40)
|
||||||
if(TARGET ${name})
|
|
||||||
message(STATUS "${var} = <target>")
|
# these properties are always supported:
|
||||||
foreach(prop
|
set(_props ALIASED_TARGET TYPE)
|
||||||
ALIASED_TARGET
|
|
||||||
|
# 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_INCLUDE_DIRECTORIES
|
||||||
INTERFACE_LINK_DIRECTORIES
|
INTERFACE_LINK_DIRECTORIES
|
||||||
INTERFACE_LINK_LIBRARIES)
|
INTERFACE_LINK_LIBRARIES)
|
||||||
|
|
||||||
|
if(TARGET ${name})
|
||||||
|
message(STATUS "${var} = <target>")
|
||||||
|
foreach(prop ${_props})
|
||||||
get_target_property(${prop} ${name} ${prop})
|
get_target_property(${prop} ${name} ${prop})
|
||||||
if(NOT ${prop})
|
if(NOT ${prop})
|
||||||
set(${prop} "")
|
set(${prop} "")
|
||||||
|
|||||||
Reference in New Issue
Block a user