Browse Source

more msvc bits, add cmake mingw CI test

Signed-off-by: falkTX <falktx@falktx.com>
pull/1780/head
falkTX 1 year ago
parent
commit
84c219c629
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
2 changed files with 58 additions and 2 deletions
  1. +50
    -0
      .github/workflows/cmake.yml
  2. +8
    -2
      cmake/CMakeLists.txt

+ 50
- 0
.github/workflows/cmake.yml View File

@@ -25,6 +25,56 @@ jobs:
- name: build
run: cmake --build build -j $(sysctl -n hw.logicalcpu)

mingw32-cross:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Set up dependencies
run: |
sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
sudo dpkg --add-architecture i386
sudo apt-get update -qq
sudo apt-get install -yqq --allow-downgrades cmake libc6:i386 libgcc-s1:i386 libstdc++6:i386 binutils-mingw-w64-i686 g++-mingw-w64-i686 mingw-w64 wine-stable:i386
- name: configure
env:
PKG_CONFIG: false
run: cmake -S cmake -B build \
-DCMAKE_CROSSCOMPILING=ON \
-DCMAKE_CROSSCOMPILING_EMULATOR=wine \
-DCMAKE_SYSTEM_NAME=Windows \
-DCMAKE_SYSTEM_PROCESSOR=i686 \
-DCMAKE_C_COMPILER=i686-w64-mingw32-gcc \
-DCMAKE_CXX_COMPILER=i686-w64-mingw32-g++ \
-DCMAKE_AR=$(which i686-w64-mingw32-ar) \
-DCMAKE_RANLIB=$(which i686-w64-mingw32-ranlib)
- name: build
run: cmake --build build -j $(nproc)

mingw64-cross:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Set up dependencies
run: |
sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
sudo dpkg --add-architecture i386
sudo apt-get update -qq
sudo apt-get install -yqq --allow-downgrades cmake libc6:i386 libgcc-s1:i386 libstdc++6:i386 binutils-mingw-w64-x86-64 g++-mingw-w64-x86-64 mingw-w64 wine-stable
- name: configure
env:
PKG_CONFIG: false
run: cmake -S cmake -B build \
-DCMAKE_CROSSCOMPILING=ON \
-DCMAKE_CROSSCOMPILING_EMULATOR=wine \
-DCMAKE_SYSTEM_NAME=Windows \
-DCMAKE_SYSTEM_PROCESSOR=x86_64 \
-DCMAKE_C_COMPILER=x86_64-w64-mingw32-gcc \
-DCMAKE_CXX_COMPILER=x86_64-w64-mingw32-g++ \
-DCMAKE_AR=$(which x86_64-w64-mingw32-ar) \
-DCMAKE_RANLIB=$(which x86_64-w64-mingw32-ranlib)
- name: build
run: cmake --build build -j $(nproc)

ubuntu-20_04:
runs-on: ubuntu-20.04
steps:


+ 8
- 2
cmake/CMakeLists.txt View File

@@ -46,7 +46,7 @@ endif()
#######################################################################################################################
# optional dependencies

find_package(PkgConfig)
find_package(PkgConfig QUIET)

# homebrew does not support universal binaries, disable external deps if it is in use
if(APPLE)
@@ -396,6 +396,11 @@ target_include_directories(carla-native-plugins
../source/utils
)

target_link_libraries(carla-native-plugins
PRIVATE
${CARLA_PTHREADS}
)

target_sources(carla-native-plugins
PRIVATE
../source/native-plugins/_all.c
@@ -466,6 +471,7 @@ target_include_directories(carla-sfzero
target_link_libraries(carla-sfzero
PRIVATE
carla-audio-decoder
${CARLA_PTHREADS}
)

target_sources(carla-sfzero
@@ -632,7 +638,7 @@ add_library(carla::zita-resampler ALIAS carla-zita-resampler)

set_common_target_properties(carla-zita-resampler)

target_compile_definitions(carla-native-plugins
target_compile_definitions(carla-zita-resampler
PRIVATE
$<$<BOOL:${MSVC}>:_USE_MATH_DEFINES>
)


Loading…
Cancel
Save