2017-05-25 04:00:07 +08:00
|
|
|
include(vcpkg_common_functions)
|
|
|
|
|
2019-05-03 13:57:43 +08:00
|
|
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
2017-05-26 04:07:35 +08:00
|
|
|
|
2017-05-26 09:08:19 +08:00
|
|
|
vcpkg_find_acquire_program(FLEX)
|
|
|
|
vcpkg_find_acquire_program(BISON)
|
2017-05-25 04:00:07 +08:00
|
|
|
|
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO apache/thrift
|
2019-05-09 08:51:44 +08:00
|
|
|
REF acdd4226c210336e9e15eb812e5932a645fcd5ce
|
|
|
|
SHA512 53986b1cde7b2bd19974f32b8c31736566061a228dda368d3d850355c566d910499c16519bbff078a6cdab19931cd9833a7d684ac63fb1ec40b2a123ff263aaa
|
2017-05-25 04:00:07 +08:00
|
|
|
HEAD_REF master
|
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_configure_cmake(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
2017-12-06 05:01:50 +08:00
|
|
|
PREFER_NINJA
|
2017-05-28 19:46:21 +08:00
|
|
|
OPTIONS
|
2019-05-03 13:57:43 +08:00
|
|
|
-DBUILD_SHARED_LIBS=OFF
|
2017-12-06 05:01:50 +08:00
|
|
|
-DWITH_STDTHREADS=ON
|
2017-05-28 19:46:21 +08:00
|
|
|
-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}
|
2019-06-15 04:09:38 +08:00
|
|
|
-DCMAKE_DISABLE_FIND_PACKAGE_Qt5=TRUE
|
2017-05-28 19:46:21 +08:00
|
|
|
-DBISON_EXECUTABLE=${BISON}
|
2017-05-25 04:00:07 +08:00
|
|
|
)
|
|
|
|
|
2017-05-25 05:27:24 +08:00
|
|
|
vcpkg_install_cmake()
|
|
|
|
|
|
|
|
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/thrift RENAME copyright)
|
|
|
|
|
2019-04-04 05:43:56 +08:00
|
|
|
# Move CMake config files to the right place
|
|
|
|
vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/thrift")
|
|
|
|
|
2018-08-29 16:15:48 +08:00
|
|
|
file(GLOB COMPILER "${CURRENT_PACKAGES_DIR}/bin/thrift*")
|
|
|
|
if(COMPILER)
|
|
|
|
file(COPY ${COMPILER} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/thrift)
|
|
|
|
file(REMOVE ${COMPILER})
|
2017-05-28 19:46:21 +08:00
|
|
|
vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/thrift)
|
2017-05-25 05:27:24 +08:00
|
|
|
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()
|