ladybird/Userland/Libraries/LibAudio/CMakeLists.txt
Filiph Siitam Sandström fd694e8672 AK+Lagom: Make it possible to build for iOS
This commit makes it possible to build AK and most of Lagom for iOS,
based on the work for the Ladybird build demoed on discord:
https://discord.com/channels/830522505605283862/830525031720943627/1211987732646068314
2024-03-03 13:13:42 -07:00

51 lines
1.3 KiB
CMake

set(SOURCES
GenericTypes.cpp
SampleFormats.cpp
Loader.cpp
WavLoader.cpp
FlacLoader.cpp
FlacWriter.cpp
WavWriter.cpp
Metadata.cpp
MP3Loader.cpp
PlaybackStream.cpp
QOALoader.cpp
QOATypes.cpp
UserSampleQueue.cpp
VorbisComment.cpp
)
if (SERENITYOS)
list(APPEND SOURCES ConnectionToServer.cpp)
list(APPEND SOURCES ConnectionToManagerServer.cpp)
list(APPEND SOURCES PlaybackStreamSerenity.cpp)
set(GENERATED_SOURCES
../../Services/AudioServer/AudioClientEndpoint.h
../../Services/AudioServer/AudioServerEndpoint.h
../../Services/AudioServer/AudioManagerClientEndpoint.h
../../Services/AudioServer/AudioManagerServerEndpoint.h
)
endif()
if (HAVE_PULSEAUDIO)
list(APPEND SOURCES
PlaybackStreamPulseAudio.cpp
PulseAudioWrappers.cpp
)
endif()
serenity_lib(LibAudio audio)
target_link_libraries(LibAudio PRIVATE LibCore LibRIFF LibIPC LibThreading LibUnicode LibCrypto)
if (HAVE_PULSEAUDIO)
target_link_libraries(LibAudio PRIVATE pulse)
target_compile_definitions(LibAudio PRIVATE HAVE_PULSEAUDIO=1)
endif()
if (APPLE AND NOT IOS)
target_sources(LibAudio PRIVATE PlaybackStreamAudioUnit.cpp)
find_library(AUDIO_UNIT AudioUnit REQUIRED)
target_link_libraries(LibAudio PRIVATE ${AUDIO_UNIT})
endif()