Commit 619b57c5 authored by Jeremy Whiting's avatar Jeremy Whiting
Browse files

Initial port to Qt5/KF5 and Phonon4Qt5

parent 46f8c6a3
project(libkcompactdisc)
cmake_minimum_required(VERSION 2.8.12)
find_package(KDE4 REQUIRED)
include(KDE4Defaults)
include(MacroLibrary)
project(libkcompactdisc)
add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
include(FeatureSummary)
find_package(Qt5 REQUIRED COMPONENTS Core Qml Quick OpenGL)
find_package(ECM 1.7.0 NO_MODULE REQUIRED)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})
include(ECMAddAppIcon)
include(KDEInstallDirs)
include(KDECMakeSettings)
include(KDECompilerSettings)
include(ECMInstallIcons)
include(ECMAddAppIcon)
find_package(KF5 REQUIRED COMPONENTS
I18n
Crash
CoreAddons
DocTools
KIO
Solid
KDELibs4Support
)
find_package(Phonon4Qt5 CONFIG REQUIRED)
include_directories (${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} )
## Compiler flags
if(CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_C_FLAGS "-std=c99") ## ALSA no longer compiles with -std=c90, see https://bugzilla.novell.com/show_bug.cgi?id=817077
endif()
find_package(Alsa)
alsa_configure_file(${CMAKE_CURRENT_BINARY_DIR}/config-alsa.h)
include_directories(${KDE4_INCLUDES})
include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
......@@ -61,13 +82,16 @@ if (USE_WMLIB)
add_definitions(-DUSE_WMLIB=1)
endif (USE_WMLIB)
kde4_add_library(kcompactdisc SHARED ${kcompactdisc_LIB_SRCS})
add_library(kcompactdisc SHARED ${kcompactdisc_LIB_SRCS})
target_link_libraries(kcompactdisc ${KDE4_KDECORE_LIBS} ${KDE4_PHONON_LIBS} ${KDE4_SOLID_LIBS})
target_link_libraries(kcompactdisc
KF5::KDELibs4Support
Phonon::phonon4qt5 )
if (HAVE_LIBASOUND2)
target_link_libraries(kcompactdisc ${ASOUND_LIBRARY})
endif (HAVE_LIBASOUND2)
if (USE_WMLIB)
find_package(Threads)
target_link_libraries(kcompactdisc ${CMAKE_THREAD_LIBS_INIT})
endif (USE_WMLIB)
......
......@@ -26,11 +26,11 @@
#include <kdebug.h>
#include <klocale.h>
#include <Phonon/Global>
#include <Phonon/MediaObject>
#include <Phonon/AudioOutput>
#include <Phonon/Path>
#include <Phonon/MediaController>
#include <phonon/Global>
#include <phonon/MediaObject>
#include <phonon/AudioOutput>
#include <phonon/Path>
#include <phonon/MediaController>
#include <solid/device.h>
#include <solid/opticaldrive.h>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment