Commit f9ec5425 authored by Ömer Fadıl Usta's avatar Ömer Fadıl Usta 😊
Browse files

Increase Cmake deps , fix boost problems and initial steps for cpp17 support

Cmake to 3.16
Qt to 5.15.0
KF to 5.82
Boost to 1.71.0
Initial steps for cpp17 support
Fix boost include
Fix boost placeholder
parent 2c6e05e4
cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
cmake_minimum_required(VERSION 3.16 FATAL_ERROR)
# KDE Application Version, managed by release script
set (RELEASE_SERVICE_VERSION_MAJOR "21")
......@@ -12,9 +12,10 @@ add_definitions(-D'VERSION="${RELEASE_SERVICE_VERSION}"'
-D'VERSION_MINOR=${RELEASE_SERVICE_VERSION_MINOR}'
-D'VERSION_MICRO=${RELEASE_SERVICE_VERSION_MICRO}')
set (QT_MIN_VERSION "5.14")
set (KF5_MIN_VERSION "5.72")
set (QT_MIN_VERSION "5.15.0")
set (KF5_MIN_VERSION "5.82")
set (LIBKTORRENT_MIN_VERSION "20.11.70")
set (Boost_MIN_VERSION "1.71.0")
find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${CMAKE_MODULE_PATH})
......@@ -29,11 +30,9 @@ include(ECMAddAppIcon)
include(ECMMarkAsTest)
include(ECMMarkNonGuiExecutable)
include(KDEClangFormat)
if(ECM_VERSION VERSION_GREATER_EQUAL 5.79)
include(KDEGitCommitHooks)
endif()
include(KDEGitCommitHooks)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED
......@@ -66,7 +65,7 @@ find_package(KF5 ${KF5_MIN_VERSION} REQUIRED
)
find_package(KF5Torrent ${LIBKTORRENT_MIN_VERSION} CONFIG REQUIRED)
find_package(Boost REQUIRED)
find_package(Boost ${Boost_MIN_VERSION} REQUIRED)
find_package(KF5TextWidgets ${KF5_MIN_VERSION})
set_package_properties(KF5TextWidgets
......@@ -168,23 +167,27 @@ if(LibKWorkspace_FOUND)
set(HAVE_LibKWorkspace 1)
endif()
find_package(Taglib)
if(TAGLIB_FOUND)
set(HAVE_Taglib 1)
endif()
#find_package(Qt5 ${QT_MIN_VERSION} OPTIONAL_COMPONENTS Multimedia MultimediaWidgets)
find_package(Phonon4Qt5)
find_package(Taglib)
set_package_properties(Taglib
PROPERTIES
TYPE OPTIONAL
PURPOSE "Required for KTorrent's multimedia plugin"
)
if(TAGLIB_FOUND)
set(HAVE_Taglib 1)
endif()
find_package(Phonon4Qt5)
set_package_properties(Phonon4Qt5
PROPERTIES
TYPE OPTIONAL
PURPOSE "Required for KTorrent's multimedia plugin"
)
#
# checks for functions and stuff
#
......@@ -211,9 +214,7 @@ add_definitions(
set (KTORRENT_DBUS_XML_DIR ${CMAKE_SOURCE_DIR}/dbus_xml)
set (KTORRENT_PLUGIN_INSTALL_DIR ${PLUGIN_INSTALL_DIR}/ktorrent)
include_directories(
${Boost_INCLUDE_DIR}
)
include_directories(Boost::boost)
add_subdirectory(libktcore)
add_subdirectory(plugins)
......@@ -227,8 +228,7 @@ endif()
file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES *.cpp *.h)
kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES})
kde_configure_git_pre_commit_hook(CHECKS CLANG_FORMAT)
if(ECM_VERSION VERSION_GREATER_EQUAL 5.79)
kde_configure_git_pre_commit_hook(CHECKS CLANG_FORMAT)
endif()
kde_configure_git_pre_commit_hook(CHECKS CLANG_FORMAT)
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
......@@ -23,6 +23,7 @@ kcoreaddons_desktop_to_json(ktorrent_bwscheduler ktorrent_bwscheduler.desktop)
target_link_libraries(
ktorrent_bwscheduler
ktcore
Boost::boost
KF5::Torrent
KF5::CoreAddons
KF5::I18n
......
......@@ -10,7 +10,7 @@
#include "schedule.h"
#include "weekscene.h"
#include <boost/bind.hpp>
#include <boost/bind/bind.hpp>
#include <util/log.h>
using namespace bt;
......@@ -62,7 +62,7 @@ void WeekView::setSchedule(Schedule *s)
schedule = s;
if (schedule)
s->apply(boost::bind(&WeekView::addScheduleItem, this, _1));
s->apply(boost::bind(&WeekView::addScheduleItem, this, boost::placeholders::_1));
scene->setSchedule(s);
}
......
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