diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 69c53bf..ae654fc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,13 +7,6 @@ jobs: strategy: fail-fast: false matrix: - name: [ - linux-cmake, - linux-autotools, - macos-cmake, - macos-autotools, - windows-cmake - ] include: - name: linux-cmake os: ubuntu-latest @@ -38,6 +31,11 @@ jobs: build-system: cmake configure-options: -DCMAKE_TOOLCHAIN_FILE=c:/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows + - name: windows-cmake-shared + os: windows-latest + build-system: cmake + configure-options: -DCMAKE_TOOLCHAIN_FILE=c:/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows -DBUILD_SHARED_LIBS=ON + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v2 diff --git a/CMakeLists.txt b/CMakeLists.txt index f5431da..cad37b8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -113,6 +113,12 @@ if(LIBSAMPLERATE_EXAMPLES OR BUILD_TESTING) endif() set(HAVE_SNDFILE ${SndFile_FOUND}) + + # Windows DLLs need to be in the same folder as the executable to be found + if(WIN32 AND NOT DEFINED CMAKE_RUNTIME_OUTPUT_DIRECTORY) + set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}) + endif() + endif() # SampleRate library