Actions: Fix macOS build
This commit is contained in:
7
.github/workflows/cmake.yml
vendored
7
.github/workflows/cmake.yml
vendored
@@ -275,11 +275,12 @@ jobs:
|
|||||||
run: brew install freetype sdl2 libpng rtmidi qt@5 openal-soft ninja
|
run: brew install freetype sdl2 libpng rtmidi qt@5 openal-soft ninja
|
||||||
- name: Configure CMake
|
- name: Configure CMake
|
||||||
run: >-
|
run: >-
|
||||||
PATH=/usr/local/opt/qt@5/bin:$PATH
|
|
||||||
cmake -G Ninja -S . -B build --preset ${{ matrix.build.preset }}
|
cmake -G Ninja -S . -B build --preset ${{ matrix.build.preset }}
|
||||||
--toolchain cmake/flags-gcc-x86_64.cmake
|
--toolchain cmake/flags-gcc-x86_64.cmake --debug-find
|
||||||
-D NEW_DYNAREC=${{ matrix.build.new-dynarec }}
|
-D NEW_DYNAREC=${{ matrix.build.new-dynarec }}
|
||||||
-D CMAKE_FIND_ROOT_PATH=/usr/local/opt/qt@5
|
-D Qt5_ROOT=$(brew --prefix qt@5)
|
||||||
|
-D Qt5LinguistTools_ROOT=$(brew --prefix qt@5)
|
||||||
|
-D OpenAL_ROOT=$(brew --prefix openal-soft)
|
||||||
- name: Build
|
- name: Build
|
||||||
run: cmake --build build
|
run: cmake --build build
|
||||||
- name: Generate package
|
- name: Generate package
|
||||||
|
@@ -31,10 +31,11 @@ if(OPENAL)
|
|||||||
if(TARGET OpenAL::OpenAL)
|
if(TARGET OpenAL::OpenAL)
|
||||||
target_link_libraries(86Box OpenAL::OpenAL)
|
target_link_libraries(86Box OpenAL::OpenAL)
|
||||||
else()
|
else()
|
||||||
include_directories(${OPENAL_INCLUDE_DIR})
|
|
||||||
target_link_libraries(86Box ${OPENAL_LIBRARY})
|
target_link_libraries(86Box ${OPENAL_LIBRARY})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
include_directories(${OPENAL_INCLUDE_DIR})
|
||||||
|
|
||||||
target_sources(snd PRIVATE openal.c)
|
target_sources(snd PRIVATE openal.c)
|
||||||
else()
|
else()
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
@@ -49,16 +50,16 @@ else()
|
|||||||
# Use FAudio, a reimplementation of XAudio2
|
# Use FAudio, a reimplementation of XAudio2
|
||||||
pkg_check_modules(FAUDIO IMPORTED_TARGET FAudio)
|
pkg_check_modules(FAUDIO IMPORTED_TARGET FAudio)
|
||||||
if(FAUDIO_FOUND)
|
if(FAUDIO_FOUND)
|
||||||
include_directories(${FAUDIO_INCLUDE_DIRS})
|
|
||||||
target_link_libraries(86Box PkgConfig::FAUDIO)
|
target_link_libraries(86Box PkgConfig::FAUDIO)
|
||||||
else()
|
else()
|
||||||
find_path(FAUDIO_INCLUDE_DIR NAMES "FAudio.h")
|
find_path(FAUDIO_INCLUDE_DIR NAMES "FAudio.h")
|
||||||
find_library(FAUDIO_LIBRARY FAudio)
|
find_library(FAUDIO_LIBRARY FAudio)
|
||||||
|
|
||||||
include_directories(${FAUDIO_INCLUDE_DIR})
|
|
||||||
target_link_libraries(86Box ${FAUDIO_LIBRARY})
|
target_link_libraries(86Box ${FAUDIO_LIBRARY})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
include_directories(${FAUDIO_INCLUDE_DIRS})
|
||||||
|
|
||||||
set_property(SOURCE xaudio2.c PROPERTY COMPILE_DEFINITIONS USE_FAUDIO)
|
set_property(SOURCE xaudio2.c PROPERTY COMPILE_DEFINITIONS USE_FAUDIO)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
Reference in New Issue
Block a user