Skip to content

Commit baec8d1

Browse files
committed
Search for system thrift and remove internal headers
1 parent c52b929 commit baec8d1

File tree

1 file changed

+31
-31
lines changed

1 file changed

+31
-31
lines changed

cpp/src/parquet/meson.build

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -57,32 +57,36 @@ parquet_srcs = files(
5757
'xxhasher.cc',
5858
)
5959

60-
cmake = import('cmake')
61-
thrift_opts = cmake.subproject_options()
62-
thrift_opts.add_cmake_defines(
63-
{
64-
'BUILD_COMPILER': 'OFF',
65-
'BUILD_EXAMPLES': 'OFF',
66-
'BUILD_TUTORIALS': 'OFF',
67-
'CMAKE_UNITY_BUILD': 'OFF',
68-
'WITH_AS3': 'OFF',
69-
'WITH_CPP': 'ON',
70-
'WITH_C_GLIB': 'OFF',
71-
'WITH_JAVA': 'OFF',
72-
'WITH_JAVASCRIPT': 'OFF',
73-
'WITH_LIBEVENT': 'OFF',
74-
'WITH_NODEJS': 'OFF',
75-
'WITH_PYTHON': 'OFF',
76-
'WITH_QT5': 'OFF',
77-
'WITH_ZLIB': 'OFF',
78-
'CMAKE_POSITION_INDEPENDENT_CODE': 'ON',
79-
'CMAKE_POLICY_VERSION_MINIMUM': '3.5',
80-
# dummy value to avoid https://github.com/mesonbuild/meson/issues/13390
81-
'THRIFT_COMPILER': 'foo',
82-
},
83-
)
84-
thrift_proj = cmake.subproject('thrift', options: thrift_opts)
85-
thrift_dep = thrift_proj.dependency('thrift')
60+
thrift_dep = dependency('thrift', allow_fallback: false, required: false)
61+
if not thrift_dep.found()
62+
cmake = import('cmake')
63+
thrift_opts = cmake.subproject_options()
64+
thrift_opts.add_cmake_defines(
65+
{
66+
'BUILD_COMPILER': 'OFF',
67+
'BUILD_EXAMPLES': 'OFF',
68+
'BUILD_TUTORIALS': 'OFF',
69+
'CMAKE_UNITY_BUILD': 'OFF',
70+
'WITH_AS3': 'OFF',
71+
'WITH_CPP': 'ON',
72+
'WITH_C_GLIB': 'OFF',
73+
'WITH_JAVA': 'OFF',
74+
'WITH_JAVASCRIPT': 'OFF',
75+
'WITH_LIBEVENT': 'OFF',
76+
'WITH_NODEJS': 'OFF',
77+
'WITH_PYTHON': 'OFF',
78+
'WITH_QT5': 'OFF',
79+
'WITH_ZLIB': 'OFF',
80+
'CMAKE_POSITION_INDEPENDENT_CODE': 'ON',
81+
'CMAKE_POLICY_VERSION_MINIMUM': '3.5',
82+
# dummy value to avoid https://github.com/mesonbuild/meson/issues/13390
83+
'THRIFT_COMPILER': 'foo',
84+
},
85+
)
86+
thrift_proj = cmake.subproject('thrift', options: thrift_opts)
87+
thrift_dep = thrift_proj.dependency('thrift')
88+
endif
89+
8690
parquet_deps = [arrow_dep, rapidjson_dep, thrift_dep]
8791

8892
if needs_parquet_encryption or get_option('parquet_require_encryption') == 'auto'
@@ -117,7 +121,7 @@ parquet_lib = library(
117121
sources: parquet_srcs,
118122
dependencies: parquet_deps,
119123
# TODO: enable hidden visibility by default
120-
#gnu_symbol_visibility: 'hidden',
124+
#gnu_symbol_visibility: 'inlineshidden',
121125
)
122126

123127
parquet_dep = declare_dependency(link_with: parquet_lib)
@@ -132,8 +136,6 @@ install_headers(
132136
'benchmark_util.h',
133137
'bloom_filter.h',
134138
'bloom_filter_reader.h',
135-
'chunker_internal_generated.h',
136-
'chunker_internal.h',
137139
'column_page.h',
138140
'column_reader.h',
139141
'column_scanner.h',
@@ -153,13 +155,11 @@ install_headers(
153155
'printer.h',
154156
'properties.h',
155157
'schema.h',
156-
'schema_internal.h',
157158
'size_statistics.h',
158159
'statistics.h',
159160
'stream_reader.h',
160161
'stream_writer.h',
161162
'test_util.h',
162-
'thrift_internal.h',
163163
'type_fwd.h',
164164
'types.h',
165165
'windows_compatibility.h',

0 commit comments

Comments
 (0)