2017-05-24 13:00:07 -07:00
|
|
|
include(vcpkg_common_functions)
|
|
|
|
|
2019-05-02 22:57:43 -07:00
|
|
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
2017-05-25 13:07:35 -07:00
|
|
|
|
2017-05-25 18:08:19 -07:00
|
|
|
vcpkg_find_acquire_program(FLEX)
|
|
|
|
vcpkg_find_acquire_program(BISON)
|
2017-05-24 13:00:07 -07:00
|
|
|
|
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO apache/thrift
|
2019-04-30 09:20:18 -07:00
|
|
|
REF 2ff952b0af4035bcb71d8d73d9eb75df31983544
|
|
|
|
SHA512 58d08a6258b3c64f6fe1f2e4200b6cac61b19ac66113782e4eacf058d15c451de741bff137b32261fc816074ef111627f27cc50ad366eb73395dcc631c2ca66f
|
2017-05-24 13:00:07 -07:00
|
|
|
HEAD_REF master
|
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_configure_cmake(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
2017-12-05 13:01:50 -08:00
|
|
|
PREFER_NINJA
|
2017-05-28 04:46:21 -07:00
|
|
|
OPTIONS
|
2019-05-02 22:57:43 -07:00
|
|
|
-DBUILD_SHARED_LIBS=OFF
|
2017-12-05 13:01:50 -08:00
|
|
|
-DWITH_STDTHREADS=ON
|
2017-05-28 04:46:21 -07: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}
|
|
|
|
-DBISON_EXECUTABLE=${BISON}
|
2017-05-24 13:00:07 -07:00
|
|
|
)
|
|
|
|
|
2017-05-24 14:27:24 -07:00
|
|
|
vcpkg_install_cmake()
|
|
|
|
|
|
|
|
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/thrift RENAME copyright)
|
|
|
|
|
2019-04-03 14:43:56 -07:00
|
|
|
# Move CMake config files to the right place
|
|
|
|
vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/thrift")
|
|
|
|
|
2018-08-29 10:15:48 +02: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 04:46:21 -07:00
|
|
|
vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/thrift)
|
2017-05-24 14:27:24 -07: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()
|