Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 21 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1867,11 +1867,29 @@ if(LILV)
endif()

# Live Broadcasting (Shoutcast)
find_package(Shout)
cmake_dependent_option(BROADCAST "Live Broadcasting (Shoutcast) support" ON "Shout_FOUND" OFF)
option(BROADCAST "Live Broadcasting (Shoutcast) support" ON)
if(BROADCAST)
if(NOT Shout_FOUND)
find_package(Shout)
if(UNIX AND NOT APPLE)
# Check if system lib is at least 2.4.4 and not suffering bug
# https://bugs.launchpad.net/mixxx/+bug/1833225
if(Shout_FOUND AND Shout_VERSION VERSION_LESS 2.4.4)
message(STATUS "Installed libshout version is suffering from bug lp1833225")
endif()
if(NOT Shout_FOUND OR Shout_VERSION VERSION_LESS 2.4.4)
# Fall back to internal libraray in the lib tree
message(STATUS "Using internal libshout")
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/lib/libshout")
target_include_directories(mixxx-lib PUBLIC lib/libshout/include)
target_link_libraries(mixxx-lib PUBLIC shout_mixxx)
else()
target_link_libraries(mixxx-lib PUBLIC Shout::Shout)
endif()
else()
if(NOT Shout_FOUND)
message(FATAL_ERROR "Live Broadcasting support requires the libshout and its development headers.")
endif()
target_link_libraries(mixxx-lib PUBLIC Shout::Shout)
Comment thread
Holzhaus marked this conversation as resolved.
endif()
target_sources(mixxx-lib PRIVATE
src/preferences/dialog/dlgprefbroadcastdlg.ui
Expand All @@ -1880,7 +1898,6 @@ if(BROADCAST)
src/engine/sidechain/shoutconnection.cpp
)
target_compile_definitions(mixxx-lib PUBLIC __BROADCAST__)
target_link_libraries(mixxx-lib PUBLIC Shout::Shout)
endif()

# Locale Aware Compare for SQLite
Expand Down
40 changes: 40 additions & 0 deletions lib/libshout/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
cmake_minimum_required(VERSION 3.0)
project(shout_mixxx C)

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DHAVE_CONFIG_H -Wall -ffast-math -pthread -g -O2")

include_directories(
.
src
include
src/common
)

add_library(shout_mixxx STATIC
src/common/avl/avl.c
src/common/net/sock.c
src/common/net/resolver.c
src/common/timing/timing.c
src/common/httpp/httpp.c
src/common/httpp/encoding.c
src/common/thread/thread.c
src/shout.c
src/util.c
src/queue.c
src/proto_http.c
src/proto_xaudiocast.c
src/proto_icy.c
src/proto_roaraudio.c
src/format_ogg.c
src/format_webm.c
src/format_mp3.c
src/codec_vorbis.c
src/codec_opus.c
src/codec_theora.c
src/codec_speex.c
src/tls.c
)

target_link_libraries(shout_mixxx ogg vorbis theora speex ssl crypto)