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()

View File

@@ -46,6 +46,7 @@ endif()
# STL options
wx_option(wxUSE_STL "use standard C++ classes for everything" OFF)
set(wxTHIRD_PARTY_LIBRARIES ${wxTHIRD_PARTY_LIBRARIES} wxUSE_STL "use C++ STL classes")
wx_dependent_option(wxUSE_STD_CONTAINERS "use standard C++ container classes" ON "wxUSE_STL" OFF)
wx_option(wxUSE_UNICODE "compile with Unicode support (NOT RECOMMENDED to be turned off)")
@@ -82,6 +83,9 @@ if(UNIX)
wx_option(wxUSE_XTEST "use XTest extension")
wx_option(wxUSE_LIBMSPACK "use libmspack (CHM help files loading)")
wx_option(wxUSE_LIBGNOMEVFS "use GNOME VFS for associating MIME types")
set(wxTHIRD_PARTY_LIBRARIES ${wxTHIRD_PARTY_LIBRARIES} wxUSE_LIBSDL "use SDL for audio on Unix")
set(wxTHIRD_PARTY_LIBRARIES ${wxTHIRD_PARTY_LIBRARIES} wxUSE_LIBMSPACK "use libmspack (CHM help files loading)")
endif()
# ---------------------------------------------------------------------------