aboutsummaryrefslogtreecommitdiff
path: root/kde-modules
diff options
context:
space:
mode:
Diffstat (limited to 'kde-modules')
-rw-r--r--kde-modules/KDECMakeSettings.cmake11
-rw-r--r--kde-modules/KDEInstallDirs.cmake12
-rw-r--r--kde-modules/KDEPackageAppTemplates.cmake40
-rw-r--r--kde-modules/clang-format.cmake9
4 files changed, 44 insertions, 28 deletions
diff --git a/kde-modules/KDECMakeSettings.cmake b/kde-modules/KDECMakeSettings.cmake
index 0690a2ed..03d10d16 100644
--- a/kde-modules/KDECMakeSettings.cmake
+++ b/kde-modules/KDECMakeSettings.cmake
@@ -254,6 +254,13 @@ if(NOT KDE_SKIP_BUILD_SETTINGS)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
endif()
+ # For Android we need to put shared libraries into "lib" for androiddeployqt to work without prior installation.
+ # That fact that this conflicts with the above isn't really an issue, as we can't run things while cross-compiling
+ # for Android anyway.
+ if (ANDROID)
+ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
+ endif()
+
if (APPLE)
# Disable detection of X11 and related package on OS X because when using
# brew or macports, X11 can be installed and thus is detected.
@@ -300,7 +307,7 @@ function(_repository_name reponame dir)
WORKING_DIRECTORY "${dir}")
if(exitCode EQUAL 0)
- string(REGEX MATCHALL ".+[:\\/]([-A-Za-z0-9]+)(.git)?\\s*" "" ${giturl})
+ string(REGEX MATCHALL ".+kde\\.org[:\\/]([-A-Za-z0-9\\/]+)(.git)?\\s*" "" ${giturl})
set(${reponame} ${CMAKE_MATCH_1})
endif()
@@ -325,7 +332,7 @@ if(NOT EXISTS ${CMAKE_SOURCE_DIR}/po AND NOT TARGET fetch-translations)
_repository_name(_reponame "${CMAKE_SOURCE_DIR}")
set(releaseme_clone_commands
- COMMAND git clone --depth 1 https://anongit.kde.org/releaseme.git
+ COMMAND git clone --depth 1 https://invent.kde.org/sdk/releaseme.git
)
add_custom_command(
OUTPUT "${CMAKE_BINARY_DIR}/releaseme"
diff --git a/kde-modules/KDEInstallDirs.cmake b/kde-modules/KDEInstallDirs.cmake
index d739cf19..bba3a9c8 100644
--- a/kde-modules/KDEInstallDirs.cmake
+++ b/kde-modules/KDEInstallDirs.cmake
@@ -7,6 +7,10 @@
# Note that none of the variables defined by this module provide any
# information about the location of already-installed KDE software.
#
+# Also sets ``CMAKE_INSTALL_PREFIX`` to the installation prefix of ECM,
+# unless that variable has been already explicitly set by something else
+# (since 5.61 and with CMake >= 3.7).
+#
# Inclusion of this module defines the following variables:
#
# ``KDE_INSTALL_<dir>``
@@ -573,8 +577,12 @@ _define_relative(KNOTIFY5RCDIR DATAROOTDIR "knotifications5"
_define_relative(KXMLGUI5DIR DATAROOTDIR "kxmlgui5"
"kxmlgui .rc files"
KXMLGUI_INSTALL_DIR)
-_define_relative(KTEMPLATESDIR DATAROOTDIR "kdevappwizard/templates"
- "Kapptemplate and Kdevelop templates")
+_define_relative(KAPPTEMPLATESDIR DATAROOTDIR "kdevappwizard/templates"
+ "KAppTemplate and KDevelop templates"
+ KDE_INSTALL_KTEMPLATESDIR
+ )
+_define_relative(KFILETEMPLATESDIR DATAROOTDIR "kdevfiletemplates/templates"
+ "KDevelop file templates")
_define_relative(LOGGINGCATEGORIESDIR DATAROOTDIR "qlogging-categories5"
"Qt Logging categories files")
_define_relative(JARDIR "" "jar"
diff --git a/kde-modules/KDEPackageAppTemplates.cmake b/kde-modules/KDEPackageAppTemplates.cmake
index 7d2ddb3c..9403d63b 100644
--- a/kde-modules/KDEPackageAppTemplates.cmake
+++ b/kde-modules/KDEPackageAppTemplates.cmake
@@ -101,41 +101,39 @@ function(kde_package_app_templates)
endif()
foreach(_templateName ${ARG_TEMPLATES})
-
get_filename_component(_tmp_file ${_templateName} ABSOLUTE)
get_filename_component(_baseName ${_tmp_file} NAME_WE)
set(_template ${CMAKE_CURRENT_BINARY_DIR}/${_baseName}.tar.bz2)
- file(GLOB _files "${CMAKE_CURRENT_SOURCE_DIR}/${_templateName}/*")
- set(_deps)
- foreach(_file ${_files})
- get_filename_component(_fileName ${_file} NAME)
- string(COMPARE NOTEQUAL ${_fileName} .kdev_ignore _v1)
- string(REGEX MATCH "\\.svn" _v2 ${_fileName})
- if(WIN32)
- string(REGEX MATCH "_svn" _v3 ${_fileName})
- else(WIN32)
- set(_v3 FALSE)
- endif()
- if (_v1 AND NOT _v2 AND NOT _v3)
- set(_deps ${_deps} ${_file})
- endif ()
- endforeach()
-
+ # CONFIGURE_DEPENDS is only available for cmake >= 3.12
+ if(NOT CMAKE_VERSION VERSION_LESS "3.12.0")
+ # also enlist directories as deps to catch file removals
+ file(GLOB_RECURSE _subdirs_entries LIST_DIRECTORIES true CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/${_templateName}/*")
+ else()
+ file(GLOB_RECURSE _subdirs_entries LIST_DIRECTORIES true "${CMAKE_CURRENT_SOURCE_DIR}/${_templateName}/*")
+ # custom code to implement CONFIGURE_DEPENDS
+ foreach(_direntry ${_subdirs_entries})
+ if(IS_DIRECTORY ${_direntry})
+ set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${_direntry})
+ endif()
+ endforeach()
+ endif()
add_custom_target(${_baseName} ALL DEPENDS ${_template})
if(GNU_TAR_FOUND)
# Make tar archive reproducible, the arguments are only available with GNU tar
add_custom_command(OUTPUT ${_template}
- COMMAND ${_tar_executable} ARGS -c ${CMAKE_CURRENT_SOURCE_DIR}/${_templateName}
- --exclude .kdev_ignore --exclude .svn --sort=name --mode=go=rX,u+rw,a-s --owner=root
- --group=root --numeric-owner -j -v -f ${_template} .
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${_templateName}
+ COMMAND ${_tar_executable} ARGS -c ${CMAKE_CURRENT_SOURCE_DIR}/${_templateName}
+ --exclude .kdev_ignore --exclude .svn --sort=name --mode=go=rX,u+rw,a-s --owner=root
+ --group=root --numeric-owner -j -v -f ${_template} .
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${_templateName}
+ DEPENDS ${_subdirs_entries}
)
else()
add_custom_command(OUTPUT ${_template}
COMMAND ${CMAKE_COMMAND} -E tar "cvfj" ${_template} .
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${_templateName}
+ DEPENDS ${_subdirs_entries}
)
endif()
diff --git a/kde-modules/clang-format.cmake b/kde-modules/clang-format.cmake
index 9e7bbc71..c3e43485 100644
--- a/kde-modules/clang-format.cmake
+++ b/kde-modules/clang-format.cmake
@@ -32,9 +32,6 @@ PointerAlignment: Right
# horizontally aligns arguments after an open bracket.
AlignAfterOpenBracket: Align
-# align trailing comments
-AlignTrailingComments: true
-
# don't move all parameters to new line
AllowAllParametersOfDeclarationOnNextLine: false
@@ -56,6 +53,9 @@ BreakBeforeBinaryOperators: None
# format C++11 braced lists like function calls
Cpp11BracedListStyle: true
+# do not put a space before C++11 braced lists
+SpaceBeforeCpp11BracedList: false
+
# remove empty lines
KeepEmptyLinesAtTheStartOfBlocks: false
@@ -67,3 +67,6 @@ SpaceAfterTemplateKeyword: false
# macros for which the opening brace stays attached.
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH, forever, Q_FOREVER, QBENCHMARK, QBENCHMARK_ONCE ]
+
+# keep lambda formatting multi-line if not empty
+AllowShortLambdasOnASingleLine: Empty