2008-09-24 20:32:01 +01:00
|
|
|
# Copyright (C) 2008 by Volker Lanz <vl@fidra.de>
|
2018-07-21 20:54:20 +01:00
|
|
|
# Copyright (C) 2014-2018 by Andrius Štikonas <andrius@stikonas.eu>
|
2008-09-24 20:32:01 +01:00
|
|
|
#
|
2015-02-07 00:32:25 +00:00
|
|
|
# This program is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of the GNU General Public License as
|
|
|
|
# published by the Free Software Foundation; either version 3 of
|
|
|
|
# the License, or (at your option) any later version.
|
2008-09-24 20:32:01 +01:00
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
2015-02-07 00:32:25 +00:00
|
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
2008-09-24 20:32:01 +01:00
|
|
|
|
2009-01-09 10:11:36 +00:00
|
|
|
project(partitionmanager)
|
2008-09-24 20:32:01 +01:00
|
|
|
|
2018-07-15 17:57:30 +01:00
|
|
|
cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
|
2008-09-24 20:32:01 +01:00
|
|
|
|
2018-07-21 20:54:20 +01:00
|
|
|
# Dependencies
|
|
|
|
set(QT_MIN_VERSION "5.10.0")
|
|
|
|
set(KF5_MIN_VERSION "5.31")
|
|
|
|
set(KPMCORE_MIN_VERSION "3.50.0")
|
|
|
|
|
2009-01-09 10:11:36 +00:00
|
|
|
set(CMAKE_USE_RELATIVE_PATHS OFF)
|
|
|
|
set(CMAKE_BUILD_WITH_INSTALL_RPATH ON)
|
2015-02-16 23:51:46 +00:00
|
|
|
set(KDE_INSTALL_USE_QT_SYS_PATHS ON CACHE BOOL "Install mkspecs files, Plugins and Imports to the Qt 5 install dir" FORCE)
|
2008-09-24 20:32:01 +01:00
|
|
|
|
2016-03-12 16:43:06 +00:00
|
|
|
# Check KPMcore dependency when bumping
|
2016-11-30 15:32:44 +00:00
|
|
|
set(VERSION_MAJOR "3")
|
2018-07-15 12:09:58 +01:00
|
|
|
set(VERSION_MINOR "50")
|
|
|
|
set(VERSION_RELEASE "0")
|
2016-03-12 16:43:06 +00:00
|
|
|
set(VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_RELEASE})
|
2015-06-04 01:51:56 +01:00
|
|
|
add_definitions(-D'VERSION="${VERSION}"') #"
|
2008-09-24 20:32:01 +01:00
|
|
|
|
2017-10-09 13:54:31 +01:00
|
|
|
set(CMAKE_CXX_STANDARD 14)
|
|
|
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
|
|
|
2018-02-05 21:51:42 +00:00
|
|
|
find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE)
|
2015-06-04 01:51:56 +01:00
|
|
|
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${CMAKE_MODULE_PATH})
|
2014-05-18 21:41:48 +01:00
|
|
|
include(ECMInstallIcons)
|
|
|
|
|
|
|
|
include(KDEInstallDirs)
|
|
|
|
include(KDECMakeSettings)
|
2016-01-28 18:40:43 +00:00
|
|
|
include(KDECompilerSettings NO_POLICY_SCOPE)
|
2014-05-18 21:41:48 +01:00
|
|
|
include(FeatureSummary)
|
|
|
|
include(GenerateExportHeader)
|
|
|
|
|
|
|
|
find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS
|
|
|
|
Core
|
2015-06-04 01:51:56 +01:00
|
|
|
Gui
|
2014-05-18 21:41:48 +01:00
|
|
|
Widgets
|
|
|
|
)
|
|
|
|
|
|
|
|
# Load the frameworks we need
|
2017-10-20 14:29:43 +01:00
|
|
|
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED
|
2017-11-18 00:20:23 +00:00
|
|
|
COMPONENTS
|
|
|
|
Config
|
|
|
|
ConfigWidgets
|
|
|
|
CoreAddons
|
|
|
|
Crash
|
2018-03-24 22:24:26 +00:00
|
|
|
DBusAddons
|
2017-11-18 00:20:23 +00:00
|
|
|
I18n
|
|
|
|
IconThemes
|
|
|
|
JobWidgets
|
|
|
|
KIO
|
|
|
|
XmlGui
|
|
|
|
WidgetsAddons
|
|
|
|
OPTIONAL_COMPONENTS
|
|
|
|
DocTools
|
2014-05-18 21:41:48 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
# use sane compile flags
|
|
|
|
add_definitions(
|
2014-05-20 22:33:02 +01:00
|
|
|
-DQT_USE_QSTRINGBUILDER
|
|
|
|
-DQT_NO_CAST_TO_ASCII
|
|
|
|
-DQT_NO_CAST_FROM_ASCII
|
|
|
|
-DQT_STRICT_ITERATORS
|
|
|
|
-DQT_NO_URL_CAST_FROM_STRING
|
|
|
|
-DQT_NO_CAST_FROM_BYTEARRAY
|
2017-06-29 22:28:28 +01:00
|
|
|
-DQT_NO_CAST_TO_BYTEARRAY
|
2014-05-20 22:33:02 +01:00
|
|
|
-DQT_NO_SIGNALS_SLOTS_KEYWORDS
|
|
|
|
-DQT_USE_FAST_OPERATOR_PLUS
|
2017-10-20 14:29:43 +01:00
|
|
|
-DQT_DISABLE_DEPRECATED_BEFORE=0x050900
|
2014-05-18 21:41:48 +01:00
|
|
|
)
|
2008-09-24 20:32:01 +01:00
|
|
|
|
2017-06-13 23:20:24 +01:00
|
|
|
find_package(KPMcore ${KPMCORE_MIN_VERSION} REQUIRED)
|
2008-09-24 20:32:01 +01:00
|
|
|
|
2016-01-12 00:12:49 +00:00
|
|
|
include_directories(${Qt5Core_INCLUDE_DIRS} ${UUID_INCLUDE_DIRS} ${BLKID_INCLUDE_DIRS} ${KPMCORE_INCLUDE_DIR} lib/ src/)
|
2008-09-24 20:32:01 +01:00
|
|
|
|
2009-01-09 10:11:36 +00:00
|
|
|
add_subdirectory(src)
|
2009-03-25 12:11:10 +00:00
|
|
|
add_subdirectory(icons)
|
2017-10-20 14:29:43 +01:00
|
|
|
if (KF5DocTools_FOUND)
|
|
|
|
add_subdirectory(doc)
|
|
|
|
endif()
|
2008-09-24 20:32:01 +01:00
|
|
|
|
2015-02-15 13:35:21 +00:00
|
|
|
ki18n_install(po)
|
2008-09-24 20:32:01 +01:00
|
|
|
|
2015-02-15 13:35:21 +00:00
|
|
|
message(STATUS "KDE Partition Manager ${VERSION} will be built for install into ${CMAKE_INSTALL_PREFIX}")
|
2015-03-28 21:17:38 +00:00
|
|
|
|
|
|
|
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
|