Skip to content

Commit fcbdf13

Browse files
committed
remove libbson dep from pkg-config
unless building against shared libbson
1 parent 9af0b34 commit fcbdf13

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,10 @@ message ("Configuring libmongocrypt version ${BUILD_VERSION}")
306306
configure_file (src/mongocrypt.h.in src/mongocrypt.h)
307307

308308
set (PROJECT_VERSION "${BUILD_VERSION}")
309-
set (PKG_CONFIG_REQUIRES_PRIVATE "libbson-1.0")
309+
# If libbson is statically linked, don't require a dependency.
310+
if (ENABLE_SHARED_BSON)
311+
set (PKG_CONFIG_REQUIRES_PRIVATE "libbson-1.0")
312+
endif ()
310313
set (PKG_CONFIG_LIBDIR "\${prefix}/${CMAKE_INSTALL_LIBDIR}")
311314
set (PKG_CONFIG_INCLUDEDIR "\${prefix}/${CMAKE_INSTALL_INCLUDEDIR}/mongocrypt")
312315
set (PKG_CONFIG_LIBS "-L\${libdir} -lmongocrypt")

0 commit comments

Comments
 (0)