[scripts-audit] Make buildsystem (#20165)

* [script-audit] Make buildsystem

* Fix wrongly merge

* Fix rename

* Format

* Apply suggestions

* Apply suggestion

* Fix bug

* Change the function names

* Fix command line

* Apply suggestions

* version

* typo

* Apply suggestions

* Fix bug

* Fix path

* Fix bug

* Fix un=parser code, move macros to the top

* Apply suggestions

* Update docs

* update doc

* CRLF

* add docs and add a PARENT_SCOPE

* Update doc

Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
This commit is contained in:
Jack·Boos·Yu 2021-10-21 05:12:58 +08:00 committed by GitHub
parent a79d4a8ec7
commit 5283cdb370
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 526 additions and 463 deletions

View File

@ -5,6 +5,7 @@
- [vcpkg\_acquire\_msys](vcpkg_acquire_msys.md)
- [vcpkg\_add\_to\_path](vcpkg_add_to_path.md)
- [vcpkg\_apply\_patches](vcpkg_apply_patches.md) (deprecated)
- [vcpkg\_backup\_restore\_env\_vars](vcpkg_backup_restore_env_vars.md)
- [vcpkg\_build\_cmake](vcpkg_build_cmake.md) (deprecated, use [vcpkg\_cmake\_build](ports/vcpkg-cmake/vcpkg_cmake_build.md))
- [vcpkg\_build\_make](vcpkg_build_make.md)
- [vcpkg\_build\_msbuild](vcpkg_build_msbuild.md)

View File

@ -0,0 +1,26 @@
# vcpkg_backup_restore_env_vars
The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_backup_restore_env_vars.md).
Backup or restore the environment variables
## Usage:
```cmake
vcpkg_backup_env_variables(VARS [<environment-variable>...])
vcpkg_restore_env_variables(VARS [<environment-variable>...])
```
### VARS
The variables to back up or restore.
These are placed in the parent scope, so you must backup and restore
from the same scope.
## Notes
One must always call `vcpkg_backup_env_variables` before
`vcpkg_restore_env_variables`; however, `vcpkg_restore_env_variables`
does not change the back up variables, and so you may call `restore`
multiple times for one `backup`.
## Source
[scripts/cmake/vcpkg\_backup\_restore\_env\_vars.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_backup_restore_env_vars.cmake)

View File

@ -17,8 +17,8 @@ get_filename_component(NASM_EXE_PATH ${NASM} DIRECTORY)
vcpkg_add_to_path(${NASM_EXE_PATH})
if(VCPKG_TARGET_IS_WINDOWS)
_vcpkg_determine_autotools_host_cpu(BUILD_ARCH)
_vcpkg_determine_autotools_target_cpu(HOST_ARCH)
z_vcpkg_determine_autotools_host_cpu(BUILD_ARCH)
z_vcpkg_determine_autotools_target_cpu(HOST_ARCH)
list(APPEND OPTIONS --build=${BUILD_ARCH}-pc-mingw32)
list(APPEND OPTIONS --host=${HOST_ARCH}-pc-mingw32)
set(ENV{AS} "${NASM}")

View File

@ -1,7 +1,7 @@
{
"name": "x264",
"version-string": "157-303c484ec828ed0",
"port-version": 15,
"port-version": 16,
"description": "x264 is a free software library and application for encoding video streams into the H.264/MPEG-4 AVC compression format",
"homepage": "https://github.com/mirror/x264",
"supports": "!arm",

View File

@ -0,0 +1,59 @@
#[===[.md:
# vcpkg_backup_restore_env_vars
Backup or restore the environment variables
## Usage:
```cmake
vcpkg_backup_env_variables(VARS [<environment-variable>...])
vcpkg_restore_env_variables(VARS [<environment-variable>...])
```
### VARS
The variables to back up or restore.
These are placed in the parent scope, so you must backup and restore
from the same scope.
## Notes
One must always call `vcpkg_backup_env_variables` before
`vcpkg_restore_env_variables`; however, `vcpkg_restore_env_variables`
does not change the back up variables, and so you may call `restore`
multiple times for one `backup`.
#]===]
function(vcpkg_backup_env_variables)
cmake_parse_arguments(PARSE_ARGV 0 arg "" "" "VARS")
if(NOT DEFINED arg_VARS)
message(FATAL_ERROR "VARS must be defined.")
endif()
if(DEFINED arg_UNPARSED_ARGUMENTS)
message(FATAL_ERROR "${CMAKE_CURRENT_FUNCTION} was passed extra arguments: ${arg_UNPARSED_ARGUMENTS}")
endif()
foreach(envvar IN LISTS arg_VARS)
if(DEFINED ENV{${envvar}})
set("z_vcpkg_env_backup_${envvar}" "$ENV{${envvar}}" PARENT_SCOPE)
else()
unset("z_vcpkg_env_backup_${envvar}" PARENT_SCOPE)
endif()
endforeach()
endfunction()
function(vcpkg_restore_env_variables)
cmake_parse_arguments(PARSE_ARGV 0 arg "" "" "VARS")
if(NOT DEFINED arg_VARS)
message(FATAL_ERROR "VARS must be defined.")
endif()
if(DEFINED arg_UNPARSED_ARGUMENTS)
message(FATAL_ERROR "${CMAKE_CURRENT_FUNCTION} was passed extra arguments: ${arg_UNPARSED_ARGUMENTS}")
endif()
foreach(envvar IN LISTS arg_VARS)
if(DEFINED z_vcpkg_env_backup_${envvar})
set("ENV{${envvar}}" "${z_vcpkg_env_backup_${envvar}}")
else()
unset("ENV{${envvar}}")
endif()
endforeach()
endfunction()

View File

@ -55,48 +55,54 @@ function(vcpkg_build_make)
include("${cmake_vars_file}")
# parse parameters such that semicolons in options arguments to COMMAND don't get erased
cmake_parse_arguments(PARSE_ARGV 0 _bc "ADD_BIN_TO_PATH;ENABLE_INSTALL;DISABLE_PARALLEL" "LOGFILE_ROOT;BUILD_TARGET;SUBPATH;MAKEFILE;INSTALL_TARGET" "")
cmake_parse_arguments(PARSE_ARGV 0 arg
"ADD_BIN_TO_PATH;ENABLE_INSTALL;DISABLE_PARALLEL"
"LOGFILE_ROOT;BUILD_TARGET;SUBPATH;MAKEFILE;INSTALL_TARGET"
"OPTIONS"
)
if(NOT _bc_LOGFILE_ROOT)
set(_bc_LOGFILE_ROOT "build")
if(DEFINED arg_UNPARSED_ARGUMENTS)
message(WARNING "vcpkg_make_build was passed extra arguments: ${arg_UNPARSED_ARGUMENTS}")
endif()
if(NOT _bc_BUILD_TARGET)
set(_bc_BUILD_TARGET "all")
if(NOT DEFINED arg_LOGFILE_ROOT)
set(arg_LOGFILE_ROOT "build")
endif()
if (NOT _bc_MAKEFILE)
set(_bc_MAKEFILE Makefile)
if(NOT DEFINED arg_BUILD_TARGET)
set(arg_BUILD_TARGET "all")
endif()
if(NOT _bc_INSTALL_TARGET)
set(_bc_INSTALL_TARGET "install")
if (NOT DEFINED arg_MAKEFILE)
set(arg_MAKEFILE Makefile)
endif()
if(NOT DEFINED arg_INSTALL_TARGET)
set(arg_INSTALL_TARGET "install")
endif()
if(WIN32)
set(_VCPKG_PREFIX ${CURRENT_PACKAGES_DIR})
set(_VCPKG_INSTALLED ${CURRENT_INSTALLED_DIR})
set(Z_VCPKG_INSTALLED ${CURRENT_INSTALLED_DIR})
else()
string(REPLACE " " "\ " _VCPKG_PREFIX "${CURRENT_PACKAGES_DIR}")
string(REPLACE " " "\ " _VCPKG_INSTALLED "${CURRENT_INSTALLED_DIR}")
string(REPLACE " " "\ " Z_VCPKG_INSTALLED "${CURRENT_INSTALLED_DIR}")
endif()
set(MAKE_OPTS )
set(INSTALL_OPTS )
vcpkg_list(SET make_opts)
vcpkg_list(SET install_opts)
if (CMAKE_HOST_WIN32)
set(PATH_GLOBAL "$ENV{PATH}")
set(path_backup "$ENV{PATH}")
vcpkg_add_to_path(PREPEND "${SCRIPTS}/buildsystems/make_wrapper")
if(NOT DEFINED Z_VCPKG_MAKE)
vcpkg_acquire_msys(MSYS_ROOT)
find_program(Z_VCPKG_MAKE make PATHS "${MSYS_ROOT}/usr/bin" NO_DEFAULT_PATH REQUIRED)
endif()
set(MAKE_COMMAND "${Z_VCPKG_MAKE}")
set(MAKE_OPTS ${_bc_MAKE_OPTIONS} -j ${VCPKG_CONCURRENCY} --trace -f ${_bc_MAKEFILE} ${_bc_BUILD_TARGET})
set(NO_PARALLEL_MAKE_OPTS ${_bc_MAKE_OPTIONS} -j 1 --trace -f ${_bc_MAKEFILE} ${_bc_BUILD_TARGET})
set(make_command "${Z_VCPKG_MAKE}")
vcpkg_list(SET make_opts ${arg_OPTIONS} ${arg_MAKE_OPTIONS} -j ${VCPKG_CONCURRENCY} --trace -f ${arg_MAKEFILE} ${arg_BUILD_TARGET})
vcpkg_list(SET no_parallel_make_opts ${arg_OPTIONS} ${arg_MAKE_OPTIONS} -j 1 --trace -f ${arg_MAKEFILE} ${arg_BUILD_TARGET})
string(REPLACE " " "\\\ " _VCPKG_PACKAGE_PREFIX ${CURRENT_PACKAGES_DIR})
string(REGEX REPLACE "([a-zA-Z]):/" "/\\1/" _VCPKG_PACKAGE_PREFIX "${_VCPKG_PACKAGE_PREFIX}")
set(INSTALL_OPTS -j ${VCPKG_CONCURRENCY} --trace -f ${_bc_MAKEFILE} ${_bc_INSTALL_TARGET} DESTDIR=${_VCPKG_PACKAGE_PREFIX})
string(REPLACE " " [[\ ]] vcpkg_package_prefix "${CURRENT_PACKAGES_DIR}")
string(REGEX REPLACE [[([a-zA-Z]):/]] [[/\1/]] vcpkg_package_prefix "${vcpkg_package_prefix}")
vcpkg_list(SET install_opts -j ${VCPKG_CONCURRENCY} --trace -f ${arg_MAKEFILE} ${arg_INSTALL_TARGET} DESTDIR=${vcpkg_package_prefix})
#TODO: optimize for install-data (release) and install-exec (release/debug)
else()
if(VCPKG_HOST_IS_OPENBSD)
@ -104,144 +110,127 @@ function(vcpkg_build_make)
else()
find_program(Z_VCPKG_MAKE make REQUIRED)
endif()
set(MAKE_COMMAND "${Z_VCPKG_MAKE}")
set(MAKE_OPTS ${_bc_MAKE_OPTIONS} V=1 -j ${VCPKG_CONCURRENCY} -f ${_bc_MAKEFILE} ${_bc_BUILD_TARGET})
set(NO_PARALLEL_MAKE_OPTS ${_bc_MAKE_OPTIONS} V=1 -j 1 -f ${_bc_MAKEFILE} ${_bc_BUILD_TARGET})
set(INSTALL_OPTS -j ${VCPKG_CONCURRENCY} -f ${_bc_MAKEFILE} ${_bc_INSTALL_TARGET} DESTDIR=${CURRENT_PACKAGES_DIR})
set(make_command "${Z_VCPKG_MAKE}")
vcpkg_list(SET make_opts ${arg_MAKE_OPTIONS} V=1 -j ${VCPKG_CONCURRENCY} -f ${arg_MAKEFILE} ${arg_BUILD_TARGET})
vcpkg_list(SET no_parallel_make_opts ${arg_MAKE_OPTIONS} V=1 -j 1 -f ${arg_MAKEFILE} ${arg_BUILD_TARGET})
vcpkg_list(SET install_opts -j ${VCPKG_CONCURRENCY} -f ${arg_MAKEFILE} ${arg_INSTALL_TARGET} DESTDIR=${CURRENT_PACKAGES_DIR})
endif()
# Since includes are buildtype independent those are setup by vcpkg_configure_make
_vcpkg_backup_env_variables(LIB LIBPATH LIBRARY_PATH LD_LIBRARY_PATH)
vcpkg_backup_env_variables(VARS LIB LIBPATH LIBRARY_PATH LD_LIBRARY_PATH)
foreach(BUILDTYPE "debug" "release")
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL BUILDTYPE)
if(BUILDTYPE STREQUAL "debug")
# Skip debug generate
if (_VCPKG_NO_DEBUG)
continue()
endif()
set(SHORT_BUILDTYPE "-dbg")
set(CMAKE_BUILDTYPE "DEBUG")
set(PATH_SUFFIX "/debug")
foreach(buildtype IN ITEMS "debug" "release")
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "${buildtype}")
if("${buildtype}" STREQUAL "debug")
set(short_buildtype "-dbg")
set(cmake_buildtype "DEBUG")
set(path_suffix "/debug")
else()
# In NO_DEBUG mode, we only use ${TARGET_TRIPLET} directory.
if (_VCPKG_NO_DEBUG)
set(SHORT_BUILDTYPE "")
else()
set(SHORT_BUILDTYPE "-rel")
endif()
set(CMAKE_BUILDTYPE "RELEASE")
set(PATH_SUFFIX "")
set(short_buildtype "-rel")
set(cmake_buildtype "RELEASE")
set(path_suffix "")
endif()
set(WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}${SHORT_BUILDTYPE}${_bc_SUBPATH}")
message(STATUS "Building ${TARGET_TRIPLET}${SHORT_BUILDTYPE}")
set(working_directory "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}${short_buildtype}${arg_SUBPATH}")
message(STATUS "Building ${TARGET_TRIPLET}${short_buildtype}")
_vcpkg_extract_cpp_flags_and_set_cflags_and_cxxflags(${CMAKE_BUILDTYPE})
z_vcpkg_extract_cpp_flags_and_set_cflags_and_cxxflags("${cmake_buildtype}")
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
set(LINKER_FLAGS_${CMAKE_BUILDTYPE} "${VCPKG_DETECTED_STATIC_LINKER_FLAGS_${CMAKE_BUILDTYPE}}")
set(LINKER_FLAGS_${cmake_buildtype} "${VCPKG_DETECTED_STATIC_LINKER_FLAGS_${cmake_buildtype}}")
else() # dynamic
set(LINKER_FLAGS_${CMAKE_BUILDTYPE} "${VCPKG_DETECTED_SHARED_LINKER_FLAGS_${CMAKE_BUILDTYPE}}")
set(LINKER_FLAGS_${cmake_buildtype} "${VCPKG_DETECTED_SHARED_LINKER_FLAGS_${cmake_buildtype}}")
endif()
if (CMAKE_HOST_WIN32 AND VCPKG_DETECTED_C_COMPILER MATCHES "cl.exe")
set(LDFLAGS_${CMAKE_BUILDTYPE} "-L${_VCPKG_INSTALLED}${PATH_SUFFIX}/lib -L${_VCPKG_INSTALLED}${PATH_SUFFIX}/lib/manual-link")
set(LINK_ENV_${CMAKE_BUILDTYPE} "$ENV{_LINK_} ${LINKER_FLAGS_${CMAKE_BUILDTYPE}}")
if (CMAKE_HOST_WIN32 AND VCPKG_DETECTED_CMAKE_C_COMPILER MATCHES "cl.exe")
set(LDFLAGS_${cmake_buildtype} "-L${Z_VCPKG_INSTALLED}${path_suffix}/lib -L${Z_VCPKG_INSTALLED}${path_suffix}/lib/manual-link")
set(LINK_ENV_${cmake_buildtype} "$ENV{_LINK_} ${LINKER_FLAGS_${cmake_buildtype}}")
else()
set(LDFLAGS_${CMAKE_BUILDTYPE} "-L${_VCPKG_INSTALLED}${PATH_SUFFIX}/lib -L${_VCPKG_INSTALLED}${PATH_SUFFIX}/lib/manual-link ${LINKER_FLAGS_${CMAKE_BUILDTYPE}}")
set(LDFLAGS_${cmake_buildtype} "-L${Z_VCPKG_INSTALLED}${path_suffix}/lib -L${Z_VCPKG_INSTALLED}${path_suffix}/lib/manual-link ${LINKER_FLAGS_${cmake_buildtype}}")
endif()
# Setup environment
set(ENV{CPPFLAGS} "${CPPFLAGS_${CMAKE_BUILDTYPE}}")
set(ENV{CFLAGS} "${CFLAGS_${CMAKE_BUILDTYPE}}")
set(ENV{CXXFLAGS} "${CXXFLAGS_${CMAKE_BUILDTYPE}}")
set(ENV{RCFLAGS} "${VCPKG_DETECTED_CMAKE_RC_FLAGS_${CMAKE_BUILDTYPE}}")
set(ENV{LDFLAGS} "${LDFLAGS_${CMAKE_BUILDTYPE}}")
set(ENV{LIB} "${_VCPKG_INSTALLED}${PATH_SUFFIX}/lib/${VCPKG_HOST_PATH_SEPARATOR}${_VCPKG_INSTALLED}${PATH_SUFFIX}/lib/manual-link/${LIB_PATHLIKE_CONCAT}")
set(ENV{LIBPATH} "${_VCPKG_INSTALLED}${PATH_SUFFIX}/lib/${VCPKG_HOST_PATH_SEPARATOR}${_VCPKG_INSTALLED}${PATH_SUFFIX}/lib/manual-link/${LIBPATH_PATHLIKE_CONCAT}")
set(ENV{LIBRARY_PATH} "${_VCPKG_INSTALLED}${PATH_SUFFIX}/lib/${VCPKG_HOST_PATH_SEPARATOR}${_VCPKG_INSTALLED}${PATH_SUFFIX}/lib/manual-link/${LIBRARY_PATH_PATHLIKE_CONCAT}")
#set(ENV{LD_LIBRARY_PATH} "${_VCPKG_INSTALLED}${PATH_SUFFIX_${BUILDTYPE}}/lib/${VCPKG_HOST_PATH_SEPARATOR}${_VCPKG_INSTALLED}${PATH_SUFFIX_${BUILDTYPE}}/lib/manual-link/${LD_LIBRARY_PATH_PATHLIKE_CONCAT}")
set(ENV{CPPFLAGS} "${CPPFLAGS_${cmake_buildtype}}")
set(ENV{CFLAGS} "${CFLAGS_${cmake_buildtype}}")
set(ENV{CXXFLAGS} "${CXXFLAGS_${cmake_buildtype}}")
set(ENV{RCFLAGS} "${VCPKG_DETECTED_CMAKE_RC_FLAGS_${cmake_buildtype}}")
set(ENV{LDFLAGS} "${LDFLAGS_${cmake_buildtype}}")
vcpkg_host_path_list(PREPEND ENV{LIB} "${Z_VCPKG_INSTALLED}${path_suffix}/lib/" "${Z_VCPKG_INSTALLED}${path_suffix}/lib/manual-link/")
vcpkg_host_path_list(PREPEND ENV{LIBPATH} "${Z_VCPKG_INSTALLED}${path_suffix}/lib/" "${Z_VCPKG_INSTALLED}${path_suffix}/lib/manual-link/")
vcpkg_host_path_list(PREPEND ENV{LIBRARY_PATH} "${Z_VCPKG_INSTALLED}${path_suffix_${buildtype}}/lib/" "${Z_VCPKG_INSTALLED}${path_suffix}/lib/manual-link/")
#vcpkg_host_path_list(PREPEND ENV{LD_LIBRARY_PATH} "${Z_VCPKG_INSTALLED}${path_suffix}/lib/" "${Z_VCPKG_INSTALLED}${path_suffix_${buildtype}}/lib/manual-link/")
if(LINK_ENV_${_VAR_SUFFIX})
set(_LINK_CONFIG_BACKUP "$ENV{_LINK_}")
set(config_link_backup "$ENV{_LINK_}")
set(ENV{_LINK_} "${LINK_ENV_${_VAR_SUFFIX}}")
endif()
if(_bc_ADD_BIN_TO_PATH)
set(_BACKUP_ENV_PATH "$ENV{PATH}")
vcpkg_add_to_path(PREPEND "${CURRENT_INSTALLED_DIR}${PATH_SUFFIX}/bin")
if(arg_ADD_BIN_TO_PATH)
set(env_backup_path "$ENV{PATH}")
vcpkg_add_to_path(PREPEND "${CURRENT_INSTALLED_DIR}${path_suffix}/bin")
endif()
if(MAKE_BASH)
set(MAKE_CMD_LINE "${MAKE_COMMAND} ${MAKE_OPTS}")
set(NO_PARALLEL_MAKE_CMD_LINE "${MAKE_COMMAND} ${NO_PARALLEL_MAKE_OPTS}")
else()
set(MAKE_CMD_LINE ${MAKE_COMMAND} ${MAKE_OPTS})
set(NO_PARALLEL_MAKE_CMD_LINE ${MAKE_COMMAND} ${NO_PARALLEL_MAKE_OPTS})
endif()
vcpkg_list(SET make_cmd_line ${make_command} ${make_opts})
vcpkg_list(SET no_parallel_make_cmd_line ${make_command} ${no_parallel_make_opts})
if (_bc_DISABLE_PARALLEL)
if (arg_DISABLE_PARALLEL)
vcpkg_execute_build_process(
COMMAND ${MAKE_BASH} ${NO_PARALLEL_MAKE_CMD_LINE}
WORKING_DIRECTORY "${WORKING_DIRECTORY}"
LOGNAME "${_bc_LOGFILE_ROOT}-${TARGET_TRIPLET}${SHORT_BUILDTYPE}"
COMMAND ${no_parallel_make_cmd_line}
WORKING_DIRECTORY "${working_directory}"
LOGNAME "${arg_LOGFILE_ROOT}-${TARGET_TRIPLET}${short_buildtype}"
)
else()
vcpkg_execute_build_process(
COMMAND ${MAKE_BASH} ${MAKE_CMD_LINE}
NO_PARALLEL_COMMAND ${MAKE_BASH} ${NO_PARALLEL_MAKE_CMD_LINE}
WORKING_DIRECTORY "${WORKING_DIRECTORY}"
LOGNAME "${_bc_LOGFILE_ROOT}-${TARGET_TRIPLET}${SHORT_BUILDTYPE}"
COMMAND ${make_cmd_line}
NO_PARALLEL_COMMAND ${no_parallel_make_cmd_line}
WORKING_DIRECTORY "${working_directory}"
LOGNAME "${arg_LOGFILE_ROOT}-${TARGET_TRIPLET}${short_buildtype}"
)
endif()
file(READ "${CURRENT_BUILDTREES_DIR}/${_bc_LOGFILE_ROOT}-${TARGET_TRIPLET}${SHORT_BUILDTYPE}-out.log" LOGDATA)
if(LOGDATA MATCHES "Warning: linker path does not have real file for library")
file(READ "${CURRENT_BUILDTREES_DIR}/${arg_LOGFILE_ROOT}-${TARGET_TRIPLET}${short_buildtype}-out.log" logdata)
if(logdata MATCHES "Warning: linker path does not have real file for library")
message(FATAL_ERROR "libtool could not find a file being linked against!")
endif()
if (_bc_ENABLE_INSTALL)
message(STATUS "Installing ${TARGET_TRIPLET}${SHORT_BUILDTYPE}")
if(MAKE_BASH)
set(MAKE_CMD_LINE "${MAKE_COMMAND} ${INSTALL_OPTS}")
else()
set(MAKE_CMD_LINE ${MAKE_COMMAND} ${INSTALL_OPTS})
endif()
if (arg_ENABLE_INSTALL)
message(STATUS "Installing ${TARGET_TRIPLET}${short_buildtype}")
vcpkg_list(SET make_cmd_line ${make_command} ${install_opts})
vcpkg_execute_build_process(
COMMAND ${MAKE_BASH} ${MAKE_CMD_LINE}
WORKING_DIRECTORY "${WORKING_DIRECTORY}"
LOGNAME "install-${TARGET_TRIPLET}${SHORT_BUILDTYPE}"
COMMAND ${make_cmd_line}
WORKING_DIRECTORY "${working_directory}"
LOGNAME "install-${TARGET_TRIPLET}${short_buildtype}"
)
endif()
if(_LINK_CONFIG_BACKUP)
set(ENV{_LINK_} "${_LINK_CONFIG_BACKUP}")
unset(_LINK_CONFIG_BACKUP)
if(config_link_backup)
set(ENV{_LINK_} "${config_link_backup}")
unset(config_link_backup)
endif()
if(_bc_ADD_BIN_TO_PATH)
set(ENV{PATH} "${_BACKUP_ENV_PATH}")
if(arg_ADD_BIN_TO_PATH)
set(ENV{PATH} "${env_backup_path}")
endif()
endif()
endforeach()
if (_bc_ENABLE_INSTALL)
string(REGEX REPLACE "([a-zA-Z]):/" "/\\1/" _VCPKG_INSTALL_PREFIX "${CURRENT_INSTALLED_DIR}")
if (arg_ENABLE_INSTALL)
string(REGEX REPLACE "([a-zA-Z]):/" "/\\1/" Z_VCPKG_INSTALL_PREFIX "${CURRENT_INSTALLED_DIR}")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}_tmp")
file(RENAME "${CURRENT_PACKAGES_DIR}" "${CURRENT_PACKAGES_DIR}_tmp")
file(RENAME "${CURRENT_PACKAGES_DIR}_tmp${_VCPKG_INSTALL_PREFIX}" "${CURRENT_PACKAGES_DIR}")
file(RENAME "${CURRENT_PACKAGES_DIR}_tmp${Z_VCPKG_INSTALL_PREFIX}" "${CURRENT_PACKAGES_DIR}")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}_tmp")
endif()
# Remove libtool files since they contain absolute paths and are not necessary.
file(GLOB_RECURSE LIBTOOL_FILES "${CURRENT_PACKAGES_DIR}/**/*.la")
if(LIBTOOL_FILES)
file(REMOVE ${LIBTOOL_FILES})
file(GLOB_RECURSE libtool_files "${CURRENT_PACKAGES_DIR}/**/*.la")
if(libtool_files)
file(REMOVE ${libtool_files})
endif()
if (CMAKE_HOST_WIN32)
set(ENV{PATH} "${PATH_GLOBAL}")
set(ENV{PATH} "${path_backup}")
endif()
_vcpkg_restore_env_variables(LIB LIBPATH LIBRARY_PATH LD_LIBRARY_PATH)
vcpkg_restore_env_variables(VARS LIB LIBPATH LIBRARY_PATH LD_LIBRARY_PATH)
endfunction()

File diff suppressed because it is too large Load Diff

View File

@ -23,5 +23,9 @@ This command transparently forwards to [`vcpkg_build_make()`](vcpkg_build_make.m
#]===]
function(vcpkg_install_make)
vcpkg_build_make(${ARGN} LOGFILE_ROOT ENABLE_INSTALL)
vcpkg_build_make(
${ARGN}
LOGFILE_ROOT
ENABLE_INSTALL
)
endfunction()

View File

@ -6,6 +6,7 @@ include("${SCRIPTS}/cmake/execute_process.cmake")
include("${SCRIPTS}/cmake/vcpkg_acquire_msys.cmake")
include("${SCRIPTS}/cmake/vcpkg_add_to_path.cmake")
include("${SCRIPTS}/cmake/vcpkg_apply_patches.cmake")
include("${SCRIPTS}/cmake/vcpkg_backup_restore_env_vars.cmake")
include("${SCRIPTS}/cmake/vcpkg_build_cmake.cmake")
include("${SCRIPTS}/cmake/vcpkg_build_make.cmake")
include("${SCRIPTS}/cmake/vcpkg_build_msbuild.cmake")

View File

@ -7122,7 +7122,7 @@
},
"x264": {
"baseline": "157-303c484ec828ed0",
"port-version": 15
"port-version": 16
},
"x265": {
"baseline": "3.4",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "e8f14328cb425b2a7450bf36f731f97d41564fed",
"version-string": "157-303c484ec828ed0",
"port-version": 16
},
{
"git-tree": "e766671c5f64574235784ce45b1668daf4cb9b44",
"version-string": "157-303c484ec828ed0",