diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6af5353d2..2ccc795e1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -41,7 +41,6 @@ jobs: include: - sys: {os: 'windows', shell: 'pwsh'} cmake_args: >- - -DPKG_CONFIG_EXECUTABLE=C:/vcpkg/installed/x64-windows/tools/pkgconf/pkgconf.exe -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake --install-prefix=$env:GITHUB_WORKSPACE/install - sys: {os: 'windows', shell: 'msys2'} @@ -75,10 +74,6 @@ jobs: sudo apt install libfftw3-dev libusb-1.0-0-dev if: matrix.sys.os == 'ubuntu' - - name: Install dependencies (Windows) - run: vcpkg install --triplet=x64-windows libusb fftw3 pthreads pkgconf - if: matrix.sys.os == 'windows' && matrix.sys.shell != 'msys2' - - name: Setup MSYS (Windows) if: matrix.sys.os == 'windows' && matrix.sys.shell == 'msys2' uses: msys2/setup-msys2@v2 @@ -132,6 +127,15 @@ jobs: cd host/hackrf-tools/build cmake .. -DCMAKE_BUILD_TYPE=Release ${{ matrix.cmake_args }} cmake --build . --config Release + if: matrix.sys.shell != 'pwsh' + + - name: Configure & Build (hackrf-tools, vcpkg) + run: | + cmake -E make_directory host/hackrf-tools/build + cd host/hackrf-tools/build + cmake .. -DCMAKE_BUILD_TYPE=Release ${{ matrix.cmake_args }} -DCMAKE_PREFIX_PATH=$env:GITHUB_WORKSPACE/install + cmake --build . --config Release + if: matrix.sys.shell == 'pwsh' - name: Install (hackrf-tools) run: | diff --git a/host/cmake/modules/FindLIBUSB.cmake b/host/cmake/modules/FindLIBUSB.cmake index c5686e04a..ab9a37072 100644 --- a/host/cmake/modules/FindLIBUSB.cmake +++ b/host/cmake/modules/FindLIBUSB.cmake @@ -34,7 +34,8 @@ else(LIBUSB_INCLUDE_DIR AND LIBUSB_LIBRARIES) endif() find_path(LIBUSB_INCLUDE_DIR libusb.h PATHS ${PC_LIBUSB_INCLUDEDIR} - ${PC_LIBUSB_INCLUDE_DIRS}) + ${PC_LIBUSB_INCLUDE_DIRS} + PATH_SUFFIXES libusb-1.0) find_library( LIBUSB_LIBRARIES diff --git a/host/libhackrf/vcpkg.json b/host/libhackrf/vcpkg.json new file mode 100644 index 000000000..9788c42e1 --- /dev/null +++ b/host/libhackrf/vcpkg.json @@ -0,0 +1,3 @@ +{ + "dependencies": ["libusb", "pthreads"] +} diff --git a/host/vcpkg.json b/host/vcpkg.json new file mode 100644 index 000000000..9b8435d70 --- /dev/null +++ b/host/vcpkg.json @@ -0,0 +1,3 @@ +{ + "dependencies": ["libusb", "fftw3", "pthreads"] +}