File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -209,18 +209,18 @@ your operating system:
209209
210210 .. code-block:: cmake
211211
212- find_package(mongoc-1.0 CONFIG REQUIRED)
213- target_link_libraries(my-application
214- PRIVATE $<IF:$<TARGET_EXISTS:mongo::mongoc_shared>,mongo::mongoc_shared,mongo::mongoc_static>)
212+ find_package(mongoc CONFIG REQUIRED)
213+ target_link_libraries(my-application PRIVATE mongoc::mongoc)
215214
216215 .. note::
217216
218- You can use the ``$<IF:$<TARGET_EXISTS...>:...>`` generator
219- expression in the preceding example to switch the link type of
220- ``libmongoc`` based on the form that is available from the
221- ``find_package()`` command. ``libmongoc`` supports building with
222- both *dynamic* and *static* library types, but vcpkg
223- installs only one type at a time.
217+ In the preceding example, the ``mongoc::mongoc`` target
218+ points to either the static library or the shared library.
219+ The library type depends on which one is available and
220+ whichever type the user specifies in the ``MONGOC_DEFAULT_IMPORTED_LIBRARY_TYPE``
221+ configuration setting. If you don't set this value and
222+ both library types are available, ``mongoc::mongoc`` uses
223+ the static library.
224224
225225 To configure the CMake project with vcpkg integration, set the CMake
226226 toolchain file in the configuration command by running the following
You can’t perform that action at this time.
0 commit comments