[x265] Fix static builds

This commit is contained in:
Robert Schumacher 2018-02-27 10:36:28 -08:00
parent 021ea67aef
commit fb12a2287e
3 changed files with 28 additions and 2 deletions

View File

@ -1,3 +1,3 @@
Source: x265
Version: 2.7
Version: 2.7-1
Description: x265 is a H.265 / HEVC video encoder application library, designed to encode video or images into an H.265 / HEVC encoded bitstream.

View File

@ -0,0 +1,13 @@
diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt
index e6d49c6..2409caa 100644
--- a/source/CMakeLists.txt
+++ b/source/CMakeLists.txt
@@ -546,7 +546,7 @@ if(ENABLE_HDR10_PLUS)
ARCHIVE DESTINATION ${LIB_INSTALL_DIR})
endif()
install(FILES x265.h "${PROJECT_BINARY_DIR}/x265_config.h" DESTINATION include)
-if(WIN32)
+if(WIN32 AND 0)
if(MSVC_IDE)
install(FILES "${PROJECT_BINARY_DIR}/Debug/x265.pdb" DESTINATION ${BIN_INSTALL_DIR} CONFIGURATIONS Debug)
install(FILES "${PROJECT_BINARY_DIR}/RelWithDebInfo/x265.pdb" DESTINATION ${BIN_INSTALL_DIR} CONFIGURATIONS RelWithDebInfo)

View File

@ -8,9 +8,18 @@ vcpkg_from_bitbucket(
HEAD_REF master
)
vcpkg_apply_patches(
SOURCE_PATH ${SOURCE_PATH}
PATCHES ${CMAKE_CURRENT_LIST_DIR}/disable-install-pdb.patch
)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" ENABLE_SHARED)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}/source
PREFER_NINJA
OPTIONS -DENABLE_SHARED=${ENABLE_SHARED}
OPTIONS_DEBUG -DENABLE_CLI=OFF
)
vcpkg_install_cmake()
@ -21,7 +30,11 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/x265)
file(RENAME ${CURRENT_PACKAGES_DIR}/bin/x265.exe ${CURRENT_PACKAGES_DIR}/tools/x265/x265.exe)
file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/x265.exe)
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin)
endif()
vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/x265)
# Handle copyright