diff --git a/.github/workflows/cpp_workflow.yml b/.github/workflows/cpp_workflow.yml index bdec90b6..aab96fa5 100644 --- a/.github/workflows/cpp_workflow.yml +++ b/.github/workflows/cpp_workflow.yml @@ -60,13 +60,13 @@ jobs: export GCC='gcc-10' export CXX='g++-10' bash cpp/tools/install_depends.sh -o ubuntu - mkdir -p cpp/build && cd cpp/build && cmake -DTESTS=ON -DCOVERAGE=ON -DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake ../ + mkdir -p cpp/build && cd cpp/build && cmake -DTESTS=ON -DCOVERAGE=ON -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake ../ make -j3 - name: Build for macos if: runner.os == 'macOS' run: | bash cpp/tools/install_depends.sh -o macos - mkdir -p cpp/build && cd cpp/build && cmake -DTESTS=ON -DCOVERAGE=ON -DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake ../ + mkdir -p cpp/build && cd cpp/build && cmake -DTESTS=ON -DCOVERAGE=ON -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake ../ make -j3 - name: Test if: runner.os != 'Windows' diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index f15fcba6..b011c29f 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -36,13 +36,12 @@ if(WIN32) endif() # vcpkg init -if(NOT DEFINED CMAKE_TOOLCHAIN_FILE) +if(NOT DEFINED VCPKG_CHAINLOAD_TOOLCHAIN_FILE) find_package(Git REQUIRED) execute_process(COMMAND ${GIT_EXECUTABLE} submodule update --init --recursive -- vcpkg WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) - set(CMAKE_TOOLCHAIN_FILE "${CMAKE_CURRENT_SOURCE_DIR}/vcpkg/scripts/buildsystems/vcpkg.cmake" + set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${CMAKE_CURRENT_SOURCE_DIR}/vcpkg/scripts/buildsystems/vcpkg.cmake" CACHE STRING "Vcpkg toolchain file") endif() - include(Version) project(WeDPR-Component VERSION ${VERSION}) diff --git a/cpp/vcpkg-configuration.json b/cpp/vcpkg-configuration.json index 5913a7c1..89aed10f 100644 --- a/cpp/vcpkg-configuration.json +++ b/cpp/vcpkg-configuration.json @@ -2,8 +2,8 @@ "registries": [ { "kind": "git", - "repository": "https://github.com/FISCO-BCOS/registry", - "baseline": "070f336149afdac5cc9ace97df01de7ee31aab30", + "repository": "https://github.com/cyjseagull/registry", + "baseline": "7f641e8f28f73dc09f1349247b101a45a82ae431", "packages": [ "openssl", "bcos-utilities",