Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-4784

Disable shared libmongoc targets if `ENABLE_SHARED=OFF`

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 1.25.3
    • Affects Version/s: None
    • Component/s: None
    • None

      Scope

      Disable shared libmongoc targets if the CMake option ENABLE_SHARED is OFF

      Background and motivation

      CDRIVER-4705 adds a ENABLE_SHARED option. If OFF, building shared libbson targets is disabled. This is not yet applied to libmongoc.

      This may result simplifying the vcpkg port. The port currently includes a patch to disable the shared library build when the static library is built:
      https://github.com/microsoft/vcpkg/blob/ac2a14f35fcd57d7a38f09af75dd5258e96dd6ac/ports/libbson/disable-dynamic-when-static.patch

      IIUC vcpkg expects only shared or static libraries are built (but not both). Refer:
      https://learn.microsoft.com/en-us/vcpkg/contributing/maintainer-guide#choose-either-static-or-shared-binaries

            Assignee:
            kevin.albertson@mongodb.com Kevin Albertson
            Reporter:
            kevin.albertson@mongodb.com Kevin Albertson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: