2017-05-24 13:00:07 -07:00
include ( vcpkg_common_functions )
2017-05-25 08:45:58 -07: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-26 15:19:59 -07:00
2017-05-28 04:46:21 -07: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-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 (
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
2018-03-23 15:09:07 -07:00
R E F 2 7 2 4 7 0 7 9 0 a d 6 d b 7 9 1 b d 6 f 9 d b 3 9 9 b 2 c d 2 d 5 8 7 9 f 7 4
S H A 5 1 2 9 f 9 a e 5 d 7 2 a d f 1 b 4 6 9 7 0 f 7 5 2 7 f e 3 8 4 1 3 4 9 c 5 6 5 2 e 4 7 2 1 a 1 6 9 6 7 f 1 d 9 e d b e 4 b 1 e c c 8 3 f 1 4 6 e c e 4 9 2 2 3 4 d a 1 6 e d 7 c 0 3 3 b 1 7 2 a a 4 9 d c 7 f 5 4 3 1 b c d e a 3 7 2 8 6 a 2 d c 2 1 8 3 5 6 9 1 e
2017-05-24 13:00:07 -07: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-05 13:01:50 -08:00
P R E F E R _ N I N J A
2017-05-28 04:46:21 -07: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-05 13:01:50 -08:00
- D W I T H _ S T D T H R E A D S = O N
2017-05-28 04:46:21 -07: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-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 )
file ( GLOB EXES "${CURRENT_PACKAGES_DIR}/bin/*.exe" )
if ( EXES )
2017-05-28 04:46:21 -07:00
file ( COPY ${ EXES } DESTINATION ${ CURRENT_PACKAGES_DIR } /tools/thrift )
file ( REMOVE ${ EXES } )
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 ( )