From b885e448c3294f40cc4bcccec113a0c8f6a229f9 Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Sat, 8 Feb 2020 05:24:29 +0200 Subject: [PATCH] kdeplasma-addons: remove duplicate CMake modules provided by kdelibs Signed-off-by: Ivailo Monev --- .../applets/kimpanel/COPYING-CMAKE-SCRIPTS | 23 -------- .../applets/kimpanel/cmake/FindGLIB2.cmake | 52 ------------------- .../applets/kimpanel/cmake/FindGObject.cmake | 52 ------------------- .../cmake/MacroOptionalAddSubdirectory.cmake | 27 ---------- 4 files changed, 154 deletions(-) delete mode 100644 kdeplasma-addons/applets/kimpanel/COPYING-CMAKE-SCRIPTS delete mode 100644 kdeplasma-addons/applets/kimpanel/cmake/FindGLIB2.cmake delete mode 100644 kdeplasma-addons/applets/kimpanel/cmake/FindGObject.cmake delete mode 100644 kdeplasma-addons/applets/kimpanel/cmake/MacroOptionalAddSubdirectory.cmake diff --git a/kdeplasma-addons/applets/kimpanel/COPYING-CMAKE-SCRIPTS b/kdeplasma-addons/applets/kimpanel/COPYING-CMAKE-SCRIPTS deleted file mode 100644 index d99eefb5..00000000 --- a/kdeplasma-addons/applets/kimpanel/COPYING-CMAKE-SCRIPTS +++ /dev/null @@ -1,23 +0,0 @@ -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. The name of the author may not be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - diff --git a/kdeplasma-addons/applets/kimpanel/cmake/FindGLIB2.cmake b/kdeplasma-addons/applets/kimpanel/cmake/FindGLIB2.cmake deleted file mode 100644 index 09fd98d8..00000000 --- a/kdeplasma-addons/applets/kimpanel/cmake/FindGLIB2.cmake +++ /dev/null @@ -1,52 +0,0 @@ -# - Try to find the GLIB2 libraries -# Once done this will define -# -# GLIB2_FOUND - system has glib2 -# GLIB2_INCLUDE_DIR - the glib2 include directory -# GLIB2_LIBRARIES - glib2 library - -# Copyright (c) 2008 Laurent Montel, -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - - -if(GLIB2_INCLUDE_DIR AND GLIB2_LIBRARIES) - # Already in cache, be silent - set(GLIB2_FIND_QUIETLY TRUE) -endif(GLIB2_INCLUDE_DIR AND GLIB2_LIBRARIES) - -find_package(PkgConfig) -pkg_check_modules(PC_LibGLIB2 QUIET glib-2.0) - -find_path(GLIB2_MAIN_INCLUDE_DIR - NAMES glib.h - HINTS ${PC_LibGLIB2_INCLUDEDIR} - PATH_SUFFIXES glib-2.0) - -find_library(GLIB2_LIBRARY - NAMES glib-2.0 - HINTS ${PC_LibGLIB2_LIBDIR} -) - -set(GLIB2_LIBRARIES ${GLIB2_LIBRARY}) - -# search the glibconfig.h include dir under the same root where the library is found -get_filename_component(glib2LibDir "${GLIB2_LIBRARIES}" PATH) - -find_path(GLIB2_INTERNAL_INCLUDE_DIR glibconfig.h - PATH_SUFFIXES glib-2.0/include - HINTS ${PC_LibGLIB2_INCLUDEDIR} "${glib2LibDir}" ${CMAKE_SYSTEM_LIBRARY_PATH}) - -set(GLIB2_INCLUDE_DIR "${GLIB2_MAIN_INCLUDE_DIR}") - -# not sure if this include dir is optional or required -# for now it is optional -if(GLIB2_INTERNAL_INCLUDE_DIR) - set(GLIB2_INCLUDE_DIR ${GLIB2_INCLUDE_DIR} "${GLIB2_INTERNAL_INCLUDE_DIR}") -endif(GLIB2_INTERNAL_INCLUDE_DIR) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(GLIB2 DEFAULT_MSG GLIB2_LIBRARIES GLIB2_MAIN_INCLUDE_DIR) - -mark_as_advanced(GLIB2_INCLUDE_DIR GLIB2_LIBRARIES) diff --git a/kdeplasma-addons/applets/kimpanel/cmake/FindGObject.cmake b/kdeplasma-addons/applets/kimpanel/cmake/FindGObject.cmake deleted file mode 100644 index af0c9f73..00000000 --- a/kdeplasma-addons/applets/kimpanel/cmake/FindGObject.cmake +++ /dev/null @@ -1,52 +0,0 @@ -# - Try to find GObject -# Once done this will define -# -# GOBJECT_FOUND - system has GObject -# GOBJECT_INCLUDE_DIR - the GObject include directory -# GOBJECT_LIBRARIES - the libraries needed to use GObject -# GOBJECT_DEFINITIONS - Compiler switches required for using GObject - -# Copyright (c) 2011, Raphael Kubo da Costa -# Copyright (c) 2006, Tim Beaulen -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - -FIND_PACKAGE(PkgConfig) -PKG_CHECK_MODULES(PC_GOBJECT gobject-2.0) -SET(GOBJECT_DEFINITIONS ${PC_GOBJECT_CFLAGS_OTHER}) - -FIND_PATH(GOBJECT_INCLUDE_DIR gobject.h - HINTS - ${PC_GOBJECT_INCLUDEDIR} - ${PC_GOBJECT_INCLUDE_DIRS} - PATH_SUFFIXES glib-2.0/gobject/ - ) - -FIND_LIBRARY(_GObjectLibs NAMES gobject-2.0 - HINTS - ${PC_GOBJECT_LIBDIR} - ${PC_GOBJECT_LIBRARY_DIRS} - ) -FIND_LIBRARY(_GModuleLibs NAMES gmodule-2.0 - HINTS - ${PC_GOBJECT_LIBDIR} - ${PC_GOBJECT_LIBRARY_DIRS} - ) -FIND_LIBRARY(_GThreadLibs NAMES gthread-2.0 - HINTS - ${PC_GOBJECT_LIBDIR} - ${PC_GOBJECT_LIBRARY_DIRS} - ) -FIND_LIBRARY(_GLibs NAMES glib-2.0 - HINTS - ${PC_GOBJECT_LIBDIR} - ${PC_GOBJECT_LIBRARY_DIRS} - ) - -SET( GOBJECT_LIBRARIES ${_GObjectLibs} ${_GModuleLibs} ${_GThreadLibs} ${_GLibs} ) - -INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(GOBJECT DEFAULT_MSG GOBJECT_LIBRARIES GOBJECT_INCLUDE_DIR) - -MARK_AS_ADVANCED(GOBJECT_INCLUDE_DIR _GObjectLibs _GModuleLibs _GThreadLibs _GLibs) diff --git a/kdeplasma-addons/applets/kimpanel/cmake/MacroOptionalAddSubdirectory.cmake b/kdeplasma-addons/applets/kimpanel/cmake/MacroOptionalAddSubdirectory.cmake deleted file mode 100644 index b0d565c2..00000000 --- a/kdeplasma-addons/applets/kimpanel/cmake/MacroOptionalAddSubdirectory.cmake +++ /dev/null @@ -1,27 +0,0 @@ -# - MACRO_OPTIONAL_ADD_SUBDIRECTORY() combines ADD_SUBDIRECTORY() with an OPTION() -# MACRO_OPTIONAL_ADD_SUBDIRECTORY( ) -# If you use MACRO_OPTIONAL_ADD_SUBDIRECTORY() instead of ADD_SUBDIRECTORY(), -# this will have two effects -# 1 - CMake will not complain if the directory doesn't exist -# This makes sense if you want to distribute just one of the subdirs -# in a source package, e.g. just one of the subdirs in kdeextragear. -# 2 - If the directory exists, it will offer an option to skip the -# subdirectory. -# This is useful if you want to compile only a subset of all -# directories. - -# Copyright (c) 2007, Alexander Neundorf, -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - - -MACRO (MACRO_OPTIONAL_ADD_SUBDIRECTORY _dir ) - GET_FILENAME_COMPONENT(_fullPath ${_dir} ABSOLUTE) - IF(EXISTS ${_fullPath}) - OPTION(BUILD_${_dir} "Build directory ${_dir}" TRUE) - IF(BUILD_${_dir}) - ADD_SUBDIRECTORY(${_dir}) - ENDIF(BUILD_${_dir}) - ENDIF(EXISTS ${_fullPath}) -ENDMACRO (MACRO_OPTIONAL_ADD_SUBDIRECTORY)