2017-05-25 04:00:07 +08:00
include ( vcpkg_common_functions )
2017-05-25 23:45:58 +08:00
if ( VCPKG_LIBRARY_LINKAGE STREQUAL dynamic )
message ( STATUS "Warning: Dynamic building not supported. Building static." ) # See note below
set ( VCPKG_LIBRARY_LINKAGE static )
2017-05-27 06:19:59 +08:00
2017-05-28 19:46:21 +08:00
# 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 ( )
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 (
O U T _ S O U R C E _ P A T H S O U R C E _ P A T H
R E P O a p a c h e / t h r i f t
2019-04-04 05:43:56 +08:00
R E F 7 b 9 4 d d 4 2 2 1 1 7 f f b 6 c 6 4 6 d 1 2 1 7 c 6 4 3 e f b 8 0 a 8 c f 4 5
S H A 5 1 2 5 6 b 1 8 1 0 0 3 1 b 2 6 c c c 9 2 1 c c 3 9 a 2 5 1 1 f b e e 9 a f 1 6 5 c 6 1 8 b 5 e c b 7 2 d 8 f 3 d b d f 9 a e 1 d 0 5 b 8 a d f e 5 9 e 6 f 7 e c e 8 b e 8 3 7 c a 6 9 a 5 8 e 2 7 9 9 9 7 d d 7 6 c 9 3 e 2 8 c 9 6 6 0 7 f 1 8 e 2 b a d c f b d 1
2017-05-25 04:00:07 +08:00
H E A D _ R E F m a s t e r
)
vcpkg_configure_cmake (
S O U R C E _ P A T H $ { S O U R C E _ P A T H }
2017-12-06 05:01:50 +08:00
P R E F E R _ N I N J A
2017-05-28 19:46:21 +08:00
O P T I O N S
- D W I T H _ S H A R E D _ L I B = O F F
- D W I T H _ S T A T I C _ L I B = O N
2017-12-06 05:01:50 +08:00
- D W I T H _ S T D T H R E A D S = O N
2017-05-28 19:46:21 +08:00
- D B U I L D _ T E S T I N G = o f f
- D B U I L D _ J A V A = o f f
- D B U I L D _ C _ G L I B = o f f
- D B U I L D _ P Y T H O N = o f f
- D B U I L D _ C P P = o n
- D B U I L D _ H A S K E L L = o f f
- D B U I L D _ T U T O R I A L S = o f f
- D F L E X _ E X E C U T A B L E = $ { F L E X }
- D B I S O N _ E X E C U T A B L E = $ { B I S O N }
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 ( )