Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions docs/maintainers/vcpkg_configure_make.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ vcpkg_configure_make(
[CONFIG_DEPENDENT_ENVIRONMENT <SOME_VAR>...]
[CONFIGURE_ENVIRONMENT_VARIABLES <SOME_ENVVAR>...]
[ADD_BIN_TO_PATH]
[DISABLE_VERBOSE_FLAGS]
[NO_DEBUG]
[SKIP_CONFIGURE]
[PROJECT_SUBPATH <${PROJ_SUBPATH}>]
Expand Down Expand Up @@ -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.
Expand Down
24 changes: 6 additions & 18 deletions scripts/cmake/vcpkg_configure_make.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ vcpkg_configure_make(
[CONFIG_DEPENDENT_ENVIRONMENT <SOME_VAR>...]
[CONFIGURE_ENVIRONMENT_VARIABLES <SOME_ENVVAR>...]
[ADD_BIN_TO_PATH]
[DISABLE_VERBOSE_FLAGS]
[NO_DEBUG]
[SKIP_CONFIGURE]
[PROJECT_SUBPATH <${PROJ_SUBPATH}>]
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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)
Expand Down