diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e0a46a0..46419f2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -180,7 +180,22 @@ jobs: python.exe -m pip install --upgrade pip python.exe -m pip install cryptography - - name: Configure CMake + - name: Configure CMake (macOS) + if: runner.os == 'macOS' + run: | + source venv/bin/activate + cmake \ + -G "${{ matrix.generator }}" \ + -S "${{ github.workspace }}" \ + -B "${{ github.workspace }}/build" \ + -DCMAKE_OSX_ARCHITECTURES=arm64 \ + -DCMAKE_BUILD_TYPE="${{ env.BUILD_TYPE }}" \ + -DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/dist" \ + -DVCPKG_TARGET_TRIPLET="${{ matrix.triplet }}" \ + -DPython3_EXECUTABLE="${{ github.workspace }}/venv/bin/python" + + - name: Configure CMake (non-macOS) + if: runner.os != 'macOS' run: cmake -G "${{matrix.generator}}" -S ${{github.workspace}} diff --git a/cmake/CMakeTest.cmake b/cmake/CMakeTest.cmake index f589ee3..40b3ff9 100644 --- a/cmake/CMakeTest.cmake +++ b/cmake/CMakeTest.cmake @@ -3,7 +3,8 @@ ########## Configure ########## -include(FindPython3) +find_package(Python3 REQUIRED COMPONENTS Interpreter) +message(STATUS "Using Python interpreter at ${Python3_EXECUTABLE}") if(Python3_FOUND) execute_process(