Commit a2815d69 authored by Michael Pyne's avatar Michael Pyne

Assorted CMake and include cleanups/modernizations.

- Remove KDE4Support, it's deprecated and breaks for me with recent
Kdelibs4Support.
- Some QtGui classes were moved to QtWidgets.  Future-proof by just
using the class name directly.
parent 7d5c42bf
project(juk) cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
cmake_minimum_required(VERSION 3.0) project(juk)
find_package(ECM REQUIRED NO_MODULE) find_package(ECM 5.38 REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake) set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
include(CMakePushCheckState) include(CMakePushCheckState)
include(CheckIncludeFileCXX) include(CheckIncludeFileCXX)
include(KDEInstallDirs) include(KDEInstallDirs)
include(KDECompilerSettings NO_POLICY_SCOPE) include(KDECompilerSettings NO_POLICY_SCOPE)
include(KDECMakeSettings) include(KDECMakeSettings NO_POLICY_SCOPE)
include(FeatureSummary) include(FeatureSummary)
include(ECMInstallIcons) include(ECMInstallIcons)
include(ECMAddAppIcon) include(ECMAddAppIcon)
find_package(Qt5 5.2 REQUIRED COMPONENTS Gui Svg Network Test Widgets) find_package(Qt5 5.2 REQUIRED COMPONENTS Gui Svg Network Test Widgets)
find_package(KF5 REQUIRED COMPONENTS CoreAddons Completion I18n IconThemes DocTools TextWidgets XmlGui Wallet WindowSystem KDELibs4Support KDE4Support) find_package(KF5 REQUIRED COMPONENTS CoreAddons Completion GlobalAccel I18n IconThemes DocTools TextWidgets XmlGui Wallet WindowSystem KDELibs4Support)
find_package(Phonon4Qt5 4.6.60 REQUIRED NO_MODULE) find_package(Phonon4Qt5 4.6.60 REQUIRED NO_MODULE)
find_package( Taglib 1.6 ) find_package(Taglib 1.6 REQUIRED)
include_directories( ${PHONON_INCLUDES} ${KDE4_INCLUDES} ${QT_INCLUDES} ) include_directories( ${PHONON_INCLUDES} ${KDE4_INCLUDES} ${QT_INCLUDES} )
...@@ -40,8 +40,6 @@ else(TUNEPIMP_FOUND) ...@@ -40,8 +40,6 @@ else(TUNEPIMP_FOUND)
set(HAVE_TUNEPIMP 0) set(HAVE_TUNEPIMP 0)
endif(TUNEPIMP_FOUND) endif(TUNEPIMP_FOUND)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${KDE4_ENABLE_EXCEPTIONS} ${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS} -fPIC")
########### next target ############### ########### next target ###############
include_directories( ${TAGLIB_INCLUDES} ) include_directories( ${TAGLIB_INCLUDES} )
...@@ -152,11 +150,16 @@ file(GLOB ICONS_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/*-apps-juk.png") ...@@ -152,11 +150,16 @@ file(GLOB ICONS_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/*-apps-juk.png")
ecm_add_app_icon(juk_SRCS ICONS ${ICONS_SRCS}) ecm_add_app_icon(juk_SRCS ICONS ${ICONS_SRCS})
add_executable(juk ${juk_SRCS}) add_executable(juk ${juk_SRCS})
kde_target_enable_exceptions(juk PRIVATE)
if(NOT MSVC AND NOT ( WIN32 AND "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel" ) ) if(NOT MSVC AND NOT ( WIN32 AND "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel" ) )
set( LIBMATH m ) set( LIBMATH m )
endif() endif()
target_link_libraries(juk ${LIBMATH} Qt5::Gui Qt5::Svg Qt5::Widgets Qt5::Network KF5::CoreAddons KF5::Completion KF5::I18n KF5::IconThemes KF5::TextWidgets KF5::XmlGui KF5::WindowSystem KF5::Wallet KF5::KDELibs4Support KF5::KDE4Support ${PHONON_LIBRARY} ${KDE4_KHTML_LIBS} ${TAGLIB_LIBRARIES}) target_link_libraries(juk ${LIBMATH} Qt5::Gui Qt5::Svg Qt5::Widgets
Qt5::Network KF5::CoreAddons KF5::Completion KF5::GlobalAccel
KF5::I18n KF5::IconThemes KF5::TextWidgets KF5::XmlGui KF5::WindowSystem
KF5::Wallet KF5::KDELibs4Support ${PHONON_LIBRARY} ${TAGLIB_LIBRARIES})
if(TUNEPIMP_FOUND) if(TUNEPIMP_FOUND)
target_link_libraries(juk ${TUNEPIMP_LIBRARIES}) target_link_libraries(juk ${TUNEPIMP_LIBRARIES})
endif(TUNEPIMP_FOUND) endif(TUNEPIMP_FOUND)
......
...@@ -17,8 +17,8 @@ ...@@ -17,8 +17,8 @@
#include "directorylist.h" #include "directorylist.h"
#include <QtGui/QCheckBox> #include <QCheckBox>
#include <QtGui/QStringListModel> #include <QStringListModel>
#include <QtCore/QVariant> #include <QtCore/QVariant>
#include <kfiledialog.h> #include <kfiledialog.h>
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
#include <kio/netaccess.h> #include <kio/netaccess.h>
#include <kmimetype.h> #include <kmimetype.h>
#include <QtGui/QWidget> #include <QWidget>
#include <QtCore/QFile> #include <QtCore/QFile>
#include <taglib.h> #include <taglib.h>
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
#include <ktoolbar.h> #include <ktoolbar.h>
#include <QtGui/QFrame> #include <QFrame>
#include <QList> #include <QList>
#include "playlistsearch.h" #include "playlistsearch.h"
......
Markdown is supported
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