Add cmake function ShowCMakeVars and display configured paths in build

This commit is contained in:
Hans-Peter Jansen 2021-10-02 18:00:31 +02:00 committed by akallabeth
parent aa4c3dfb8a
commit 35cd866075
2 changed files with 24 additions and 0 deletions

View File

@ -63,6 +63,7 @@ include(FindPkgConfig)
include(TestBigEndian) include(TestBigEndian)
include(FindFeature) include(FindFeature)
include(ShowCMakeVars)
include(ConfigOptions) include(ConfigOptions)
include(ComplexLibrary) include(ComplexLibrary)
include(FeatureSummary) include(FeatureSummary)
@ -1019,3 +1020,11 @@ FOREACH(var ${res})
ENDFOREACH() ENDFOREACH()
string(REPLACE ";" " " FREERDP_BUILD_CONFIG "${FREERDP_BUILD_CONFIG_LIST}") string(REPLACE ";" " " FREERDP_BUILD_CONFIG "${FREERDP_BUILD_CONFIG_LIST}")
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/buildflags.h.in ${CMAKE_CURRENT_BINARY_DIR}/buildflags.h) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/buildflags.h.in ${CMAKE_CURRENT_BINARY_DIR}/buildflags.h)
message(STATUS "Intrinsic path configuration:")
#ShowCMakeVars("^CMAKE_INSTALL_PREFIX")
#ShowCMakeVars("^CMAKE_INSTALL_LIBDIR")
ShowCMakeVars("^FREERDP_INSTALL_PREFIX|^FREERDP_LIBRARY_PATH|^FREERDP_PLUGIN_PATH")
ShowCMakeVars("^FREERDP_ADDIN_PATH|^FREERDP_EXTENSION_PATH|^FREERDP_PROXY_PLUGINDIR")

15
cmake/ShowCMakeVars.cmake Normal file
View File

@ -0,0 +1,15 @@
function(ShowCMakeVars)
get_cmake_property(_variableNames VARIABLES)
list (SORT _variableNames)
foreach (_variableName ${_variableNames})
if (ARGV0)
unset(MATCHED)
string(REGEX MATCH ${ARGV0} MATCHED ${_variableName})
if (NOT MATCHED)
continue()
endif()
endif()
message(STATUS "${_variableName}=${${_variableName}}")
endforeach()
endfunction()