Skip to content

Commit

Permalink
Set OpenAL and sndfile libraries the cmake file
Browse files Browse the repository at this point in the history
  • Loading branch information
LAGonauta committed Nov 19, 2023
1 parent e859c7e commit 632da1a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
cmake_minimum_required(VERSION 3.9)
cmake_minimum_required(VERSION 3.27)

project(MetaAudio)

set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")

set(OPENAL_LIBRARY ${PROJECT_SOURCE_DIR}/OpenAL-SDK/libs/Win32/OpenAL32.lib)
set(OPENAL_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/OpenAL-SDK/include)

set(SNDFILE_LIBRARY ${PROJECT_SOURCE_DIR}/externals/libsndfile/lib/sndfile.lib)
set(SNDFILE_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/externals/libsndfile/include)

# Configure Alure2 the way we need it
option(METAAUDIO_STATIC_ALURE "Link Alure2 statically" ON)
if(METAAUDIO_STATIC_ALURE)
Expand Down
2 changes: 1 addition & 1 deletion build-MetaAudio.bat
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
call cmake -B "build" -A Win32 -D "OPENAL_INCLUDE_DIR=%~dp0OpenAL-SDK\include" -D "OPENAL_LIBRARY=%~dp0OpenAL-SDK\libs\Win32\OpenAL32.lib" -D "SNDFILE_LIBRARY=%~dp0externals\libsndfile\lib\sndfile.lib" -D "SNDFILE_INCLUDE_DIR=%~dp0externals\libsndfile\include"
call cmake -B "build" -A Win32

call powershell -Command "(gc build\MetaAudio.vcxproj) -replace 'Label=\"PropertySheets\">', 'Label=\"PropertySheets\" ><Import Project=\"..\global.props\" /><Import Project=\"..\MetaAudio.props\" />' | Out-File build\MetaAudio.vcxproj"

Expand Down

0 comments on commit 632da1a

Please sign in to comment.