mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-03 01:19:00 +08:00
cb239b92c0
It looks like github changed the version (or the generally the way) they do tars, causing some hash mismatches. This fixes the affected ports.
54 lines
2.0 KiB
CMake
54 lines
2.0 KiB
CMake
include(vcpkg_common_functions)
|
|
|
|
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
|
message(STATUS "Warning: Dynamic building not supported. Building static.") # See note below
|
|
set(VCPKG_LIBRARY_LINKAGE static)
|
|
|
|
# As per Ben Craig thrift comment see https://issues.apache.org/jira/browse/THRIFT-1834
|
|
# Currently, Thrift is designed to be packaged as a static library. As a static library, the consuming program / dll will only pull in the object files that it needs, so the per-binary size increase should be pretty small.
|
|
# Thrift isn't a very good candidate to become a dynamic library. No attempts are made to preserve binary compatibility, or to provide a C / COM-like interface to make binary compatibility easy.
|
|
endif()
|
|
|
|
vcpkg_find_acquire_program(FLEX)
|
|
vcpkg_find_acquire_program(BISON)
|
|
|
|
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO apache/thrift
|
|
REF 72ca60debae1d9fb35d9f0085118873669006d7f
|
|
SHA512 65023690ff04376e9e64c3e9a609640a6416a39a08bb26d31ec8799ec462bbf8631620edf9a10cdf13980b13813304263601598258cf27bbd5027f9f755c49fa
|
|
HEAD_REF master
|
|
)
|
|
|
|
vcpkg_configure_cmake(
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
OPTIONS
|
|
-DWITH_SHARED_LIB=OFF
|
|
-DWITH_STATIC_LIB=ON
|
|
-DBUILD_TESTING=off
|
|
-DBUILD_JAVA=off
|
|
-DBUILD_C_GLIB=off
|
|
-DBUILD_PYTHON=off
|
|
-DBUILD_CPP=on
|
|
-DBUILD_HASKELL=off
|
|
-DBUILD_TUTORIALS=off
|
|
-DFLEX_EXECUTABLE=${FLEX}
|
|
-DBISON_EXECUTABLE=${BISON}
|
|
)
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/thrift RENAME copyright)
|
|
|
|
file(GLOB EXES "${CURRENT_PACKAGES_DIR}/bin/*.exe")
|
|
if(EXES)
|
|
file(COPY ${EXES} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/thrift)
|
|
file(REMOVE ${EXES})
|
|
vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/thrift)
|
|
endif()
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin)
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin)
|
|
vcpkg_copy_pdbs()
|