Skip to content

Commit

Permalink
Merge pull request tomahawk-player#266 from tomahawk-player/libvlc
Browse files Browse the repository at this point in the history
Replace Phonon with libvlc directly
  • Loading branch information
muesli committed Oct 22, 2014
2 parents 2aafa41 + 193df07 commit 108f8d0
Show file tree
Hide file tree
Showing 13 changed files with 1,037 additions and 286 deletions.
14 changes: 4 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,9 @@ endif()
macro_log_feature(LIBSNORE_FOUND "Libsnore" "Library for notifications" "https://github.com/TheOneRing/Snorenotify" FALSE "" "")
endif()

find_package(LIBVLC REQUIRED 2.1.0)
macro_log_feature(LIBVLC_FOUND "LibVLC" "Provides audio output" TRUE "" "")

set(QXTWEB_FOUND TRUE)
set(QXTWEB_LIBRARIES qxtweb-standalone)
set(QXTWEB_INCLUDE_DIRS ${THIRDPARTY_DIR}/qxt/qxtweb-standalone/web ${THIRDPARTY_DIR}/qxt/qxtweb-standalone/network ${THIRDPARTY_DIR}/qxt/qxtweb-standalone/core ${CMAKE_CURRENT_BINARY_DIR})
Expand Down Expand Up @@ -377,16 +380,7 @@ if (WITH_KDE4)
endif(WITH_KDE4)
macro_log_feature(KDE4_FOUND "KDE4" "Provides support for configuring Telepathy Accounts from inside Tomahawk" "https://www.kde.org" FALSE "" "")

if(NOT Phonon_FOUND)
macro_optional_find_package(Phonon 4.5.0)
endif()
macro_log_feature(Phonon_FOUND "Phonon" "The Phonon multimedia library" "http://phonon.kde.org" TRUE "" "")

if(Phonon_FOUND)
message(STATUS "Phonon found; ensure that phonon-vlc is at least 0.4")
endif()

IF( KDE4_FOUND OR Phonon_FOUND )
IF( KDE4_FOUND )
IF( CMAKE_C_FLAGS )
# KDE4 adds and removes some compiler flags that we don't like
# (only for gcc not for clang e.g.)
Expand Down
30 changes: 30 additions & 0 deletions CMakeModules/FindLIBVLC.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
find_package(PkgConfig QUIET)
pkg_check_modules(PC_LIBVLC QUIET libvlc)
set(LIBVLC_DEFINITIONS ${PC_LIBVLC_CFLAGS_OTHER})

find_path(LIBVLC_INCLUDE_DIR vlc/vlc.h
HINTS
${PC_LIBVLC_INCLUDEDIR}
${PC_LIBVLC_INCLUDE_DIRS}
)

find_library(LIBVLC_LIBRARY NAMES vlc libvlc
HINTS
${PC_LIBVLC_LIBDIR}
${PC_LIBVLC_LIBRARY_DIRS}
)

find_library(LIBVLCCORE_LIBRARY NAMES vlccore libvlccore
HINTS
${PC_LIBVLC_LIBDIR}
${PC_LIBVLC_LIBRARY_DIRS}
)

set(LIBVLC_VERSION ${PC_LIBVLC_VERSION})

find_package_handle_standard_args(LibVLC
REQUIRED_VARS LIBVLC_LIBRARY LIBVLCCORE_LIBRARY LIBVLC_INCLUDE_DIR
VERSION_VAR LIBVLC_VERSION
)


24 changes: 0 additions & 24 deletions CMakeModules/FindPhonon.cmake

This file was deleted.

7 changes: 5 additions & 2 deletions src/libtomahawk/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ list(APPEND libSources
accounts/spotify/SpotifyInfoPlugin.cpp

audio/AudioEngine.cpp
audio/AudioOutput.cpp

collection/Collection.cpp
collection/ArtistsRequest.cpp
Expand Down Expand Up @@ -353,6 +354,7 @@ list(APPEND libSources
utils/WeakObjectHash.cpp
utils/WeakObjectList.cpp
utils/PluginLoader.cpp
utils/MediaStream.cpp
)

add_subdirectory( accounts/configstorage )
Expand Down Expand Up @@ -389,7 +391,7 @@ include_directories(
${QJSON_INCLUDE_DIR}
${ECHONEST_INCLUDE_DIR}
${LUCENEPP_INCLUDE_DIRS}
${PHONON_INCLUDES}
${LIBVLC_INCLUDE_DIR}
${Boost_INCLUDE_DIR}

${LIBPORTFWD_INCLUDE_DIR}
Expand Down Expand Up @@ -501,7 +503,8 @@ ENDIF( UNIX AND NOT APPLE )

TARGET_LINK_LIBRARIES( tomahawklib
LINK_PRIVATE
${PHONON_LIBRARY}
${LIBVLC_LIBRARY}
${LIBVLCCORE_LIBRARY}

# Thirdparty shipped with tomahawk
${LIBPORTFWD_LIBRARIES}
Expand Down
Loading

0 comments on commit 108f8d0

Please sign in to comment.