aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwangli28 <47812810+wangli28@users.noreply.github.com>2019-07-07 15:19:17 +0800
committerPhil Christensen <philc@microsoft.com>2019-07-07 00:19:17 -0700
commit78b21911b7eed0f0d223416e529bc0f7b75d3e2c (patch)
tree17c4b538199f1f34d1142a51dd715c7d5e433c7b
parent8c64785e78d28e56ca5f8886ea572afa27ac0dfd (diff)
downloadvcpkg-78b21911b7eed0f0d223416e529bc0f7b75d3e2c.tar.gz
vcpkg-78b21911b7eed0f0d223416e529bc0f7b75d3e2c.zip
[mongo-c-driver] Add usage (#7048)
-rw-r--r--ports/mongo-c-driver/CONTROL2
-rw-r--r--ports/mongo-c-driver/portfile.cmake2
-rw-r--r--ports/mongo-c-driver/usage9
3 files changed, 12 insertions, 1 deletions
diff --git a/ports/mongo-c-driver/CONTROL b/ports/mongo-c-driver/CONTROL
index 0a02b9dd1..5d3b3a5f0 100644
--- a/ports/mongo-c-driver/CONTROL
+++ b/ports/mongo-c-driver/CONTROL
@@ -1,5 +1,5 @@
Source: mongo-c-driver
-Version: 1.14.0-2
+Version: 1.14.0-3
Build-Depends: libbson, openssl (!windows), zlib
Description: Client library written in C for MongoDB.
Homepage: https://github.com/mongodb/mongo-c-driver
diff --git a/ports/mongo-c-driver/portfile.cmake b/ports/mongo-c-driver/portfile.cmake
index 3db262c2f..f2b72fc08 100644
--- a/ports/mongo-c-driver/portfile.cmake
+++ b/ports/mongo-c-driver/portfile.cmake
@@ -122,6 +122,8 @@ file(RENAME ${CURRENT_PACKAGES_DIR}/share/mongo-c-driver/libmongoc-${PORT_POSTFI
vcpkg_copy_pdbs()
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
+
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libbson-1.0.pc ${CURRENT_PACKAGES_DIR}/lib/pkgconfig/libbson-1.0.pc)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libbson-static-1.0.pc ${CURRENT_PACKAGES_DIR}/lib/pkgconfig/libbson-static-1.0.pc)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/bson-1.0.lib ${CURRENT_PACKAGES_DIR}/lib/bson-1.0.lib)
diff --git a/ports/mongo-c-driver/usage b/ports/mongo-c-driver/usage
new file mode 100644
index 000000000..80595cd07
--- /dev/null
+++ b/ports/mongo-c-driver/usage
@@ -0,0 +1,9 @@
+The package mongo-c-driver is compatible with built-in CMake targets:
+
+ find_package(mongo-c-driver CONFIG REQUIRED)
+ target_include_directories(${project} PRIVATE ${MONGOC_INCLUDE_DIRS})
+
+For use dynamic library:
+ target_link_libraries(${project} PRIVATE ${MONGOC_LIBRARIES})
+For use static library:
+ target_link_libraries(${project} PRIVATE ${MONGOC_STATIC_LIBRARY})