Skip to content

Commit

Permalink
Fixed compilation on Ubuntu 20.04
Browse files Browse the repository at this point in the history
  • Loading branch information
corporateshark committed May 23, 2023
1 parent f92e54b commit f2eca25
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 13 deletions.
21 changes: 8 additions & 13 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,14 @@ if(MSVC)
libopus
libopusfile
)
set_property(TARGET libogg PROPERTY FOLDER ThirdParty)
set_property(TARGET libvorbis PROPERTY FOLDER ThirdParty)
set_property(TARGET libmodplug PROPERTY FOLDER ThirdParty)
set_property(TARGET libflac PROPERTY FOLDER ThirdParty)
set_property(TARGET id3v2 PROPERTY FOLDER ThirdParty)
set_property(TARGET monkeyaudio PROPERTY FOLDER ThirdParty)
set_property(TARGET libopus PROPERTY FOLDER ThirdParty)
set_property(TARGET libopusfile PROPERTY FOLDER ThirdParty)
elseif(APPLE)
add_subdirectory(libs/libogg-1.3.2 EXCLUDE_FROM_ALL)
add_subdirectory(libs/libvorbis-1.3.5 EXCLUDE_FROM_ALL)
Expand All @@ -109,18 +117,14 @@ elseif(APPLE)
find_package(OpenAL REQUIRED)
target_link_libraries(portamp "${OPENAL_LIBRARY}")
else()
add_subdirectory(libs/id3v2lib EXCLUDE_FROM_ALL)
add_subdirectory(libs/monkey-audio EXCLUDE_FROM_ALL)
add_subdirectory(libs/libopus EXCLUDE_FROM_ALL)
add_subdirectory(libs/libopusfile EXCLUDE_FROM_ALL)
set(CMAKE_CXX_FLAGS "-std=c++11")
target_link_libraries(portamp
ogg
vorbis
vorbisfile
modplug
FLAC
id3v2
monkeyaudio
opus
opusfile
Expand All @@ -130,12 +134,3 @@ else()
)
include_directories(/usr/local/include)
endif()

set_property(TARGET libogg PROPERTY FOLDER ThirdParty)
set_property(TARGET libvorbis PROPERTY FOLDER ThirdParty)
set_property(TARGET libmodplug PROPERTY FOLDER ThirdParty)
set_property(TARGET libflac PROPERTY FOLDER ThirdParty)
set_property(TARGET id3v2 PROPERTY FOLDER ThirdParty)
set_property(TARGET monkeyaudio PROPERTY FOLDER ThirdParty)
set_property(TARGET libopus PROPERTY FOLDER ThirdParty)
set_property(TARGET libopusfile PROPERTY FOLDER ThirdParty)
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ UNIX build instructions:
------------------------

```
sudo apt-get install libopus-dev libopusfile-dev libflac-dev
mkdir build
cd build
cmake .. -G "Unix Makefiles"
Expand Down
2 changes: 2 additions & 0 deletions src/Encoders/WAV/WAVDataEncoder.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#include "WAVDataEncoder.h"

#include <string.h>

static void PatchValue( uint8_t* Ptr, uint64_t Value, size_t Size )
{
for ( ; Size; --Size, Value >>= 8 )
Expand Down
3 changes: 3 additions & 0 deletions src/Encoders/WAV/WAVDataEncoder.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#pragma once

#include <stddef.h>
#include <stdint.h>

#include "Encoders/iWaveDataEncoder.h"

class clWAVDataEncoder: public iWaveDataEncoder
Expand Down

0 comments on commit f2eca25

Please sign in to comment.