Skip to content

Commit

Permalink
macos build
Browse files Browse the repository at this point in the history
  • Loading branch information
dima424658 committed Oct 4, 2022
1 parent 0ccf50d commit 33588f5
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 4 deletions.
26 changes: 26 additions & 0 deletions CMakeModules/FindOgg.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
find_path(Ogg_INCLUDE_DIR
NAMES
ogg/ogg.h
DOC "ogg include directory")
mark_as_advanced(Ogg_INCLUDE_DIR)

find_library(Ogg_LIBRARY
NAMES
ogg
DOC "ogg library")
mark_as_advanced(Ogg_LIBRARY)

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Ogg REQUIRED_VARS Ogg_LIBRARY Ogg_INCLUDE_DIR)

if (Ogg_FOUND)
set(Ogg_LIBRARIES "${Ogg_LIBRARY}")
set(Ogg_INCLUDE_DIRS "${Ogg_INCLUDE_DIR}")

if (NOT TARGET Ogg::ogg)
add_library(Ogg::ogg UNKNOWN IMPORTED)
set_target_properties(Ogg::ogg PROPERTIES
IMPORTED_LOCATION "${Ogg_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${Ogg_INCLUDE_DIR}")
endif ()
endif ()
6 changes: 6 additions & 0 deletions CMakeModules/FindOpenAL.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,15 @@ if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.25")
message(DEPRECATION "CMake >3.25 has built-in OpenAL targert")
endif()

if(APPLE)
set(CMAKE_FIND_USE_CMAKE_SYSTEM_PATH 0)
endif()

find_path(OPENAL_INCLUDE_DIR al.h
HINTS
ENV OPENALDIR
PATHS
/opt/homebrew/opt/openal-soft
~/Library/Frameworks
/Library/Frameworks
/opt
Expand All @@ -91,6 +96,7 @@ find_library(OPENAL_LIBRARY
HINTS
ENV OPENALDIR
PATHS
/opt/homebrew/opt/openal-soft
~/Library/Frameworks
/Library/Frameworks
/opt
Expand Down
8 changes: 4 additions & 4 deletions include/OALWrapper/OAL_Types.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@
#include <list>

// This expects the headers from the OALWrapper source (to keep things consistent and clean)
#include <AL/al.h>
#include <AL/alc.h>
#include <AL/alext.h>
#include <AL/efx.h>
#include <al.h>
#include <alc.h>
#include <alext.h>
#include <efx.h>

typedef enum
{
Expand Down

0 comments on commit 33588f5

Please sign in to comment.