mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-06-07 13:48:02 +08:00
[x265] Allow release-only build. (#17051)
* [x265] Allow release-only build. When doing a release-only build, conditionally disable commands for debug builds * [x265] Bump port version.
This commit is contained in:
parent
af5b5d3659
commit
9b2d7568d8
@ -1,6 +1,6 @@
|
||||
Source: x265
|
||||
Version: 3.4
|
||||
Port-Version: 3
|
||||
Port-Version: 4
|
||||
Homepage: https://github.com/videolan/x265
|
||||
Description: x265 is a H.265 / HEVC video encoder application library, designed to encode video or images into an H.265 / HEVC encoded bitstream.
|
||||
Supports: !(uwp | arm)
|
||||
|
@ -32,8 +32,9 @@ vcpkg_install_cmake()
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
# remove duplicated include files
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
|
||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
endif()
|
||||
vcpkg_copy_tools(TOOL_NAMES x265 AUTO_CLEAN)
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static" OR VCPKG_TARGET_IS_LINUX)
|
||||
@ -42,24 +43,36 @@ endif()
|
||||
|
||||
if(VCPKG_TARGET_IS_WINDOWS AND (NOT VCPKG_TARGET_IS_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")
|
||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/x265.pc" "-lx265" "-lx265-static")
|
||||
endif()
|
||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/x265.pc" "-lx265" "-lx265-static")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# maybe create vcpkg_regex_replace_string?
|
||||
|
||||
file(READ ${CURRENT_PACKAGES_DIR}/lib/pkgconfig/x265.pc _contents)
|
||||
string(REGEX REPLACE "-l(std)?c\\+\\+" "" _contents "${_contents}")
|
||||
file(WRITE ${CURRENT_PACKAGES_DIR}/lib/pkgconfig/x265.pc "${_contents}")
|
||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
|
||||
file(READ ${CURRENT_PACKAGES_DIR}/lib/pkgconfig/x265.pc _contents)
|
||||
string(REGEX REPLACE "-l(std)?c\\+\\+" "" _contents "${_contents}")
|
||||
file(WRITE ${CURRENT_PACKAGES_DIR}/lib/pkgconfig/x265.pc "${_contents}")
|
||||
endif()
|
||||
|
||||
file(READ ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/x265.pc _contents)
|
||||
string(REGEX REPLACE "-l(std)?c\\+\\+" "" _contents "${_contents}")
|
||||
file(WRITE ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/x265.pc "${_contents}")
|
||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
|
||||
file(READ ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/x265.pc _contents)
|
||||
string(REGEX REPLACE "-l(std)?c\\+\\+" "" _contents "${_contents}")
|
||||
file(WRITE ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/x265.pc "${_contents}")
|
||||
endif()
|
||||
|
||||
if(VCPKG_TARGET_IS_MINGW AND ENABLE_SHARED)
|
||||
file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/libx265.a)
|
||||
file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/libx265.a)
|
||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
|
||||
file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/libx265.a)
|
||||
endif()
|
||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
|
||||
file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/libx265.a)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(UNIX)
|
||||
|
@ -6494,7 +6494,7 @@
|
||||
},
|
||||
"x265": {
|
||||
"baseline": "3.4",
|
||||
"port-version": 3
|
||||
"port-version": 4
|
||||
},
|
||||
"xalan-c": {
|
||||
"baseline": "1.12",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "39318069e894d5dd6ff63112fd707c31b13be88b",
|
||||
"version-string": "3.4",
|
||||
"port-version": 4
|
||||
},
|
||||
{
|
||||
"git-tree": "aa119fefeb5d57dd2b34ec63ea94942f868f1d94",
|
||||
"version-string": "3.4",
|
||||
|
Loading…
Reference in New Issue
Block a user