@@ -73,13 +73,13 @@ message ("bsoncxx version: ${BSONCXX_VERSION}")
73
73
set (BSONCXX_INLINE_NAMESPACE "v${BSONCXX_ABI_VERSION} " )
74
74
set (BSONCXX_HEADER_INSTALL_DIR "${CMAKE_INSTALL_INCLUDEDIR} /bsoncxx/${BSONCXX_INLINE_NAMESPACE} " CACHE INTERNAL "" )
75
75
76
+ set (BSONCXX_POLY_MNMLSTC_DEPRECATED_INCLUDE_DIRS "" )
77
+ set (BSONCXX_POLY_MNMLSTC_PKGCONFIG_INCLUDE_DIRS "" )
78
+ set (BSONCXX_POLY_MNMLSTC_PKGCONFIG_STATIC_INCLUDE_DIRS "" )
76
79
if (BSONCXX_POLY_USE_MNMLSTC AND NOT BSONCXX_POLY_USE_SYSTEM_MNMLSTC )
77
80
# For deprecated CMake package config files.
78
81
set (BSONCXX_POLY_MNMLSTC_DEPRECATED_INCLUDE_DIRS
79
- [[list(PREPEND LIBBSONCXX_INCLUDE_DIRS "${PACKAGE_PREFIX_DIR}/include/bsoncxx/v_noabi/bsoncxx/third_party/mnmlstc")]]
80
- )
81
- set (BSONCXX_POLY_MNMLSTC_DEPRECATED_STATIC_INCLUDE_DIRS
82
- [[list(PREPEND LIBBSONCXX_STATIC_INCLUDE_DIRS "${PACKAGE_PREFIX_DIR}/include/bsoncxx/v_noabi/bsoncxx/third_party/mnmlstc")]]
82
+ "${CMAKE_INSTALL_INCLUDEDIR} /bsoncxx/v_noabi/bsoncxx/third_party/mnmlstc"
83
83
)
84
84
85
85
# For pkg-config files. Trailing space to separate cflags.
@@ -142,26 +142,26 @@ else()
142
142
endif ()
143
143
144
144
add_subdirectory (third_party )
145
- add_subdirectory (config )
145
+ add_subdirectory (lib/bsoncxx/v_noabi/bsoncxx/ config )
146
146
147
147
set (bsoncxx_sources
148
- array/element.cpp
149
- array/value.cpp
150
- array/view.cpp
151
- builder/core.cpp
152
- decimal128.cpp
153
- document/element.cpp
154
- document/value.cpp
155
- document/view.cpp
156
- exception/error_code.cpp
157
- json.cpp
158
- oid.cpp
159
- private /itoa.cpp
160
- string /view_or_value.cpp
161
- types.cpp
162
- types/bson_value/value.cpp
163
- types/bson_value/view.cpp
164
- validate.cpp
148
+ lib/bsoncxx/v_noabi/bsoncxx/ array/element.cpp
149
+ lib/bsoncxx/v_noabi/bsoncxx/ array/value.cpp
150
+ lib/bsoncxx/v_noabi/bsoncxx/ array/view.cpp
151
+ lib/bsoncxx/v_noabi/bsoncxx/ builder/core.cpp
152
+ lib/bsoncxx/v_noabi/bsoncxx/ decimal128.cpp
153
+ lib/bsoncxx/v_noabi/bsoncxx/ document/element.cpp
154
+ lib/bsoncxx/v_noabi/bsoncxx/ document/value.cpp
155
+ lib/bsoncxx/v_noabi/bsoncxx/ document/view.cpp
156
+ lib/bsoncxx/v_noabi/bsoncxx/ exception/error_code.cpp
157
+ lib/bsoncxx/v_noabi/bsoncxx/ json.cpp
158
+ lib/bsoncxx/v_noabi/bsoncxx/ oid.cpp
159
+ lib/bsoncxx/v_noabi/bsoncxx/ private/itoa.cpp
160
+ lib/bsoncxx/v_noabi/bsoncxx/ string/view_or_value.cpp
161
+ lib/bsoncxx/v_noabi/bsoncxx/ types.cpp
162
+ lib/bsoncxx/v_noabi/bsoncxx/ types/bson_value/value.cpp
163
+ lib/bsoncxx/v_noabi/bsoncxx/ types/bson_value/view.cpp
164
+ lib/bsoncxx/v_noabi/bsoncxx/ validate.cpp
165
165
)
166
166
167
167
# We define both the normal libraries and the testing-only library. The testing-only
@@ -194,21 +194,51 @@ if(ENABLE_TESTS)
194
194
target_compile_definitions (bsoncxx_testing PUBLIC BSONCXX_TESTING )
195
195
endif ()
196
196
197
+ set (libdir "\$ {prefix}/${CMAKE_INSTALL_LIBDIR} " )
198
+
199
+ if (BSONCXX_BUILD_SHARED )
200
+ configure_file (
201
+ cmake/libbsoncxx.pc.in
202
+ cmake/libbsoncxx.pc
203
+ @ONLY
204
+ )
205
+
206
+ install (FILES
207
+ ${CMAKE_CURRENT_BINARY_DIR} /cmake/libbsoncxx.pc
208
+ DESTINATION ${CMAKE_INSTALL_LIBDIR} /pkgconfig
209
+ COMPONENT dev
210
+ )
211
+ endif ()
212
+
213
+ if (BSONCXX_BUILD_STATIC )
214
+ configure_file (
215
+ cmake/libbsoncxx-static.pc.in
216
+ cmake/libbsoncxx-static.pc
217
+ @ONLY
218
+ )
219
+
220
+ install (FILES
221
+ ${CMAKE_CURRENT_BINARY_DIR} /cmake/libbsoncxx-static.pc
222
+ DESTINATION ${CMAKE_INSTALL_LIBDIR} /pkgconfig
223
+ COMPONENT dev
224
+ )
225
+ endif ()
197
226
198
- install (DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
199
- DESTINATION ${BSONCXX_HEADER_INSTALL_DIR }
227
+ install (DIRECTORY include /
228
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR }
200
229
COMPONENT dev
201
- FILES_MATCHING
202
- PATTERN "*.hpp"
203
230
)
204
231
205
232
install (FILES
206
- ${CMAKE_CURRENT_BINARY_DIR} /config/export.hpp
233
+ ${PROJECT_BINARY_DIR} /lib/bsoncxx/v_noabi/bsoncxx /config/export.hpp
207
234
DESTINATION ${BSONCXX_HEADER_INSTALL_DIR} /bsoncxx/config
208
235
COMPONENT dev
209
236
)
210
237
211
- set (PACKAGE_INCLUDE_INSTALL_DIRS ${BSONCXX_HEADER_INSTALL_DIR} )
238
+ set (PACKAGE_INCLUDE_INSTALL_DIRS
239
+ ${BSONCXX_HEADER_INSTALL_DIR}
240
+ ${BSONCXX_POLY_MNMLSTC_DEPRECATED_INCLUDE_DIRS}
241
+ )
212
242
set (PACKAGE_LIBRARY_INSTALL_DIRS ${CMAKE_INSTALL_LIBDIR} )
213
243
set (PACKAGE_LIBRARIES bsoncxx )
214
244
@@ -233,90 +263,99 @@ if(ENABLE_TESTS)
233
263
add_subdirectory (test )
234
264
endif ()
235
265
236
- set_local_dist (src_bsoncxx_DIST_local
266
+ set_local_dist (src_bsoncxx_lib_v_noabi_DIST_local
237
267
CMakeLists.txt
238
- array/element.cpp
239
- array/element.hpp
240
- array/value.cpp
241
- array/value.hpp
242
- array/view.cpp
243
- array/view.hpp
244
- array/view_or_value.hpp
245
- builder/list.hpp
246
- builder/basic/array.hpp
247
- builder/basic/document.hpp
248
- builder/basic/helpers.hpp
249
- builder/basic/impl.hpp
250
- builder/basic/kvp.hpp
251
- builder/basic/sub_array.hpp
252
- builder/basic/sub_document.hpp
253
- builder/concatenate.hpp
254
- builder/core.cpp
255
- builder/core.hpp
256
- builder/stream/array.hpp
257
- builder/stream/array_context.hpp
258
- builder/stream/closed_context.hpp
259
- builder/stream/document.hpp
260
- builder/stream/helpers.hpp
261
- builder/stream/key_context.hpp
262
- builder/stream/single_context.hpp
263
- builder/stream/value_context.hpp
268
+ lib/bsoncxx/v_noabi/bsoncxx/array/element.cpp
269
+ lib/bsoncxx/v_noabi/bsoncxx/array/value.cpp
270
+ lib/bsoncxx/v_noabi/bsoncxx/array/view.cpp
271
+ lib/bsoncxx/v_noabi/bsoncxx/builder/core.cpp
264
272
cmake/bsoncxx-config.cmake.in
265
273
cmake/libbsoncxx-config.cmake.in
266
274
cmake/libbsoncxx-static-config.cmake.in
267
- decimal128.cpp
268
- decimal128.hpp
269
- document/element.cpp
270
- document/element.hpp
271
- document/value.cpp
272
- document/value.hpp
273
- document/view.cpp
274
- document/view.hpp
275
- document/view_or_value.hpp
276
- enums/binary_sub_type.hpp
277
- enums/type.hpp
278
- exception/error_code.cpp
279
- exception/error_code.hpp
280
- exception/exception.hpp
281
- json.cpp
282
- json.hpp
283
- oid.cpp
284
- oid.hpp
285
- private /b64_ntop.hh
286
- private /helpers.hh
287
- private /itoa.cpp
288
- private /itoa.hh
289
- private /libbson.hh
290
- private /stack.hh
291
- private /suppress_deprecation_warnings.hh
292
- stdx/make_unique.hpp
293
- stdx/optional.hpp
294
- stdx/string_view.hpp
295
- string /to_string.hpp
296
- string /view_or_value.cpp
297
- string /view_or_value.hpp
298
- test_util/catch.hh
299
- test_util/export_for_testing.hh
300
- test_util/to_string.hh
301
- types.cpp
302
- types.hpp
303
- types/value.hpp
304
- types/private/convert.hh
305
- types/bson_value/make_value.hpp
306
- types/bson_value/private/value.hh
307
- types/bson_value/value.cpp
308
- types/bson_value/value.hpp
309
- types/bson_value/view.cpp
310
- types/bson_value/view.hpp
311
- types/bson_value/view_or_value.hpp
312
- util/functor.hpp
313
- validate.cpp
314
- validate.hpp
315
- view_or_value.hpp
275
+ cmake/libbsoncxx-static.pc.in
276
+ cmake/libbsoncxx.pc.in
277
+ lib/bsoncxx/v_noabi/bsoncxx/decimal128.cpp
278
+ lib/bsoncxx/v_noabi/bsoncxx/document/element.cpp
279
+ lib/bsoncxx/v_noabi/bsoncxx/document/value.cpp
280
+ lib/bsoncxx/v_noabi/bsoncxx/document/view.cpp
281
+ lib/bsoncxx/v_noabi/bsoncxx/exception/error_code.cpp
282
+ lib/bsoncxx/v_noabi/bsoncxx/json.cpp
283
+ lib/bsoncxx/v_noabi/bsoncxx/oid.cpp
284
+ lib/bsoncxx/v_noabi/bsoncxx/private/b64_ntop.hh
285
+ lib/bsoncxx/v_noabi/bsoncxx/private/helpers.hh
286
+ lib/bsoncxx/v_noabi/bsoncxx/private/itoa.cpp
287
+ lib/bsoncxx/v_noabi/bsoncxx/private/itoa.hh
288
+ lib/bsoncxx/v_noabi/bsoncxx/private/libbson.hh
289
+ lib/bsoncxx/v_noabi/bsoncxx/private/stack.hh
290
+ lib/bsoncxx/v_noabi/bsoncxx/private/suppress_deprecation_warnings.hh
291
+ lib/bsoncxx/v_noabi/bsoncxx/string/view_or_value.cpp
292
+ lib/bsoncxx/v_noabi/bsoncxx/test_util/catch.hh
293
+ lib/bsoncxx/v_noabi/bsoncxx/test_util/export_for_testing.hh
294
+ lib/bsoncxx/v_noabi/bsoncxx/test_util/to_string.hh
295
+ lib/bsoncxx/v_noabi/bsoncxx/types.cpp
296
+ lib/bsoncxx/v_noabi/bsoncxx/types/private/convert.hh
297
+ lib/bsoncxx/v_noabi/bsoncxx/types/bson_value/private/value.hh
298
+ lib/bsoncxx/v_noabi/bsoncxx/types/bson_value/value.cpp
299
+ lib/bsoncxx/v_noabi/bsoncxx/types/bson_value/view.cpp
300
+ lib/bsoncxx/v_noabi/bsoncxx/validate.cpp
301
+ )
302
+
303
+ set_local_dist (src_bsoncxx_include_v_noabi_DIST_local
304
+ include /bsoncxx/v_noabi/bsoncxx/array/element.hpp
305
+ include /bsoncxx/v_noabi/bsoncxx/array/value.hpp
306
+ include /bsoncxx/v_noabi/bsoncxx/array/view_or_value.hpp
307
+ include /bsoncxx/v_noabi/bsoncxx/array/view.hpp
308
+ include /bsoncxx/v_noabi/bsoncxx/builder/basic/array.hpp
309
+ include /bsoncxx/v_noabi/bsoncxx/builder/basic/document.hpp
310
+ include /bsoncxx/v_noabi/bsoncxx/builder/basic/helpers.hpp
311
+ include /bsoncxx/v_noabi/bsoncxx/builder/basic/impl.hpp
312
+ include /bsoncxx/v_noabi/bsoncxx/builder/basic/kvp.hpp
313
+ include /bsoncxx/v_noabi/bsoncxx/builder/basic/sub_array.hpp
314
+ include /bsoncxx/v_noabi/bsoncxx/builder/basic/sub_document.hpp
315
+ include /bsoncxx/v_noabi/bsoncxx/builder/concatenate.hpp
316
+ include /bsoncxx/v_noabi/bsoncxx/builder/core.hpp
317
+ include /bsoncxx/v_noabi/bsoncxx/builder/list.hpp
318
+ include /bsoncxx/v_noabi/bsoncxx/builder/stream/array_context.hpp
319
+ include /bsoncxx/v_noabi/bsoncxx/builder/stream/array.hpp
320
+ include /bsoncxx/v_noabi/bsoncxx/builder/stream/closed_context.hpp
321
+ include /bsoncxx/v_noabi/bsoncxx/builder/stream/document.hpp
322
+ include /bsoncxx/v_noabi/bsoncxx/builder/stream/helpers.hpp
323
+ include /bsoncxx/v_noabi/bsoncxx/builder/stream/key_context.hpp
324
+ include /bsoncxx/v_noabi/bsoncxx/builder/stream/single_context.hpp
325
+ include /bsoncxx/v_noabi/bsoncxx/builder/stream/value_context.hpp
326
+ include /bsoncxx/v_noabi/bsoncxx/config/compiler.hpp
327
+ include /bsoncxx/v_noabi/bsoncxx/config/postlude.hpp
328
+ include /bsoncxx/v_noabi/bsoncxx/config/prelude.hpp
329
+ include /bsoncxx/v_noabi/bsoncxx/decimal128.hpp
330
+ include /bsoncxx/v_noabi/bsoncxx/document/element.hpp
331
+ include /bsoncxx/v_noabi/bsoncxx/document/value.hpp
332
+ include /bsoncxx/v_noabi/bsoncxx/document/view_or_value.hpp
333
+ include /bsoncxx/v_noabi/bsoncxx/document/view.hpp
334
+ include /bsoncxx/v_noabi/bsoncxx/enums/binary_sub_type.hpp
335
+ include /bsoncxx/v_noabi/bsoncxx/enums/type.hpp
336
+ include /bsoncxx/v_noabi/bsoncxx/exception/error_code.hpp
337
+ include /bsoncxx/v_noabi/bsoncxx/exception/exception.hpp
338
+ include /bsoncxx/v_noabi/bsoncxx/json.hpp
339
+ include /bsoncxx/v_noabi/bsoncxx/oid.hpp
340
+ include /bsoncxx/v_noabi/bsoncxx/stdx/make_unique.hpp
341
+ include /bsoncxx/v_noabi/bsoncxx/stdx/optional.hpp
342
+ include /bsoncxx/v_noabi/bsoncxx/stdx/string_view.hpp
343
+ include /bsoncxx/v_noabi/bsoncxx/string/to_string.hpp
344
+ include /bsoncxx/v_noabi/bsoncxx/string/view_or_value.hpp
345
+ include /bsoncxx/v_noabi/bsoncxx/types.hpp
346
+ include /bsoncxx/v_noabi/bsoncxx/types/bson_value/make_value.hpp
347
+ include /bsoncxx/v_noabi/bsoncxx/types/bson_value/value.hpp
348
+ include /bsoncxx/v_noabi/bsoncxx/types/bson_value/view_or_value.hpp
349
+ include /bsoncxx/v_noabi/bsoncxx/types/bson_value/view.hpp
350
+ include /bsoncxx/v_noabi/bsoncxx/types/value.hpp
351
+ include /bsoncxx/v_noabi/bsoncxx/util/functor.hpp
352
+ include /bsoncxx/v_noabi/bsoncxx/validate.hpp
353
+ include /bsoncxx/v_noabi/bsoncxx/view_or_value.hpp
316
354
)
317
355
318
356
set (src_bsoncxx_DIST
319
- ${src_bsoncxx_DIST_local}
357
+ ${src_bsoncxx_lib_v_noabi_DIST_local}
358
+ ${src_bsoncxx_include_v_noabi_DIST_local}
320
359
${src_bsoncxx_config_DIST}
321
360
${src_bsoncxx_third_party_DIST}
322
361
${src_bsoncxx_test_DIST}
0 commit comments