2008-09-24 20:32:01 +01:00
|
|
|
# Copyright (C) 2008 by Volker Lanz <vl@fidra.de>
|
|
|
|
#
|
|
|
|
# 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 2 of the License, or
|
|
|
|
# at your option) any later version.
|
|
|
|
#
|
|
|
|
# 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
|
|
|
|
# along with this program; if not, write to the
|
|
|
|
# Free Software Foundation, Inc.,
|
|
|
|
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
|
2009-01-09 10:11:36 +00:00
|
|
|
project(partitionmanager)
|
2008-09-24 20:32:01 +01:00
|
|
|
|
2014-05-18 21:41:48 +01:00
|
|
|
cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)
|
2008-09-24 20:32:01 +01:00
|
|
|
|
2009-01-09 10:11:36 +00:00
|
|
|
set(CMAKE_USE_RELATIVE_PATHS OFF)
|
|
|
|
set(CMAKE_BUILD_WITH_INSTALL_RPATH ON)
|
2008-09-24 20:32:01 +01:00
|
|
|
|
2014-05-18 21:41:48 +01:00
|
|
|
set(QT_MIN_VERSION "5.3.0")
|
2009-01-09 10:11:36 +00:00
|
|
|
set(VERSION_MAJOR "1")
|
2015-02-05 10:57:09 +00:00
|
|
|
set(VERSION_MINOR "2")
|
|
|
|
set(VERSION_RELEASE "0")
|
2009-08-17 00:05:33 +01:00
|
|
|
set(VERSION_SUFFIX "")
|
2009-01-09 10:11:36 +00:00
|
|
|
set(VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_RELEASE}${VERSION_SUFFIX})
|
|
|
|
add_definitions(-D'VERSION="${VERSION}"')
|
2008-09-24 20:32:01 +01:00
|
|
|
|
2014-05-28 01:24:22 +01:00
|
|
|
find_package(ECM 0.0.13 REQUIRED NO_MODULE)
|
2014-05-18 21:41:48 +01:00
|
|
|
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/")
|
|
|
|
include(ECMInstallIcons)
|
|
|
|
|
|
|
|
include(KDEInstallDirs)
|
|
|
|
include(KDECMakeSettings)
|
|
|
|
include(KDECompilerSettings)
|
|
|
|
include(FeatureSummary)
|
|
|
|
include(GenerateExportHeader)
|
|
|
|
|
|
|
|
find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS
|
|
|
|
Core
|
|
|
|
Widgets
|
|
|
|
)
|
|
|
|
|
|
|
|
# Load the frameworks we need
|
2014-08-10 22:12:04 +01:00
|
|
|
find_package(KF5 REQUIRED
|
2014-05-18 21:41:48 +01:00
|
|
|
Config
|
2014-11-14 15:05:54 +00:00
|
|
|
Crash
|
2014-05-18 21:41:48 +01:00
|
|
|
DocTools
|
|
|
|
I18n
|
2014-11-03 19:57:25 +00:00
|
|
|
IconThemes
|
2014-05-18 21:41:48 +01:00
|
|
|
JobWidgets
|
|
|
|
KIO
|
|
|
|
WindowSystem
|
|
|
|
XmlGui
|
|
|
|
WidgetsAddons
|
|
|
|
)
|
|
|
|
|
|
|
|
# use sane compile flags
|
|
|
|
add_definitions(
|
|
|
|
-fexceptions
|
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
|
|
|
|
-DQT_NO_SIGNALS_SLOTS_KEYWORDS
|
|
|
|
-DQT_USE_FAST_OPERATOR_PLUS
|
2014-05-18 21:41:48 +01:00
|
|
|
)
|
2008-09-24 20:32:01 +01:00
|
|
|
|
2009-01-09 10:11:36 +00:00
|
|
|
find_package(MSGFMT REQUIRED)
|
|
|
|
find_package(PkgConfig REQUIRED)
|
|
|
|
pkg_check_modules(BLKID REQUIRED blkid)
|
2010-03-26 15:06:33 +00:00
|
|
|
pkg_check_modules(LIBATASMART REQUIRED libatasmart)
|
2008-09-24 20:32:01 +01:00
|
|
|
|
2014-05-18 21:41:48 +01:00
|
|
|
include_directories(${Qt5Core_INCLUDE_DIRS} ${UUID_INCLUDE_DIRS} ${BLKID_INCLUDE_DIRS} lib/ src/)
|
2008-09-24 20:32:01 +01:00
|
|
|
|
2010-01-26 11:35:23 +00:00
|
|
|
add_subdirectory(lib)
|
2009-01-09 10:11:36 +00:00
|
|
|
add_subdirectory(src)
|
2009-03-25 12:11:10 +00:00
|
|
|
add_subdirectory(icons)
|
2008-09-24 20:32:01 +01:00
|
|
|
|
2009-01-09 10:11:36 +00:00
|
|
|
message(STATUS "KDE Partition Manager ${VERSION} will be built for install into ${CMAKE_INSTALL_PREFIX}")
|
2008-09-24 20:32:01 +01:00
|
|
|
|
2009-01-09 10:11:36 +00:00
|
|
|
add_custom_target(docs
|
2008-09-24 20:32:01 +01:00
|
|
|
COMMAND doxygen Doxyfile
|
|
|
|
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
|
|
|
)
|