mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-18 12:47:59 +08:00
[zopfli] Fix x64-linux-dynamic build (#25824)
Co-authored-by: Osyotr <8740768+Osyotr@users.noreply.github.com>
This commit is contained in:
parent
d2dbf99615
commit
5a7c56f934
@ -6,64 +6,57 @@ vcpkg_from_github(
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
-DZOPFLI_BUILD_INSTALL=ON
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
vcpkg_cmake_install()
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
if (NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
|
||||
set(EXECUTABLE_SUFFIX ".exe")
|
||||
else()
|
||||
set(EXECUTABLE_SUFFIX "")
|
||||
endif()
|
||||
|
||||
# Install tools
|
||||
file(COPY ${CURRENT_PACKAGES_DIR}/bin/zopfli${EXECUTABLE_SUFFIX}
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT})
|
||||
file(COPY ${CURRENT_PACKAGES_DIR}/bin/zopflipng${EXECUTABLE_SUFFIX}
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT})
|
||||
vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT})
|
||||
file(COPY "${CURRENT_PACKAGES_DIR}/bin/zopfli${VCPKG_TARGET_EXECUTABLE_SUFFIX}"
|
||||
DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}")
|
||||
file(COPY "${CURRENT_PACKAGES_DIR}/bin/zopflipng${VCPKG_TARGET_EXECUTABLE_SUFFIX}"
|
||||
DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}")
|
||||
vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/${PORT}")
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
|
||||
else()
|
||||
file(REMOVE
|
||||
${CURRENT_PACKAGES_DIR}/bin/zopfli${EXECUTABLE_SUFFIX}
|
||||
${CURRENT_PACKAGES_DIR}/bin/zopflipng${EXECUTABLE_SUFFIX}
|
||||
${CURRENT_PACKAGES_DIR}/debug/bin/zopfli${EXECUTABLE_SUFFIX}
|
||||
${CURRENT_PACKAGES_DIR}/debug/bin/zopflipng${EXECUTABLE_SUFFIX}
|
||||
)
|
||||
file(REMOVE
|
||||
"${CURRENT_PACKAGES_DIR}/bin/zopfli${VCPKG_TARGET_EXECUTABLE_SUFFIX}"
|
||||
"${CURRENT_PACKAGES_DIR}/bin/zopflipng${VCPKG_TARGET_EXECUTABLE_SUFFIX}"
|
||||
"${CURRENT_PACKAGES_DIR}/debug/bin/zopfli${VCPKG_TARGET_EXECUTABLE_SUFFIX}"
|
||||
"${CURRENT_PACKAGES_DIR}/debug/bin/zopflipng${VCPKG_TARGET_EXECUTABLE_SUFFIX}"
|
||||
)
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static" OR NOT VCPKG_TARGET_IS_WINDOWS)
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
|
||||
endif()
|
||||
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/Zopfli)
|
||||
vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/Zopfli")
|
||||
|
||||
# vcpkg_fixup_cmake_targets can not handles this on UNIX currently.
|
||||
# vcpkg_cmake_config_fixup can not handles this on UNIX currently.
|
||||
if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux" OR
|
||||
VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
||||
vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/share/zopfli/ZopfliConfig-debug.cmake
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/zopfli/ZopfliConfig-debug.cmake"
|
||||
"\"\${_IMPORT_PREFIX}/debug/bin/zopfli\""
|
||||
"\"\${_IMPORT_PREFIX}/tools/zopfli/zopfli\""
|
||||
)
|
||||
vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/share/zopfli/ZopfliConfig-debug.cmake
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/zopfli/ZopfliConfig-debug.cmake"
|
||||
"\"\${_IMPORT_PREFIX}/debug/bin/zopflipng\""
|
||||
"\"\${_IMPORT_PREFIX}/tools/zopfli/zopflipng\""
|
||||
)
|
||||
vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/share/zopfli/ZopfliConfig-release.cmake
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/zopfli/ZopfliConfig-release.cmake"
|
||||
"\"\${_IMPORT_PREFIX}/bin/zopfli\""
|
||||
"\"\${_IMPORT_PREFIX}/tools/zopfli/zopfli\""
|
||||
)
|
||||
vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/share/zopfli/ZopfliConfig-release.cmake
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/zopfli/ZopfliConfig-release.cmake"
|
||||
"\"\${_IMPORT_PREFIX}/bin/zopflipng\""
|
||||
"\"\${_IMPORT_PREFIX}/tools/zopfli/zopflipng\""
|
||||
)
|
||||
endif()
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
|
||||
configure_file(${SOURCE_PATH}/COPYING ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY)
|
||||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")
|
||||
|
@ -1,7 +1,18 @@
|
||||
{
|
||||
"name": "zopfli",
|
||||
"version-string": "1.0.3",
|
||||
"port-version": 1,
|
||||
"version": "1.0.3",
|
||||
"port-version": 2,
|
||||
"description": "Zopfli Compression Algorithm compression library programmed in C",
|
||||
"homepage": "https://github.com/google/zopfli"
|
||||
"homepage": "https://github.com/google/zopfli",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -7846,7 +7846,7 @@
|
||||
},
|
||||
"zopfli": {
|
||||
"baseline": "1.0.3",
|
||||
"port-version": 1
|
||||
"port-version": 2
|
||||
},
|
||||
"zpp-bits": {
|
||||
"baseline": "4.4.4",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "a0451fdd88ef4beba9c0f572d219c0148ac28a25",
|
||||
"version": "1.0.3",
|
||||
"port-version": 2
|
||||
},
|
||||
{
|
||||
"git-tree": "e80818813d5dfa5b563c84485d4a0030ce90906a",
|
||||
"version-string": "1.0.3",
|
||||
|
Loading…
Reference in New Issue
Block a user