From 530aadc6e230411d94f3428d5bdbd66f50217633 Mon Sep 17 00:00:00 2001 From: Tsukasa Sugiura Date: Mon, 27 Nov 2017 00:51:32 +0900 Subject: [PATCH] Add install googletest/src Add install googletest/src directory for project that desirable to build Google Test by compiling a single file. --- ports/gtest/CONTROL | 2 +- ports/gtest/portfile.cmake | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/ports/gtest/CONTROL b/ports/gtest/CONTROL index 77082f5cb2f..5afef043c26 100644 --- a/ports/gtest/CONTROL +++ b/ports/gtest/CONTROL @@ -1,3 +1,3 @@ Source: gtest -Version: 1.8-1 +Version: 1.8.0-2 Description: GoogleTest and GoogleMock testing frameworks. diff --git a/ports/gtest/portfile.cmake b/ports/gtest/portfile.cmake index 491d6a8d5ee..88b23a02244 100644 --- a/ports/gtest/portfile.cmake +++ b/ports/gtest/portfile.cmake @@ -32,6 +32,22 @@ set(ENV{_CL_} "/D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING") vcpkg_install_cmake() +file( + INSTALL + "${SOURCE_PATH}/googletest/src/gtest.cc" + "${SOURCE_PATH}/googletest/src/gtest_main.cc" + "${SOURCE_PATH}/googletest/src/gtest-all.cc" + "${SOURCE_PATH}/googletest/src/gtest-death-test.cc" + "${SOURCE_PATH}/googletest/src/gtest-filepath.cc" + "${SOURCE_PATH}/googletest/src/gtest-internal-inl.h" + "${SOURCE_PATH}/googletest/src/gtest-port.cc" + "${SOURCE_PATH}/googletest/src/gtest-printers.cc" + "${SOURCE_PATH}/googletest/src/gtest-test-part.cc" + "${SOURCE_PATH}/googletest/src/gtest-typed-test.cc" + DESTINATION + ${CURRENT_PACKAGES_DIR}/src +) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(INSTALL ${SOURCE_PATH}/googletest/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/gtest RENAME copyright)