2016-12-25 16:19:01 +03:00
project ( lattedock )
2016-12-25 10:25:27 +03:00
cmake_minimum_required ( VERSION 3.0 FATAL_ERROR )
2017-01-06 23:38:18 +03:00
set ( CMAKE_CXX_STANDARD 14 )
2021-10-25 16:48:55 +03:00
set ( VERSION 0.10.3 )
2016-12-30 10:09:21 +03:00
set ( AUTHOR "Michail Vourlakos, Smith Ar" )
set ( EMAIL "mvourlakos@gmail.com, audoban@openmailbox.org" )
2019-09-03 01:50:21 +03:00
set ( WEBSITE "https://userbase.kde.org/LatteDock" )
set ( BUG_ADDRESS "https://bugs.kde.org/enter_bug.cgi?product=lattedock" )
set ( FAQS "https://userbase.kde.org/LatteDock/FAQ" )
2016-12-25 10:25:27 +03:00
2018-04-09 03:36:44 +03:00
set ( QT_MIN_VERSION "5.9.0" )
2021-02-04 00:59:39 +03:00
set ( KF5_MIN_VERSION "5.48.0" )
2016-12-25 10:25:27 +03:00
2017-01-26 01:03:15 +03:00
set ( KF5_LOCALE_PREFIX "" )
2017-01-25 19:37:25 +03:00
2018-02-16 16:12:59 +03:00
find_package ( ECM ${ KF5_MIN_VER } REQUIRED NO_MODULE )
2016-12-25 10:25:27 +03:00
set ( CMAKE_MODULE_PATH ${ ECM_MODULE_PATH } ${ ECM_KDE_MODULE_DIR } )
2017-08-27 21:53:53 +03:00
find_package ( Qt5 ${ QT_MIN_VERSION } CONFIG REQUIRED NO_MODULE COMPONENTS DBus Gui Qml Quick )
2019-06-01 01:20:54 +03:00
2016-12-25 10:25:27 +03:00
find_package ( KF5 ${ KF5_MIN_VERSION } REQUIRED COMPONENTS
2020-08-22 01:39:43 +03:00
A c t i v i t i e s A r c h i v e C o r e A d d o n s G u i A d d o n s C r a s h D B u s A d d o n s D e c l a r a t i v e G l o b a l A c c e l K i r i g a m i 2
I 1 8 n I c o n T h e m e s K I O N e w S t u f f N o t i f i c a t i o n s P l a s m a P l a s m a Q u i c k W a y l a n d W i n d o w S y s t e m X m l G u i )
2020-04-24 14:52:16 +03:00
2017-02-03 04:18:05 +03:00
find_package ( X11 REQUIRED )
set_package_properties ( X11 PROPERTIES DESCRIPTION "X11 libraries"
2017-02-16 06:14:37 +03:00
U R L " h t t p : / / w w w . x . o r g "
T Y P E O P T I O N A L
P U R P O S E " R e q u i r e d f o r b u i l d i n g t h e X 1 1 b a s e d w o r k s p a c e " )
2017-02-03 04:18:05 +03:00
if ( X11_FOUND )
2020-07-19 15:04:46 +03:00
find_package ( XCB MODULE REQUIRED COMPONENTS XCB RANDR SHAPE EVENT )
2017-02-16 06:14:37 +03:00
set_package_properties ( XCB PROPERTIES TYPE REQUIRED )
find_package ( Qt5 ${ QT_MIN_VERSION } CONFIG REQUIRED COMPONENTS X11Extras )
2017-06-21 01:21:20 +03:00
if ( NOT X11_SM_FOUND )
message ( FATAL_ERROR " \nThe X11 Session Management ( SM ) development package could not be found.
\ n P l e a s e i n s t a l l l i b S M . \ n " )
endif ( NOT X11_SM_FOUND )
2017-02-03 04:18:05 +03:00
endif ( )
if ( X11_FOUND AND XCB_XCB_FOUND )
2017-02-16 06:14:37 +03:00
set ( HAVE_X11 ON )
2017-02-03 04:18:05 +03:00
endif ( )
2019-04-10 18:10:53 +03:00
string ( REGEX MATCH "\\.([^]]+)\\." KF5_VERSION_MINOR ${ KF5_VERSION } )
string ( REGEX REPLACE "\\." "" KF5_VERSION_MINOR ${ KF5_VERSION_MINOR } )
message ( STATUS "KF5 VERSION : ${KF5_VERSION}" )
message ( STATUS "KF5 VERSION MINOR : ${KF5_VERSION_MINOR}" )
2019-10-31 17:35:32 +03:00
if ( ${ KF5_VERSION_MINOR } LESS "62" )
find_package ( KF5 REQUIRED COMPONENTS SysGuard )
endif ( )
2018-02-16 16:12:59 +03:00
include ( ECMQMLModules )
ecm_find_qmlmodule ( QtQuick 2.7 )
ecm_find_qmlmodule ( QtQuick.Layouts 1.3 )
ecm_find_qmlmodule ( QtQuick.Controls 1.4 )
ecm_find_qmlmodule ( QtQuick.Controls.Styles.Plasma 2.0 )
ecm_find_qmlmodule ( QtGraphicalEffects 1.0 )
ecm_find_qmlmodule ( org.kde.kquickcontrolsaddons 2.0 )
ecm_find_qmlmodule ( org.kde.plasma.core 2.0 )
ecm_find_qmlmodule ( org.kde.plasma.components 2.0 )
2017-02-16 06:14:37 +03:00
include ( CheckIncludeFiles )
2017-08-27 21:53:53 +03:00
include ( CMakePackageConfigHelpers )
2017-02-16 06:14:37 +03:00
include ( ECMOptionalAddSubdirectory )
include ( ECMQtDeclareLoggingCategory )
2017-08-27 21:53:53 +03:00
include ( KDECMakeSettings )
2020-01-03 21:41:26 +03:00
include ( KDECompilerSettings NO_POLICY_SCOPE )
2017-08-27 21:53:53 +03:00
include ( KDEInstallDirs )
2017-02-16 06:14:37 +03:00
include ( KDEPackageAppTemplates )
2017-08-27 21:56:23 +03:00
include ( WriteBasicConfigVersionFile )
2016-12-25 10:25:27 +03:00
2017-02-16 06:14:37 +03:00
include ( Definitions.cmake )
2016-12-25 10:25:27 +03:00
2021-08-12 08:04:22 +03:00
#hide warnings
2020-03-14 15:19:44 +03:00
string ( REPLACE "-Wall" "" CMAKE_CXX_FLAGS ${ CMAKE_CXX_FLAGS } )
2021-08-12 08:04:22 +03:00
string ( REPLACE "-Wdeprecated-declarations" "" CMAKE_CXX_FLAGS ${ CMAKE_CXX_FLAGS } )
string ( REPLACE "-Wreorder" "" CMAKE_CXX_FLAGS ${ CMAKE_CXX_FLAGS } )
string ( REPLACE "-Wunused-variable" "" CMAKE_CXX_FLAGS ${ CMAKE_CXX_FLAGS } )
string ( REPLACE "-Wunused-parameter" "" CMAKE_CXX_FLAGS ${ CMAKE_CXX_FLAGS } )
#add format security check
set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wformat -Werror=format-security" )
2020-03-14 15:19:44 +03:00
message ( STATUS "COMPILER FLAGS : ${CMAKE_CXX_FLAGS}" )
2020-04-24 14:52:16 +03:00
# Share Same Core Types between declarativeimports and app
set ( CORETYPESHEADER "LIBCORETYPES_H" )
configure_file ( declarativeimports/coretypes.h.in declarativeimports/core/types.h )
set ( CORETYPESHEADER "APPCORETYPES_H" )
configure_file ( declarativeimports/coretypes.h.in app/coretypes.h )
2021-03-04 01:06:27 +03:00
set ( CORETYPESHEADER "LATTEGENERALCONTAINMENTTYPES_H" )
configure_file ( declarativeimports/coretypes.h.in containment/plugin/lattetypes.h )
2021-05-15 15:46:18 +03:00
# Share App::Settings::GenericTools to containment actions
configure_file ( app/settings/generic/generictools.h containmentactions/contextmenu/generictools.h )
configure_file ( app/settings/generic/generictools.cpp containmentactions/contextmenu/generictools.cpp )
2021-06-06 13:22:03 +03:00
configure_file ( app/data/contextmenudata.h containmentactions/contextmenu/contextmenudata.h )
2020-04-24 14:52:16 +03:00
# subdirectories
2019-03-18 20:35:53 +03:00
add_subdirectory ( declarativeimports )
2019-03-23 18:49:09 +03:00
add_subdirectory ( indicators )
2016-12-30 10:09:21 +03:00
add_subdirectory ( app )
2018-02-06 21:27:35 +03:00
add_subdirectory ( containmentactions )
2016-12-25 10:25:27 +03:00
add_subdirectory ( containment )
2016-12-28 14:24:27 +03:00
add_subdirectory ( icons )
2017-08-27 21:53:53 +03:00
add_subdirectory ( plasmoid )
add_subdirectory ( shell )
2017-09-08 19:36:02 +03:00
2019-07-12 00:46:16 +03:00
ki18n_install ( po )