aboutsummaryrefslogtreecommitdiff
path: root/ports/gtest
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2017-11-16 23:54:55 -0800
committerRobert Schumacher <roschuma@microsoft.com>2017-11-16 23:54:55 -0800
commit1b2f75be941e9eed5986c10eb99fd6049490daec (patch)
treec782bfff26daa96f0aba34ec39e74513330e6cc0 /ports/gtest
parent468e9e70e644eb26258434c9e27e34935eb3e06d (diff)
downloadvcpkg-1b2f75be941e9eed5986c10eb99fd6049490daec.tar.gz
vcpkg-1b2f75be941e9eed5986c10eb99fd6049490daec.zip
[vcpkg] Support \share\<port>\usage to handle libraries which are found through built-in Find Modules.
Diffstat (limited to 'ports/gtest')
-rw-r--r--ports/gtest/portfile.cmake2
-rw-r--r--ports/gtest/usage6
2 files changed, 8 insertions, 0 deletions
diff --git a/ports/gtest/portfile.cmake b/ports/gtest/portfile.cmake
index 333dc8ae3..491d6a8d5 100644
--- a/ports/gtest/portfile.cmake
+++ b/ports/gtest/portfile.cmake
@@ -60,3 +60,5 @@ file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gmock.lib ${CURRENT_PACKAGES_DIR}/
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gmock_main.lib ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/gmock_main.lib)
vcpkg_copy_pdbs()
+
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
diff --git a/ports/gtest/usage b/ports/gtest/usage
new file mode 100644
index 000000000..fa226ceed
--- /dev/null
+++ b/ports/gtest/usage
@@ -0,0 +1,6 @@
+The package gtest is compatible with built-in CMake targets:
+
+ enable_testing()
+ find_package(GTest REQUIRED)
+ target_link_libraries(main PRIVATE GTest::GTest GTest::Main)
+ add_test(AllTestsInMain main)