mirror of
https://github.com/cookiengineer/audacity
synced 2026-01-20 15:55:45 +01: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 )
|
set( "${var}" "${symbol}=${value}" PARENT_SCOPE )
|
||||||
endfunction()
|
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
|
function( audacity_module_fn NAME SOURCES IMPORT_TARGETS
|
||||||
ADDITIONAL_DEFINES ADDITIONAL_LIBRARIES LIBTYPE )
|
ADDITIONAL_DEFINES ADDITIONAL_LIBRARIES LIBTYPE )
|
||||||
|
|
||||||
@@ -454,7 +467,7 @@ function( audacity_module_fn NAME SOURCES IMPORT_TARGETS
|
|||||||
if(IMPORT IN_LIST ACCESS)
|
if(IMPORT IN_LIST ACCESS)
|
||||||
continue()
|
continue()
|
||||||
endif()
|
endif()
|
||||||
string( REGEX REPLACE "-interface\$" "" IMPORT "${IMPORT}" )
|
canonicalize_node_name(IMPORT "${IMPORT}")
|
||||||
list( APPEND GRAPH_EDGES "\"${TARGET}\" -> \"${IMPORT}\"" )
|
list( APPEND GRAPH_EDGES "\"${TARGET}\" -> \"${IMPORT}\"" )
|
||||||
endforeach()
|
endforeach()
|
||||||
set( GRAPH_EDGES "${GRAPH_EDGES}" PARENT_SCOPE )
|
set( GRAPH_EDGES "${GRAPH_EDGES}" PARENT_SCOPE )
|
||||||
|
|||||||
@@ -1365,8 +1365,7 @@ endif()
|
|||||||
list( APPEND GRAPH_EDGES "Audacity [shape=house]" )
|
list( APPEND GRAPH_EDGES "Audacity [shape=house]" )
|
||||||
foreach( LIBRARY ${LIBRARIES} )
|
foreach( LIBRARY ${LIBRARIES} )
|
||||||
if (NOT LIBRARY MATCHES "PUBLIC|PRIVATE|INTERFACE")
|
if (NOT LIBRARY MATCHES "PUBLIC|PRIVATE|INTERFACE")
|
||||||
string( REGEX REPLACE ".*>.*:(.*)>" "\\1" LIBRARY "${LIBRARY}" )
|
canonicalize_node_name(LIBRARY "${LIBRARY}")
|
||||||
string( REGEX REPLACE "^-(l|framework )" "" LIBRARY "${LIBRARY}" )
|
|
||||||
list( APPEND GRAPH_EDGES "\"${TARGET}\" -> \"${LIBRARY}\"" )
|
list( APPEND GRAPH_EDGES "\"${TARGET}\" -> \"${LIBRARY}\"" )
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|||||||
Reference in New Issue
Block a user