[brotli] Fix regressions introduced during update

This commit is contained in:
Robert Schumacher 2017-12-13 06:20:07 -08:00
parent eb1a7b099e
commit 6e653d88f6
2 changed files with 17 additions and 31 deletions

View File

@ -1,3 +1,3 @@
Source: brotli
Version: 1.0.2
Version: 1.0.2-1
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.

View File

@ -11,41 +11,27 @@ vcpkg_from_github(
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS -DBROTLI_DISABLE_TESTS=ON
)
vcpkg_build_cmake()
vcpkg_install_cmake()
file(GLOB DLLS
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.dll"
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Release/*.dll"
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*/Release/*.dll"
)
file(GLOB LIBS
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.lib"
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Release/*.lib"
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*/Release/*.lib"
)
file(GLOB DEBUG_DLLS
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*.dll"
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Debug/*.dll"
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*/Debug/*.dll"
)
file(GLOB 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)
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/brotli)
file(RENAME ${CURRENT_PACKAGES_DIR}/bin/brotli.exe ${CURRENT_PACKAGES_DIR}/tools/brotli/brotli.exe)
file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/brotli.exe)
vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/brotli)
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
file(GLOB STATIC_LIBS "${CURRENT_PACKAGES_DIR}/lib/*-static.lib" "${CURRENT_PACKAGES_DIR}/debug/lib/*-static.lib")
file(REMOVE ${STATIC_LIBS})
else()
file(GLOB LIBS "${CURRENT_PACKAGES_DIR}/lib/*.lib" "${CURRENT_PACKAGES_DIR}/debug/lib/*.lib")
list(FILTER LIBS EXCLUDE REGEX "-static\\.lib\$")
file(REMOVE_RECURSE ${LIBS} ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/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(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/brotli RENAME copyright)
vcpkg_copy_pdbs()