mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-11 17:13:37 +02:00
Better node names for 3p libraries in picture of dependencies
This commit is contained in:
@@ -301,6 +301,19 @@ function( export_symbol_define var module_name )
|
||||
set( "${var}" "${symbol}=${value}" PARENT_SCOPE )
|
||||
endfunction()
|
||||
|
||||
# shorten a target name for purposes of generating a dependency graph picture
|
||||
function( canonicalize_node_name var node )
|
||||
# strip generator expressions
|
||||
string( REGEX REPLACE ".*>.*:(.*)>" "\\1" node "${node}" )
|
||||
# omit the "-interface" for alias targets to modules
|
||||
string( REGEX REPLACE "-interface\$" "" node "${node}" )
|
||||
# shorten names of standard libraries or Apple frameworks
|
||||
string( REGEX REPLACE "^-(l|framework )" "" node "${node}" )
|
||||
# shorten paths
|
||||
get_filename_component( node "${node}" NAME_WE )
|
||||
set( "${var}" "${node}" PARENT_SCOPE )
|
||||
endfunction()
|
||||
|
||||
function( audacity_module_fn NAME SOURCES IMPORT_TARGETS
|
||||
ADDITIONAL_DEFINES ADDITIONAL_LIBRARIES LIBTYPE )
|
||||
|
||||
@@ -454,7 +467,7 @@ function( audacity_module_fn NAME SOURCES IMPORT_TARGETS
|
||||
if(IMPORT IN_LIST ACCESS)
|
||||
continue()
|
||||
endif()
|
||||
string( REGEX REPLACE "-interface\$" "" IMPORT "${IMPORT}" )
|
||||
canonicalize_node_name(IMPORT "${IMPORT}")
|
||||
list( APPEND GRAPH_EDGES "\"${TARGET}\" -> \"${IMPORT}\"" )
|
||||
endforeach()
|
||||
set( GRAPH_EDGES "${GRAPH_EDGES}" PARENT_SCOPE )
|
||||
|
Reference in New Issue
Block a user