From 014bb76a3254917b765034d0c8392444099c77b8 Mon Sep 17 00:00:00 2001 From: ADM228 <91823517+ADM228@users.noreply.github.com> Date: Wed, 24 Jul 2024 23:02:49 +0300 Subject: [PATCH] Attempt to not make it shit itself on wankdows --- .github/workflows/examples.yml | 12 ++++++------ emu/CMakeLists.txt | 6 +++++- emu/t85apu.c | 1 - 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml index 18d4cad..cf76108 100644 --- a/.github/workflows/examples.yml +++ b/.github/workflows/examples.yml @@ -11,11 +11,11 @@ jobs: fail-fast: false matrix: platform: - - { name: Windows VS2019, os: windows-2019 } - - { name: Windows VS2022, os: windows-2022 } - - { name: Linux GCC, os: ubuntu-latest } - - { name: Linux Clang, os: ubuntu-latest, flags: -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ } - - { name: MacOS XCode, os: macos-latest } + - { path: build/examples, name: Windows VS2019, os: windows-2019 } + - { path: build/examples, name: Windows VS2022, os: windows-2022 } + - { path: build, name: Linux GCC, os: ubuntu-latest } + - { path: build, name: Linux Clang, os: ubuntu-latest, flags: -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ } + - { path: build, name: MacOS XCode, os: macos-latest } example: - { name: C, target: example_c } - { name: C++, target: example_cpp } @@ -30,4 +30,4 @@ jobs: - name: Build shell: bash - run: cmake --build build --target ${{ matrix.example.target }} --config Release \ No newline at end of file + run: cmake --build ${{ matrix.platform.path }} --target ${{ matrix.example.target }} --config Release \ No newline at end of file diff --git a/emu/CMakeLists.txt b/emu/CMakeLists.txt index 6e02ea5..7aa01a2 100644 --- a/emu/CMakeLists.txt +++ b/emu/CMakeLists.txt @@ -10,4 +10,8 @@ target_compile_features(t85apu_emu PRIVATE c_std_99) if (T85APU_REGWRITE_BUFFER_SIZE) target_compile_definitions(t85apu_emu PUBLIC T85APU_REGWRITE_BUFFER_SIZE=${T85APU_REGWRITE_BUFFER_SIZE}) endif() -target_link_libraries(t85apu_emu PRIVATE m) \ No newline at end of file + +find_library(MATH_LIBRARY m) +if(MATH_LIBRARY) + target_link_libraries(t85apu_emu PRIVATE ${MATH_LIBRARY}) +endif() \ No newline at end of file diff --git a/emu/t85apu.c b/emu/t85apu.c index 714bfb4..affed80 100644 --- a/emu/t85apu.c +++ b/emu/t85apu.c @@ -8,7 +8,6 @@ Written by alexmush #include "t85apu.h" #include #include -#include #include #include #include