2020-08-22 00:25:48 +08:00
|
|
|
vcpkg_from_github(
|
2018-02-23 00:24:51 +08:00
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
2020-08-22 00:25:48 +08:00
|
|
|
REPO videolan/x265
|
|
|
|
REF 07295ba7ab551bb9c1580fdaee3200f1b45711b7 #v3.4
|
|
|
|
SHA512 21a4ef8733a9011eec8b336106c835fbe04689e3a1b820acb11205e35d2baba8c786d9d8cf5f395e78277f921857e4eb8622cf2ef3597bce952d374f7fe9ec29
|
2018-02-23 00:24:51 +08:00
|
|
|
HEAD_REF master
|
2019-10-08 01:35:13 +08:00
|
|
|
PATCHES
|
|
|
|
disable-install-pdb.patch
|
2018-02-28 02:36:28 +08:00
|
|
|
)
|
|
|
|
|
2019-02-22 09:05:19 +08:00
|
|
|
set(ENABLE_ASSEMBLY OFF)
|
2020-08-22 00:25:48 +08:00
|
|
|
if (VCPKG_TARGET_IS_WINDOWS)
|
2019-02-22 09:05:19 +08:00
|
|
|
vcpkg_find_acquire_program(NASM)
|
|
|
|
get_filename_component(NASM_EXE_PATH ${NASM} DIRECTORY)
|
|
|
|
set(ENV{PATH} "$ENV{PATH};${NASM_EXE_PATH}")
|
|
|
|
set(ENABLE_ASSEMBLY ON)
|
|
|
|
endif ()
|
|
|
|
|
2018-02-28 02:36:28 +08:00
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" ENABLE_SHARED)
|
|
|
|
|
2018-02-23 00:24:51 +08:00
|
|
|
vcpkg_configure_cmake(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}/source
|
|
|
|
PREFER_NINJA
|
2019-02-22 09:05:19 +08:00
|
|
|
OPTIONS
|
|
|
|
-DENABLE_ASSEMBLY=${ENABLE_ASSEMBLY}
|
|
|
|
-DENABLE_SHARED=${ENABLE_SHARED}
|
|
|
|
OPTIONS_DEBUG
|
|
|
|
-DENABLE_CLI=OFF
|
2018-02-23 00:24:51 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
|
|
|
# remove duplicated include files
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
|
|
|
|
2020-08-22 00:25:48 +08:00
|
|
|
vcpkg_copy_tools(TOOL_NAMES x265 AUTO_CLEAN)
|
2018-02-28 02:36:28 +08:00
|
|
|
|
2020-06-24 04:57:29 +08:00
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static" OR VCPKG_TARGET_IS_LINUX)
|
2018-02-28 02:36:28 +08:00
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin)
|
|
|
|
endif()
|
|
|
|
|
2020-08-19 03:58:14 +08:00
|
|
|
if(WIN32 AND (NOT MINGW))
|
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
|
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/x265.pc" "-lx265" "-lx265-static")
|
|
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/x265.pc" "-lx265" "-lx265-static")
|
|
|
|
endif()
|
|
|
|
endif()
|
2020-08-22 00:25:48 +08:00
|
|
|
|
2020-08-19 03:58:14 +08:00
|
|
|
if(UNIX)
|
|
|
|
vcpkg_fixup_pkgconfig(SYSTEM_LIBRARIES numa)
|
|
|
|
else()
|
|
|
|
vcpkg_fixup_pkgconfig()
|
|
|
|
endif()
|
|
|
|
|
2018-02-23 00:24:51 +08:00
|
|
|
# Handle copyright
|
2020-08-22 00:25:48 +08:00
|
|
|
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|