File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,17 @@ elseif (PKG_CONFIG_FOUND)
3434 # We don't reiterate the version information here because we assume that
3535 # pkg_check_modules has honored our request.
3636 find_package_handle_standard_args(LIBMONGOC DEFAULT_MSG LIBMONGOC_FOUND)
37+ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND LIBMONGOC_LDFLAGS_OTHER)
38+ # pkg_check_modules strips framework libraries and puts them in the
39+ # LIBMONGOC_LDFLAGS_OTHER variable. We need to append them
40+ # back to LIBMONGOC_LIBRARIES, but need to change from
41+ # "-framework;Security;-framework;CoreFoundation" to
42+ # "-framework Security;-framework CoreFoundation"
43+ string (REPLACE "-framework;" "-framework " LIBMONGOC_FRAMEWORKS "${LIBMONGOC_LDFLAGS_OTHER} " )
44+ list (APPEND LIBMONGOC_LIBRARIES ${LIBMONGOC_FRAMEWORKS} )
45+ # publish updated value back to the cache
46+ set (LIBMONGOC_LIBRARIES ${LIBMONGOC_LIBRARIES} CACHE INTERNAL "" )
47+ endif ()
3748else ()
3849 message (FATAL_ERROR "Don't know how to find libmongoc; please set LIBMONGOC_DIR to the prefix directory with which libbson was configured." )
3950endif ()
You can’t perform that action at this time.
0 commit comments