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 diff --git a/scripts/ci.baseline.txt b/scripts/ci.baseline.txt index 640808d70..e23b38481 100644 --- a/scripts/ci.baseline.txt +++ b/scripts/ci.baseline.txt @@ -282,8 +282,6 @@ cppfs:x64-uwp=fail cppgraphqlgen:arm-uwp=fail cppgraphqlgen:x64-uwp=ignore cppkafka:x64-linux=ignore -cppmicroservices:x86-windows=fail -cppmicroservices:x64-windows=fail cppmicroservices:arm64-windows=fail cppmicroservices:arm-uwp=fail cppmicroservices:x64-uwp=fail