diff options
| author | Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> | 2020-02-05 06:46:24 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-02-04 14:46:24 -0800 |
| commit | d09f4faf526b33a8d938e653589ec1d726ef146f (patch) | |
| tree | 968f013eaa2510bd3e0d0ac9df6aedf489b3df33 /ports/cppmicroservices | |
| parent | d4c6627acd395878f10ad5459a0d0993bddf5993 (diff) | |
| download | vcpkg-d09f4faf526b33a8d938e653589ec1d726ef146f.tar.gz vcpkg-d09f4faf526b33a8d938e653589ec1d726ef146f.zip | |
[cppmicroservices] Fix find dependency gtest (#9886)
* [cppmicroservices] Fix find dependency gtest
* update baseline
Diffstat (limited to 'ports/cppmicroservices')
| -rw-r--r-- | ports/cppmicroservices/CONTROL | 4 | ||||
| -rw-r--r-- | ports/cppmicroservices/fix-dependency-gtest.patch | 24 | ||||
| -rw-r--r-- | ports/cppmicroservices/portfile.cmake | 13 |
3 files changed, 34 insertions, 7 deletions
diff --git a/ports/cppmicroservices/CONTROL b/ports/cppmicroservices/CONTROL index 4ca4793f0..91748199f 100644 --- a/ports/cppmicroservices/CONTROL +++ b/ports/cppmicroservices/CONTROL @@ -1,5 +1,5 @@ Source: cppmicroservices -Version: v3.4.0 +Version: 3.4.0-1 Homepage: https://github.com/CppMicroServices/CppMicroServices Description: An OSGi-like C++ dynamic module system and service registry - +Build-Depends: gtest
\ No newline at end of file diff --git a/ports/cppmicroservices/fix-dependency-gtest.patch b/ports/cppmicroservices/fix-dependency-gtest.patch new file mode 100644 index 000000000..9eb9459f1 --- /dev/null +++ b/ports/cppmicroservices/fix-dependency-gtest.patch @@ -0,0 +1,24 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 136edff..9d29522 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -288,6 +288,10 @@ if(US_COMPILER_APPLE_CLANG OR US_COMPILER_CLANG) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++") + endif() + ++# Dependency ++find_package(GTest CONFIG REQUIRED) ++link_libraries(GTest::gtest GTest::gmock) ++ + #----------------------------------------------------------------------------- + # Testing configuration + #----------------------------------------------------------------------------- +@@ -338,7 +342,7 @@ if(US_BUILD_TESTING) + endif() + + if(US_USE_SYSTEM_GTEST) +- find_package(GTest REQUIRED) ++ find_package(GTest CONFIG REQUIRED) + else() + # This keeps GTest CMake variables hidden from users unless they explicitly want to view/modify them. + us_cache_var(BUILD_GMOCK ON BOOL "Build GMock" ADVANCED FORCE) diff --git a/ports/cppmicroservices/portfile.cmake b/ports/cppmicroservices/portfile.cmake index c15e2eb8b..47df1e14e 100644 --- a/ports/cppmicroservices/portfile.cmake +++ b/ports/cppmicroservices/portfile.cmake @@ -4,7 +4,9 @@ vcpkg_from_github( REF b4d3d404df01d67dfd7fc36111bc5de50e1b89d6 # v3.4.0 SHA512 b4a55f7c86cae25e936a237108b82824458b123fa1c14d4e0218c72c444a6d7f0db8900409af321225ec818f5691894b01fd311c606463386e7ce8e81e3656c8 HEAD_REF development - PATCHES werror.patch + PATCHES + werror.patch + fix-dependency-gtest.patch ) vcpkg_configure_cmake( @@ -13,21 +15,22 @@ vcpkg_configure_cmake( OPTIONS -DTOOLS_INSTALL_DIR:STRING=tools/cppmicroservices -DAUXILIARY_INSTALL_DIR:STRING=share/cppmicroservices + -DUS_USE_SYSTEM_GTEST=TRUE ) vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -# Handle copyright -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/cppmicroservices RENAME copyright) vcpkg_fixup_cmake_targets() +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + # CppMicroServices uses a custom resource compiler to compile resources # the zipped resources are then appended to the target which cause the linker to crash # when compiling a static library if(NOT BUILD_SHARED_LIBS) set(VCPKG_POLICY_EMPTY_PACKAGE enabled) -endif() - +endif()
\ No newline at end of file |
