diff --git a/docs/maintainers/vcpkg_configure_make.md b/docs/maintainers/vcpkg_configure_make.md index ebf80521af7718..af0213bd5a141b 100644 --- a/docs/maintainers/vcpkg_configure_make.md +++ b/docs/maintainers/vcpkg_configure_make.md @@ -16,6 +16,7 @@ vcpkg_configure_make( [CONFIG_DEPENDENT_ENVIRONMENT ...] [CONFIGURE_ENVIRONMENT_VARIABLES ...] [ADD_BIN_TO_PATH] + [DISABLE_VERBOSE_FLAGS] [NO_DEBUG] [SKIP_CONFIGURE] [PROJECT_SUBPATH <${PROJ_SUBPATH}>] @@ -59,8 +60,8 @@ Script that needs to be called before configuration (do not use for batch files ### ADD_BIN_TO_PATH Adds the appropriate Release and Debug `bin\` directories to the path during configure such that executables can run against the in-tree DLLs. -## DISABLE_VERBOSE_FLAGS -do not pass '--disable-silent-rules --verbose' to configure +### DISABLE_VERBOSE_FLAGS +Do not pass '--disable-silent-rules --verbose' to configure. ### OPTIONS Additional options passed to configure during the configuration. diff --git a/scripts/cmake/vcpkg_configure_make.cmake b/scripts/cmake/vcpkg_configure_make.cmake index 535941379187a6..f0413a0abe34c3 100644 --- a/scripts/cmake/vcpkg_configure_make.cmake +++ b/scripts/cmake/vcpkg_configure_make.cmake @@ -15,6 +15,7 @@ vcpkg_configure_make( [CONFIG_DEPENDENT_ENVIRONMENT ...] [CONFIGURE_ENVIRONMENT_VARIABLES ...] [ADD_BIN_TO_PATH] + [DISABLE_VERBOSE_FLAGS] [NO_DEBUG] [SKIP_CONFIGURE] [PROJECT_SUBPATH <${PROJ_SUBPATH}>] @@ -58,8 +59,8 @@ Script that needs to be called before configuration (do not use for batch files ### ADD_BIN_TO_PATH Adds the appropriate Release and Debug `bin\` directories to the path during configure such that executables can run against the in-tree DLLs. -## DISABLE_VERBOSE_FLAGS -do not pass '--disable-silent-rules --verbose' to configure +### DISABLE_VERBOSE_FLAGS +Do not pass '--disable-silent-rules --verbose' to configure. ### OPTIONS Additional options passed to configure during the configuration. @@ -208,19 +209,6 @@ macro(z_vcpkg_append_to_configure_environment inoutstring var defaultval) endif() endmacro() -# Setup include environment (since these are buildtype independent restoring them is unnecessary) -macro(z_prepend_include_path var) - unset(ENV{${var}}) - if(NOT DEFINED z_vcpkg_env_backup_${var} OR "${z_vcpkg_env_backup_${var}}" STREQUAL "") - vcpkg_host_path_list(APPEND ENV{${var}} "${CURRENT_INSTALLED_DIR}/include") - else() - foreach (one_bk IN ITEMS ${z_vcpkg_env_backup_${var}}) - vcpkg_host_path_list(PREPEND ENV{${var}} "${one_bk}") - endforeach() - vcpkg_host_path_list(PREPEND ENV{${var}} "${CURRENT_INSTALLED_DIR}/include") - endif() -endmacro() - macro(z_convert_to_list input output) string(REGEX MATCHALL "(( +|^ *)[^ ]+)" ${output} "${${input}}") endmacro() @@ -544,10 +532,10 @@ function(vcpkg_configure_make) endif() # Used by CL - z_prepend_include_path(INCLUDE) + vcpkg_host_path_list(PREPEND ENV{INCLUDE} "${CURRENT_INSTALLED_DIR}/include") # Used by GCC - z_prepend_include_path(C_INCLUDE_PATH) - z_prepend_include_path(CPLUS_INCLUDE_PATH) + vcpkg_host_path_list(PREPEND ENV{C_INCLUDE_PATH} "${CURRENT_INSTALLED_DIR}/include") + vcpkg_host_path_list(PREPEND ENV{CPLUS_INCLUDE_PATH} "${CURRENT_INSTALLED_DIR}/include") # Flags should be set in the toolchain instead (Setting this up correctly requires a function named vcpkg_determined_cmake_compiler_flags which can also be used to setup CC and CXX etc.) if(VCPKG_TARGET_IS_WINDOWS)