From 7778d277bda178bfdbc1c4216c0e6c6a0de90986 Mon Sep 17 00:00:00 2001 From: Dylan <2894220@gmail.com> Date: Sat, 12 Oct 2024 16:45:33 +0800 Subject: [PATCH] chore: conan install cmake current list dir Signed-off-by: Dylan <2894220@gmail.com> --- .github/workflows/cmake.yml | 6 +++--- CMakeLists.txt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index abaa00a6..05982fd0 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -33,14 +33,14 @@ jobs: - name: Configure CMake # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type - run: cmake -B ${{env.GITHUB_WORKSPACE}}/build -AWin32 -DCMAKE_BUILD_TYPE=${{env.BUILD_CONFIGURATION}} + run: cmake -Bbuild -AWin32 -DCMAKE_BUILD_TYPE=${{env.BUILD_CONFIGURATION}} - name: Build nim-demo # Build your program with the given configuration - run: cmake --build ${{env.GITHUB_WORKSPACE}}/build --config ${{env.BUILD_CONFIGURATION}} + run: cmake --build build --config ${{env.BUILD_CONFIGURATION}} - name: Build nim-demo installer - run: cmake --build ${{env.GITHUB_WORKSPACE}}/build --config ${{env.BUILD_CONFIGURATION}} --target installer + run: cmake --build build --config ${{env.BUILD_CONFIGURATION}} --target installer # - uses: actions/upload-artifact@v2 # with: diff --git a/CMakeLists.txt b/CMakeLists.txt index 91776b15..998bfa4a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,7 +35,7 @@ endif () include(${CMAKE_CURRENT_LIST_DIR}/.cmake/conan.cmake) conan_add_remote(NAME yunxin URL https://gitlab.com/api/v4/projects/47777150/packages/conan) conan_cmake_autodetect(settings) -conan_cmake_install(PATH_OR_REFERENCE .. BUILD missing SETTINGS ${settings}) +conan_cmake_install(PATH_OR_REFERENCE ${CMAKE_CURRENT_LIST_DIR} BUILD missing SETTINGS ${settings}) include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) conan_basic_setup()