mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-30 13:49:07 +08:00
ad493fd860
* Add function vcpkg_configure_make/vcpkg_build_make. * Fix autoreconf command and add log. * Add vcpkg_install_make. * Fix call function name. * support non-debug mode. * Add nmake support. * [tcl]Add new port for testing. * [vcpkg_configure_make]Fix prefix in linux. * restart CI systen. * Separate vcpkg_build_nmake/vcpkg_install_nmake. Add arg PROJECT_NAME. * fix copy source file. add samples. * Remove uncommon options. Add force install para to autoreconf. * fix build error. * fix options judgment. * enable nmake in windows. * fix some envs and macros. Disable NMAKE in vcpkg_configure_make currently. * update docs. * fix environments. * Modify libosip2 to use vcpkg_configure_make/vcpkg_install_make. * [tcl]Tcl separates PR. * trigger PR-EAGER. * [freexl]Fix options name and remove option NMAKE. * use tool-chain instead of set environments manually. * fix autoreconf para. * use vcpkg_execute_build_process instead.
66 lines
2.0 KiB
CMake
66 lines
2.0 KiB
CMake
include(vcpkg_common_functions)
|
|
|
|
set(X264_VERSION 157)
|
|
|
|
if (NOT VCPKG_TARGET_IS_WINDOWS)
|
|
message(FATAL_ERROR "x264 only support windows.")
|
|
endif()
|
|
|
|
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO mirror/x264
|
|
REF 303c484ec828ed0d8bfe743500e70314d026c3bd
|
|
SHA512 faf210a3f9543028ed882c8348b243dd7ae6638e7b3ef43bec1326b717f23370f57c13d0ddb5e1ae94411088a2e33031a137b68ae9f64c18f8f33f601a0da54d
|
|
HEAD_REF master
|
|
PATCHES
|
|
"uwp-cflags.patch"
|
|
)
|
|
|
|
vcpkg_configure_make(
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
OPTIONS
|
|
--enable-strip
|
|
--disable-lavf
|
|
--disable-swscale
|
|
--disable-avs
|
|
--disable-ffms
|
|
--disable-gpac
|
|
--disable-lsmash
|
|
--disable-asm
|
|
--enable-debug
|
|
)
|
|
|
|
vcpkg_install_make()
|
|
|
|
if(NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
|
|
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/x264)
|
|
file(RENAME ${CURRENT_PACKAGES_DIR}/bin/x264.exe ${CURRENT_PACKAGES_DIR}/tools/x264/x264.exe)
|
|
endif()
|
|
|
|
file(REMOVE_RECURSE
|
|
${CURRENT_PACKAGES_DIR}/lib/pkgconfig
|
|
${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig
|
|
${CURRENT_PACKAGES_DIR}/debug/bin/x264.exe
|
|
${CURRENT_PACKAGES_DIR}/debug/include
|
|
)
|
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
|
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/libx264.dll.lib ${CURRENT_PACKAGES_DIR}/lib/libx264.lib)
|
|
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libx264.dll.lib ${CURRENT_PACKAGES_DIR}/debug/lib/libx264.lib)
|
|
else()
|
|
# force U_STATIC_IMPLEMENTATION macro
|
|
file(READ ${CURRENT_PACKAGES_DIR}/include/x264.h HEADER_CONTENTS)
|
|
string(REPLACE "defined(U_STATIC_IMPLEMENTATION)" "1" HEADER_CONTENTS "${HEADER_CONTENTS}")
|
|
file(WRITE ${CURRENT_PACKAGES_DIR}/include/x264.h "${HEADER_CONTENTS}")
|
|
|
|
file(REMOVE_RECURSE
|
|
${CURRENT_PACKAGES_DIR}/bin
|
|
${CURRENT_PACKAGES_DIR}/debug/bin
|
|
)
|
|
endif()
|
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/x264)
|
|
file(RENAME ${CURRENT_PACKAGES_DIR}/share/x264/COPYING ${CURRENT_PACKAGES_DIR}/share/x264/copyright)
|