CMake: Improve layout of third party libraries summary

Add more external libraries to the summary, like configure does.
This commit is contained in:
Maarten Bent
2018-12-12 20:43:17 +01:00
parent 91b6305dcd
commit 5348b4fa3b
2 changed files with 30 additions and 6 deletions

View File

@@ -524,16 +524,36 @@ function(wx_add_thirdparty_library var_name lib_name help_str)
endfunction()
function(wx_print_thirdparty_library_summary)
set(nameLength 0)
set(nameValLength 0)
set(var_name)
set(message "Which libraries should wxWidgets use?\n")
foreach(entry IN
LISTS wxTHIRD_PARTY_LIBRARIES
ITEMS wxUSE_STL "Use C++ STL classes")
foreach(entry IN LISTS wxTHIRD_PARTY_LIBRARIES)
if(NOT var_name)
set(var_name ${entry})
else()
wx_string_append(message " ${var_name}: ${${var_name}} (${entry})\n")
string(LENGTH ${var_name} len)
if(len GREATER nameLength)
set(nameLength ${len})
endif()
string(LENGTH ${${var_name}} len)
if(len GREATER nameValLength)
set(nameValLength ${len})
endif()
set(var_name)
endif()
endforeach()
math(EXPR nameLength "${nameLength}+1") # account for :
set(message "Which libraries should wxWidgets use?\n")
foreach(entry IN LISTS wxTHIRD_PARTY_LIBRARIES)
if(NOT var_name)
set(var_name ${entry})
else()
set(namestr "${var_name}: ")
set(nameval "${${var_name}} ")
string(SUBSTRING ${namestr} 0 ${nameLength} namestr)
string(SUBSTRING ${nameval} 0 ${nameValLength} nameval)
wx_string_append(message " ${namestr} ${nameval} (${entry})\n")
set(var_name)
endif()
endforeach()