Skip to content

Commit

Permalink
Try to fix linux
Browse files Browse the repository at this point in the history
  • Loading branch information
Dextinfire committed Sep 8, 2024
1 parent b554fae commit 0a2c29b
Show file tree
Hide file tree
Showing 5 changed files with 95 additions and 71 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ jobs:
if: matrix.os =='macos-latest' || matrix.os == 'ubuntu-latest'
run: |-
pushd vendor
git clone https://github.com/Thealexbarney/LibAtrac9.git --depth 1
if [ ! -d "LibAtrac9" ]; then
git clone https://github.com/Thealexbarney/LibAtrac9.git --depth 1
fi
cd LibAtrac9/C
if [ "${{ matrix.os_name }}" == 'macos' ]; then
sed -i '' -e 's/,--version-script=libatrac9.version//g' Makefile
Expand All @@ -78,7 +80,7 @@ jobs:
popd
echo "LIBATRAC9DIR=vendor/LibAtrac9" >> $GITHUB_ENV
- name: Install Dependencies Linux
run: sudo apt-get install nasm libx11-dev libxft-dev libxext-dev libwayland-dev libxkbcommon-dev libegl1-mesa-dev libibus-1.0-dev libxrandr-dev libvorbis-dev libogg-dev
run: sudo apt-get install nasm libx11-dev libxft-dev libxext-dev libwayland-dev libxkbcommon-dev libegl1-mesa-dev libibus-1.0-dev libxrandr-dev
if: matrix.os_name == 'linux'
- name: Install Dependencies Mac
run: brew install nasm
Expand Down Expand Up @@ -162,7 +164,7 @@ jobs:
needs:
- job-matrix

if: ${{needs.*.result}} == "failure" || ${{needs.*.result}} == "cancelled"
if: always() && contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')
steps:
- uses: actions/checkout@v2
- name: 'Get Jobs Status'
Expand Down
9 changes: 6 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -774,10 +774,12 @@ if (EMSCRIPTEN)
else ()
find_package(SDL2 REQUIRED)
find_package(ZLIB REQUIRED)
find_package(OggVorbis REQUIRED)
find_package(Ogg REQUIRED)
find_package(Vorbis REQUIRED)
find_package(WebP REQUIRED)

include_directories(${OGGVORBIS_INCLUDE_DIRS})
include_directories(${OGG_INCLUDE_DIR})
include_directories(${VORBIS_INCLUDE_DIRS})

if (NX)
list(APPEND Impacto_Libs
Expand Down Expand Up @@ -807,7 +809,8 @@ else ()
list(APPEND Impacto_Libs
${SDL2_LIBRARIES}
ZLIB::ZLIB
${OGGVORBIS_LIBRARIES}
${OGG_LIBRARY}
${VORBIS_LIBRARIES}
${WebP_LIBRARIES}
)

Expand Down
35 changes: 35 additions & 0 deletions modules/FindOgg.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
set(_LIBOGG_SEARCH
PATHS
~/Library/Frameworks
/Library/Frameworks
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt
/usr
/usr/local
)

foreach(search ${_LIBOGG_SEARCH})

find_path(OGG_INCLUDE_DIR ogg/ogg.h
HINTS
ENV OGGDIR
PATH_SUFFIXES include
)

find_library(OGG_LIBRARY
NAMES ogg
HINTS
ENV OGGDIR
PATH_SUFFIXES libx32 lib64 lib libs64 libs
)

endforeach()

unset(_LIBOGG_SEARCH)

include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Ogg DEFAULT_MSG OGG_LIBRARY OGG_INCLUDE_DIR)

mark_as_advanced(OGG_LIBRARY OGG_INCLUDE_DIR)
65 changes: 0 additions & 65 deletions modules/FindOggVorbis.cmake

This file was deleted.

49 changes: 49 additions & 0 deletions modules/FindVorbis.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@

set(_LIBVORBIS_SEARCH
PATHS
~/Library/Frameworks
/Library/Frameworks
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt
/usr
/usr/local
)

foreach(search ${_LIBVORBIS_SEARCH})

find_path(VORBIS_INCLUDE_DIR vorbis/vorbisfile.h
HINTS
ENV VORBISDIR
PATH_SUFFIXES include

)

find_library(VORBIS_LIBRARY
NAMES vorbis
HINTS
ENV VORBISDIR
PATH_SUFFIXES libx32 lib64 lib libs64 libs
)

find_library(VORBISFILE_LIBRARY
NAMES vorbisfile Vorbis::vorbisFile
HINTS
ENV VORBISDIR
PATH_SUFFIXES libx32 lib64 lib libs64 libs
)

endforeach()

unset(_LIBVORBIS_SEARCH)

set(VORBIS_LIBRARIES
${VORBIS_LIBRARY}
${VORBISFILE_LIBRARY}
)

include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Vorbis DEFAULT_MSG VORBIS_LIBRARIES VORBIS_INCLUDE_DIR)

mark_as_advanced(VORBIS_LIBRARIES VORBIS_INCLUDE_DIR)

0 comments on commit 0a2c29b

Please sign in to comment.