Skip to content

Commit 71be51f

Browse files
rcsanchez97ajdavis
authored andcommitted
CDRIVER-2673 fix libbson/libmongoc file names and SONAME
1 parent b7b6615 commit 71be51f

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

src/libbson/CMakeLists.txt

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -211,10 +211,7 @@ set (HEADERS
211211
add_library (bson_shared SHARED ${SOURCES} ${HEADERS})
212212
set (CMAKE_CXX_VISIBILITY_PRESET hidden)
213213
set_target_properties (bson_shared PROPERTIES COMPILE_DEFINITIONS "BSON_COMPILATION;JSONSL_PARSE_NAN")
214-
# CMake wants to make different symlinks than the Autotools, see
215-
# https://cmake.org/pipermail/cmake/2007-September/016501.html
216-
# This hack sets up standard symlink, libbson-1.0.so -> libbson-1.0.0.so
217-
set_target_properties (bson_shared PROPERTIES VERSION 0 SOVERSION ${BSON_MAJOR_VERSION})
214+
set_target_properties (bson_shared PROPERTIES VERSION 0.0.0 SOVERSION 0)
218215
set_target_properties (bson_shared PROPERTIES OUTPUT_NAME "bson-${BSON_API_VERSION}" PREFIX "lib")
219216

220217
if (RT_LIBRARY)
@@ -245,7 +242,7 @@ endif ()
245242
if (ENABLE_STATIC MATCHES "ON|AUTO")
246243
add_library (bson_static STATIC ${SOURCES} ${HEADERS})
247244
set_target_properties (bson_static PROPERTIES COMPILE_DEFINITIONS "BSON_COMPILATION;BSON_STATIC;JSONSL_PARSE_NAN")
248-
set_target_properties (bson_static PROPERTIES VERSION ${BSON_VERSION})
245+
set_target_properties (bson_static PROPERTIES VERSION 0.0.0)
249246
set_target_properties (bson_static PROPERTIES OUTPUT_NAME "bson-static-${BSON_API_VERSION}")
250247
target_link_libraries (bson_static Threads::Threads)
251248
if (RT_LIBRARY)

src/libmongoc/CMakeLists.txt

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -579,18 +579,15 @@ target_link_libraries (mongoc_shared ${LIBRARIES} ${BSON_LIBRARIES})
579579
target_include_directories (mongoc_shared BEFORE PUBLIC ${BSON_INCLUDE_DIRS} ${MONGOC_INTERNAL_INCLUDE_DIRS})
580580
target_compile_definitions (mongoc_shared PUBLIC MONGOC_COMPILATION ${BSON_DEFINITIONS})
581581

582-
# CMake wants to make different symlinks than the Autotools, see
583-
# https://cmake.org/pipermail/cmake/2007-September/016501.html
584-
# This hack sets up standard symlink, libmongoc-1.0.so -> libmongoc-1.0.0.so
585-
set_target_properties (mongoc_shared PROPERTIES VERSION 0 SOVERSION ${MONGOC_MAJOR_VERSION})
582+
set_target_properties (mongoc_shared PROPERTIES VERSION 0.0.0 SOVERSION 0)
586583
set_target_properties (mongoc_shared PROPERTIES OUTPUT_NAME "mongoc-${MONGOC_API_VERSION}" PREFIX "lib")
587584

588585
if (MONGOC_ENABLE_STATIC)
589586
add_library (mongoc_static STATIC ${SOURCES} ${HEADERS})
590587
target_link_libraries (mongoc_static ${LIBRARIES} ${BSON_STATIC_LIBRARIES})
591588
target_include_directories (mongoc_static BEFORE PUBLIC ${BSON_STATIC_INCLUDE_DIRS} ${MONGOC_INTERNAL_INCLUDE_DIRS})
592589
target_compile_definitions (mongoc_static PUBLIC MONGOC_COMPILATION MONGOC_STATIC ${BSON_STATIC_DEFINITIONS})
593-
set_target_properties (mongoc_static PROPERTIES VERSION ${MONGOC_VERSION})
590+
set_target_properties (mongoc_static PROPERTIES VERSION 0.0.0)
594591
set_target_properties (mongoc_static PROPERTIES OUTPUT_NAME "mongoc-static-${MONGOC_API_VERSION}")
595592
endif ()
596593

0 commit comments

Comments
 (0)