diff --git a/CMakeLists.txt b/CMakeLists.txt index 674e8125..9b799590 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,7 +27,7 @@ target_include_directories(reflectcpp PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include if (REFLECTCPP_BSON) find_package(bson-1.0 CONFIG REQUIRED) - target_link_libraries(reflectcpp INTERFACE mongo::bson_static) + target_link_libraries(reflectcpp PRIVATE $,mongo::bson_static,mongo::bson_shared>) endif () if (REFLECTCPP_FLEXBUFFERS)