mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-29 11:41:36 +08:00
[ffmpeg] Simplify UWP build slightly. Fix -MD/-MT to not apply during debug builds.
This commit is contained in:
parent
8085cd34f2
commit
c8d638bcd6
@ -1,4 +1,4 @@
|
||||
Source: ffmpeg
|
||||
Version: 3.2.4-2
|
||||
Version: 3.2.4-3
|
||||
Description: a library to decode, encode, transcode, mux, demux, stream, filter and play pretty much anything that humans and machines have created.
|
||||
FFmpeg is the leading multimedia framework, able to decode, encode, transcode, mux, demux, stream, filter and play pretty much anything that humans and machines have created. It supports the most obscure ancient formats up to the cutting edge. No matter if they were designed by some standards committee, the community or a corporation. It is also highly portable: FFmpeg compiles, runs, and passes our testing infrastructure FATE across Linux, Mac OS X, Microsoft Windows, the BSDs, Solaris, etc. under a wide variety of build environments, machine architectures, and configurations.
|
@ -27,12 +27,10 @@ set(OPTIONS "--disable-ffmpeg --disable-ffprobe --disable-doc --enable-debug")
|
||||
set(OPTIONS "${OPTIONS} --enable-runtime-cpudetect")
|
||||
|
||||
if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
|
||||
SET(UWP TRUE)
|
||||
set(OPTIONS "${OPTIONS} --disable-programs --enable-cross-compile --target-os=win32 --arch=${VCPKG_TARGET_ARCHITECTURE}")
|
||||
set(OPTIONS "${OPTIONS} --extra-cflags=-DWINAPI_FAMILY=WINAPI_FAMILY_APP --extra-cflags=-D_WIN32_WINNT=0x0A00")
|
||||
|
||||
if (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm")
|
||||
set(UWP_PLATFORM "arm")
|
||||
vcpkg_find_acquire_program(GASPREPROCESSOR)
|
||||
foreach(GAS_PATH ${GASPREPROCESSOR})
|
||||
get_filename_component(GAS_ITEM_PATH ${GAS_PATH} DIRECTORY)
|
||||
@ -40,40 +38,34 @@ if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
|
||||
endforeach(GAS_PATH)
|
||||
|
||||
## Get Perl and GCC for MSYS2
|
||||
execute_process(
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${BASH} --noprofile --norc -c "PATH=/usr/bin:\$PATH;pacman -Sy --noconfirm --needed perl gcc"
|
||||
WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}
|
||||
LOGNAME msys-${TARGET_TRIPLET}
|
||||
)
|
||||
|
||||
elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
|
||||
set(UWP_PLATFORM "x64")
|
||||
elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
|
||||
set(UWP_PLATFORM "Win32")
|
||||
else ()
|
||||
else()
|
||||
message(FATAL_ERROR "Unsupported architecture")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(OPTIONS_DEBUG "") # Note: --disable-optimizations can't be used due to http://ffmpeg.org/pipermail/libav-user/2013-March/003945.html
|
||||
set(OPTIONS_RELEASE "")
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
||||
set(OPTIONS "${OPTIONS} --disable-static --enable-shared")
|
||||
if (UWP)
|
||||
if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
|
||||
set(OPTIONS "${OPTIONS} --extra-ldflags=-APPCONTAINER --extra-ldflags=WindowsApp.lib")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(VCPKG_CRT_LINKAGE STREQUAL "dynamic")
|
||||
set(OPTIONS_DEBUG "${OPTIONS_DEBUG} --extra-cflags=-MDd --extra-cxxflags=-MDd")
|
||||
if (NOT UWP)
|
||||
set(OPTIONS_DEBUG "${OPTIONS_DEBUG} --extra-ldflags=-NODEFAULTLIB:libcmt")
|
||||
endif()
|
||||
set(OPTIONS "${OPTIONS} --extra-cflags=-MD --extra-cxxflags=-MD")
|
||||
set(OPTIONS_RELEASE "${OPTIONS_RELEASE} --extra-cflags=-MD --extra-cxxflags=-MD")
|
||||
else()
|
||||
set(OPTIONS_DEBUG "${OPTIONS_DEBUG} --extra-cflags=-MTd --extra-cxxflags=-MTd")
|
||||
if (NOT UWP)
|
||||
set(OPTIONS_DEBUG "${OPTIONS_DEBUG} --extra-ldflags=-NODEFAULTLIB:libcmt")
|
||||
endif()
|
||||
set(OPTIONS "${OPTIONS} --extra-cflags=-MT --extra-cxxflags=-MT")
|
||||
set(OPTIONS_RELEASE "${OPTIONS_RELEASE} --extra-cflags=-MT --extra-cxxflags=-MT")
|
||||
endif()
|
||||
|
||||
message(STATUS "Building ${_csc_PROJECT_PATH} for Release")
|
||||
@ -83,7 +75,7 @@ vcpkg_execute_required_process(
|
||||
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel" # BUILD DIR
|
||||
"${SOURCE_PATH}" # SOURCE DIR
|
||||
"${CURRENT_PACKAGES_DIR}" # PACKAGE DIR
|
||||
"${OPTIONS}"
|
||||
"${OPTIONS} ${OPTIONS_RELEASE}"
|
||||
WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel
|
||||
LOGNAME build-${TARGET_TRIPLET}-rel
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user