mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-18 20:13:07 +08:00
[brotli] Use vcpkg_from_github and latest stable release
This commit is contained in:
parent
2629a3696f
commit
e607ff8a7b
3
ports/brotli/CONTROL
Normal file
3
ports/brotli/CONTROL
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
Source: brotli
|
||||||
|
Version: 0.6.0
|
||||||
|
Description: a generic-purpose lossless compression algorithm that compresses data using a combination of a modern variant of the LZ77 algorithm, Huffman coding and 2nd order context modeling.
|
@ -1,61 +1,51 @@
|
|||||||
include(vcpkg_common_functions)
|
include(vcpkg_common_functions)
|
||||||
find_program(GIT git)
|
|
||||||
|
|
||||||
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src)
|
vcpkg_from_github(
|
||||||
set(INCLUDE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/src/c/include/brotli)
|
OUT_SOURCE_PATH SOURCE_PATH
|
||||||
|
REPO google/brotli
|
||||||
set(GIT_URL "https://github.com/google/brotli.git")
|
REF v0.6.0
|
||||||
set(GIT_REF "0a84e9bf864dfe3862bfe7b4e09650ff283c9825")
|
SHA512 36caa277790efeb5bff0fdc090cdcf00fd9995c4e81a60ed31d36af2e13848ec1afe5d84e6926eebbee013525191e9404e112cb7fbede16097221c5bc3dfb5d5
|
||||||
|
HEAD_REF master
|
||||||
if(NOT EXISTS "${DOWNLOADS}/brotli.git")
|
|
||||||
message(STATUS "Cloning")
|
|
||||||
vcpkg_execute_required_process(
|
|
||||||
COMMAND ${GIT} clone --bare ${GIT_URL} ${DOWNLOADS}/brotli.git
|
|
||||||
WORKING_DIRECTORY ${DOWNLOADS}
|
|
||||||
LOGNAME clone
|
|
||||||
)
|
)
|
||||||
endif()
|
|
||||||
|
|
||||||
if(NOT EXISTS "${SOURCE_PATH}/.git")
|
|
||||||
message(STATUS "Adding worktree and patching")
|
|
||||||
file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR})
|
|
||||||
vcpkg_execute_required_process(
|
|
||||||
COMMAND ${GIT} worktree add -f --detach ${SOURCE_PATH} ${GIT_REF}
|
|
||||||
WORKING_DIRECTORY ${DOWNLOADS}/brotli.git
|
|
||||||
LOGNAME worktree
|
|
||||||
)
|
|
||||||
message(STATUS "Patching")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
|
|
||||||
vcpkg_configure_cmake(
|
vcpkg_configure_cmake(
|
||||||
SOURCE_PATH "${CURRENT_BUILDTREES_DIR}/src"
|
SOURCE_PATH ${SOURCE_PATH}
|
||||||
# OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2
|
PREFER_NINJA
|
||||||
# OPTIONS_RELEASE -DOPTIMIZE=1
|
|
||||||
# OPTIONS_DEBUG -DDEBUGGABLE=1
|
|
||||||
)
|
)
|
||||||
|
|
||||||
vcpkg_install_cmake()
|
vcpkg_build_cmake()
|
||||||
|
|
||||||
|
file(GLOB DLLS
|
||||||
file(GLOB EXES "${CURRENT_PACKAGES_DIR}/bin/*.exe")
|
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.dll"
|
||||||
file(GLOB DLLS "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Release/*.dll")
|
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Release/*.dll"
|
||||||
file(GLOB LIBS "${CURRENT_PACKAGES_DIR}/bin/*.lib")
|
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*/Release/*.dll"
|
||||||
file(GLOB DEBUG_EXES "${CURRENT_PACKAGES_DIR}/debug/bin/*.exe")
|
)
|
||||||
file(GLOB DEBUG_DLLS "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Debug/*.dll")
|
file(GLOB LIBS
|
||||||
file(GLOB DEBUG_LIBS "${CURRENT_PACKAGES_DIR}/debug/bin/*.lib")
|
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.lib"
|
||||||
file(GLOB HEADERS "${INCLUDE_DIRECTORY}/*.h")
|
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Release/*.lib"
|
||||||
file(COPY ${DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
|
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*/Release/*.lib"
|
||||||
file(COPY ${LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
|
)
|
||||||
file(COPY ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
|
file(GLOB DEBUG_DLLS
|
||||||
file(COPY ${DEBUG_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
|
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*.dll"
|
||||||
file(COPY ${HEADERS} DESTINATION ${CURRENT_PACKAGES_DIR}/include/brotli)
|
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Debug/*.dll"
|
||||||
file(REMOVE ${EXES})
|
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*/Debug/*.dll"
|
||||||
file(REMOVE ${LIBS})
|
)
|
||||||
file(REMOVE ${DEBUG_EXES})
|
file(GLOB DEBUG_LIBS
|
||||||
file(REMOVE ${DEBUG_LIBS})
|
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*.lib"
|
||||||
|
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Debug/*.lib"
|
||||||
|
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*/Debug/*.lib"
|
||||||
|
)
|
||||||
|
file(GLOB HEADERS "${SOURCE_PATH}/c/include/brotli/*.h" "${SOURCE_PATH}/include/brotli/*.h")
|
||||||
|
if(DLLS)
|
||||||
|
file(INSTALL ${DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
|
||||||
|
endif()
|
||||||
|
file(INSTALL ${LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
|
||||||
|
if(DEBUG_DLLS)
|
||||||
|
file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
|
||||||
|
endif()
|
||||||
|
file(INSTALL ${DEBUG_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
|
||||||
|
file(INSTALL ${HEADERS} DESTINATION ${CURRENT_PACKAGES_DIR}/include/brotli)
|
||||||
|
|
||||||
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/brotli RENAME copyright)
|
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/brotli RENAME copyright)
|
||||||
|
|
||||||
#file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/)
|
vcpkg_copy_pdbs()
|
||||||
#file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/)
|
|
||||||
|
Loading…
Reference in New Issue
Block a user