Skip to content

Commit 32deb74

Browse files
authored
DOCSP-48659: New CMake packages (#103)
* DOCSP-48659: New CMake packages * KA feedback * edit note * typo * tech feedback
1 parent e0a85f6 commit 32deb74

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

source/get-started.txt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)