mirror of https://github.com/microsoft/vcpkg.git
[ffmpeg] Use nproc - 1 build jobs for ffmpeg instead of 6. (#12659)
This commit is contained in:
parent
913c7f91ce
commit
085225b7ba
|
|
@ -1,24 +0,0 @@
|
||||||
#!/usr/bin/bash
|
|
||||||
set -e
|
|
||||||
export PATH=/usr/bin:$PATH
|
|
||||||
export PKG_CONFIG_PATH="`cygpath -p ${PKG_CONFIG_PATH}`"
|
|
||||||
# Export HTTP(S)_PROXY as http(s)_proxy:
|
|
||||||
if [ "$HTTP_PROXY" ]; then
|
|
||||||
export http_proxy=$HTTP_PROXY
|
|
||||||
fi
|
|
||||||
if [ "$HTTPS_PROXY" ]; then
|
|
||||||
export https_proxy=$HTTPS_PROXY
|
|
||||||
fi
|
|
||||||
|
|
||||||
PATH_TO_BUILD_DIR="`cygpath "$1"`"
|
|
||||||
PATH_TO_SRC_DIR="`cygpath "$2"`"
|
|
||||||
PATH_TO_PACKAGE_DIR="`cygpath "$3"`"
|
|
||||||
# Note: $4 is extra configure options
|
|
||||||
|
|
||||||
cd "$PATH_TO_BUILD_DIR"
|
|
||||||
echo "=== CONFIGURING ==="
|
|
||||||
"$PATH_TO_SRC_DIR/configure" --toolchain=msvc "--prefix=$PATH_TO_PACKAGE_DIR" $4
|
|
||||||
echo "=== BUILDING ==="
|
|
||||||
make -j6
|
|
||||||
echo "=== INSTALLING ==="
|
|
||||||
make install
|
|
||||||
|
|
@ -0,0 +1,45 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
export PATH=/usr/bin:$PATH
|
||||||
|
|
||||||
|
command -v cygpath >/dev/null && have_cygpath=1
|
||||||
|
|
||||||
|
cygpath() {
|
||||||
|
if [ -n "$have_cygpath" ]; then
|
||||||
|
command cygpath "$@"
|
||||||
|
else
|
||||||
|
eval _p='$'$#
|
||||||
|
printf '%s\n' "$_p"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
export PKG_CONFIG_PATH="$(cygpath -p "${PKG_CONFIG_PATH}")"
|
||||||
|
|
||||||
|
# Export HTTP(S)_PROXY as http(s)_proxy:
|
||||||
|
[ -n "$HTTP_PROXY" ] && export http_proxy="$HTTP_PROXY"
|
||||||
|
[ -n "$HTTPS_PROXY" ] && export https_proxy="$HTTPS_PROXY"
|
||||||
|
|
||||||
|
PATH_TO_BUILD_DIR=$( cygpath "@BUILD_DIR@")
|
||||||
|
PATH_TO_SRC_DIR=$( cygpath "@SOURCE_PATH@")
|
||||||
|
PATH_TO_PACKAGE_DIR=$(cygpath "@INST_PREFIX@")
|
||||||
|
|
||||||
|
JOBS=@VCPKG_CONCURRENCY@
|
||||||
|
|
||||||
|
# Default to hardware concurrency if unset.
|
||||||
|
: ${JOBS:=$(nproc)}
|
||||||
|
|
||||||
|
cd "$PATH_TO_BUILD_DIR"
|
||||||
|
|
||||||
|
echo "=== CONFIGURING ==="
|
||||||
|
|
||||||
|
sh "$PATH_TO_SRC_DIR/configure" "--prefix=$PATH_TO_PACKAGE_DIR" @CONFIGURE_OPTIONS@
|
||||||
|
|
||||||
|
echo "=== BUILDING ==="
|
||||||
|
|
||||||
|
make -j${JOBS}
|
||||||
|
|
||||||
|
echo "=== INSTALLING ==="
|
||||||
|
|
||||||
|
make install
|
||||||
|
|
@ -1,24 +0,0 @@
|
||||||
#!/usr/bin/bash
|
|
||||||
set -e
|
|
||||||
export PATH=/usr/bin:$PATH
|
|
||||||
# Export HTTP(S)_PROXY as http(s)_proxy:
|
|
||||||
if [ "$HTTP_PROXY" ]; then
|
|
||||||
export http_proxy=$HTTP_PROXY
|
|
||||||
fi
|
|
||||||
if [ "$HTTPS_PROXY" ]; then
|
|
||||||
export https_proxy=$HTTPS_PROXY
|
|
||||||
fi
|
|
||||||
|
|
||||||
PATH_TO_BUILD_DIR=$1
|
|
||||||
PATH_TO_SRC_DIR=$2
|
|
||||||
PATH_TO_PACKAGE_DIR=$3
|
|
||||||
# Note: $4 is extra configure options
|
|
||||||
|
|
||||||
cd "$PATH_TO_BUILD_DIR"
|
|
||||||
echo "=== CONFIGURING ==="
|
|
||||||
chmod a+x "$PATH_TO_SRC_DIR/configure"
|
|
||||||
"$PATH_TO_SRC_DIR/configure" "--prefix=$PATH_TO_PACKAGE_DIR" $4
|
|
||||||
echo "=== BUILDING ==="
|
|
||||||
make -j6
|
|
||||||
echo "=== INSTALLING ==="
|
|
||||||
make install
|
|
||||||
|
|
@ -36,22 +36,22 @@ else()
|
||||||
set(LIB_PATH_VAR "LIBRARY_PATH")
|
set(LIB_PATH_VAR "LIBRARY_PATH")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
set(OPTIONS "--enable-asm --enable-yasm --disable-doc --enable-debug --enable-runtime-cpudetect")
|
||||||
|
|
||||||
if(VCPKG_TARGET_IS_WINDOWS)
|
if(VCPKG_TARGET_IS_WINDOWS)
|
||||||
set(ENV{PATH} "$ENV{PATH};${YASM_EXE_PATH}")
|
set(ENV{PATH} "$ENV{PATH};${YASM_EXE_PATH}")
|
||||||
|
|
||||||
set(BUILD_SCRIPT ${CMAKE_CURRENT_LIST_DIR}\\build.sh)
|
|
||||||
|
|
||||||
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")
|
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")
|
||||||
vcpkg_acquire_msys(MSYS_ROOT PACKAGES perl gcc diffutils make pkg-config)
|
vcpkg_acquire_msys(MSYS_ROOT PACKAGES perl gcc diffutils make pkg-config)
|
||||||
else()
|
else()
|
||||||
vcpkg_acquire_msys(MSYS_ROOT PACKAGES diffutils make pkg-config)
|
vcpkg_acquire_msys(MSYS_ROOT PACKAGES diffutils make pkg-config)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(BASH ${MSYS_ROOT}/usr/bin/bash.exe)
|
set(SHELL ${MSYS_ROOT}/usr/bin/bash.exe)
|
||||||
|
set(OPTIONS "--toolchain=msvc ${OPTIONS}")
|
||||||
else()
|
else()
|
||||||
set(ENV{PATH} "$ENV{PATH}:${YASM_EXE_PATH}")
|
set(ENV{PATH} "$ENV{PATH}:${YASM_EXE_PATH}")
|
||||||
set(BASH /bin/bash)
|
set(SHELL /bin/sh)
|
||||||
set(BUILD_SCRIPT ${CMAKE_CURRENT_LIST_DIR}/build_linux.sh)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(ENV{${INCLUDE_VAR}} "${CURRENT_INSTALLED_DIR}/include${SEP}$ENV{${INCLUDE_VAR}}")
|
set(ENV{${INCLUDE_VAR}} "${CURRENT_INSTALLED_DIR}/include${SEP}$ENV{${INCLUDE_VAR}}")
|
||||||
|
|
@ -60,9 +60,6 @@ set(_csc_PROJECT_PATH ffmpeg)
|
||||||
|
|
||||||
file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel)
|
file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel)
|
||||||
|
|
||||||
set(OPTIONS "--enable-asm --enable-yasm --disable-doc --enable-debug")
|
|
||||||
set(OPTIONS "${OPTIONS} --enable-runtime-cpudetect")
|
|
||||||
|
|
||||||
if("nonfree" IN_LIST FEATURES)
|
if("nonfree" IN_LIST FEATURES)
|
||||||
set(OPTIONS "${OPTIONS} --enable-nonfree")
|
set(OPTIONS "${OPTIONS} --enable-nonfree")
|
||||||
endif()
|
endif()
|
||||||
|
|
@ -391,13 +388,16 @@ if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL release)
|
||||||
set(ENV{PKG_CONFIG_PATH} "${CURRENT_INSTALLED_DIR}/lib/pkgconfig")
|
set(ENV{PKG_CONFIG_PATH} "${CURRENT_INSTALLED_DIR}/lib/pkgconfig")
|
||||||
message(STATUS "Building ${_csc_PROJECT_PATH} for Release")
|
message(STATUS "Building ${_csc_PROJECT_PATH} for Release")
|
||||||
file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel)
|
file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel)
|
||||||
|
|
||||||
|
set(BUILD_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel")
|
||||||
|
set(CONFIGURE_OPTIONS "${OPTIONS} ${OPTIONS_RELEASE}")
|
||||||
|
set(INST_PREFIX "${CURRENT_PACKAGES_DIR}")
|
||||||
|
|
||||||
|
configure_file("${CMAKE_CURRENT_LIST_DIR}/build.sh.in" "${BUILD_DIR}/build.sh" @ONLY)
|
||||||
|
|
||||||
vcpkg_execute_required_process(
|
vcpkg_execute_required_process(
|
||||||
COMMAND ${BASH} --noprofile --norc "${BUILD_SCRIPT}"
|
COMMAND ${SHELL} ./build.sh
|
||||||
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel" # BUILD DIR
|
WORKING_DIRECTORY ${BUILD_DIR}
|
||||||
"${SOURCE_PATH}" # SOURCE DIR
|
|
||||||
"${CURRENT_PACKAGES_DIR}" # PACKAGE DIR
|
|
||||||
"${OPTIONS} ${OPTIONS_RELEASE}"
|
|
||||||
WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel
|
|
||||||
LOGNAME build-${TARGET_TRIPLET}-rel
|
LOGNAME build-${TARGET_TRIPLET}-rel
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
@ -411,13 +411,16 @@ if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL debug)
|
||||||
set(ENV{PKG_CONFIG_PATH} "${CURRENT_INSTALLED_DIR}/debug/lib/pkgconfig")
|
set(ENV{PKG_CONFIG_PATH} "${CURRENT_INSTALLED_DIR}/debug/lib/pkgconfig")
|
||||||
message(STATUS "Building ${_csc_PROJECT_PATH} for Debug")
|
message(STATUS "Building ${_csc_PROJECT_PATH} for Debug")
|
||||||
file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg)
|
file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg)
|
||||||
|
|
||||||
|
set(BUILD_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg")
|
||||||
|
set(CONFIGURE_OPTIONS "${OPTIONS} ${OPTIONS_DEBUG}")
|
||||||
|
set(INST_PREFIX "${CURRENT_PACKAGES_DIR}/debug")
|
||||||
|
|
||||||
|
configure_file("${CMAKE_CURRENT_LIST_DIR}/build.sh.in" "${BUILD_DIR}/build.sh" @ONLY)
|
||||||
|
|
||||||
vcpkg_execute_required_process(
|
vcpkg_execute_required_process(
|
||||||
COMMAND ${BASH} --noprofile --norc "${BUILD_SCRIPT}"
|
COMMAND ${SHELL} ./build.sh
|
||||||
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg" # BUILD DIR
|
WORKING_DIRECTORY ${BUILD_DIR}
|
||||||
"${SOURCE_PATH}" # SOURCE DIR
|
|
||||||
"${CURRENT_PACKAGES_DIR}/debug" # PACKAGE DIR
|
|
||||||
"${OPTIONS} ${OPTIONS_DEBUG}"
|
|
||||||
WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg
|
|
||||||
LOGNAME build-${TARGET_TRIPLET}-dbg
|
LOGNAME build-${TARGET_TRIPLET}-dbg
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue