From 4ad4e863c2efdb6458ccb8e5c1932ef390d97b12 Mon Sep 17 00:00:00 2001 From: Laurent Montel Date: Fri, 23 Mar 2007 16:40:59 +0000 Subject: It's better to move it here that kdebase because if we don't install kdebase and try to compile and other module which requires plasma we will have an error but we didn't know which error (just plasma cmake file not installed I will remove it from kdebase next monday svn path=/trunk/KDE/kdelibs/; revision=645811 --- modules/FindPlasma.cmake | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 modules/FindPlasma.cmake (limited to 'modules/FindPlasma.cmake') diff --git a/modules/FindPlasma.cmake b/modules/FindPlasma.cmake new file mode 100644 index 00000000..00e8a084 --- /dev/null +++ b/modules/FindPlasma.cmake @@ -0,0 +1,44 @@ +# cmake macro to see if we have Plasma from KDE workspace + +# PLASMA_INCLUDE_DIR +# PLASMA_FOUND +# Copyright (C) 2007 Brad Hards +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + + +if (PLASMA_INCLUDE_DIR) + # Already in cache, be silent + set(PLASMA_FOUND TRUE) +endif (PLASMA_INCLUDE_DIR) + + +FIND_PATH(PLASMA_INCLUDE_DIR NAMES plasma/kpanelapplet.h + PATHS + ${INCLUDE_INSTALL_DIR} + /usr/include + /usr/local/include +) + +FIND_LIBRARY(PLASMA_LIBRARIES NAMES plasma + PATHS + ${LIB_INSTALL_DIR} + /usr/lib + /usr/local/lib +) +if (PLASMA_LIBRARIES AND PLASMA_INCLUDE_DIR) + set(PLASMA_FOUND TRUE) +endif (PLASMA_LIBRARIES AND PLASMA_INCLUDE_DIR) + +if (PLASMA_FOUND) + if (NOT Plasma_FIND_QUIETLY) + message(STATUS "Found Plasma: ${PLASMA_LIBRARIES}") + endif (NOT Plasma_FIND_QUIETLY) +else (PLASMA_FOUND) + if (Plasma_FIND_REQUIRED) + message(FATAL_ERROR "Could NOT find Plasma") + endif (Plasma_FIND_REQUIRED) +endif (PLASMA_FOUND) + +MARK_AS_ADVANCED(PLASMA_INCLUDE_DIR PLASMA_LIBRARIES) -- cgit v1.2.1 From 00db3e5a85410ec7cfba9b08c3976b5a217d5797 Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Tue, 5 Jun 2007 01:41:47 +0000 Subject: -/usr/lib, /usr/local/lib, /usr/include, /usr/local/include don't have to be listed explicitely, they are searched automatically -some more consisten lower casing and indentation Alex svn path=/trunk/KDE/kdelibs/; revision=671570 --- modules/FindPlasma.cmake | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) (limited to 'modules/FindPlasma.cmake') diff --git a/modules/FindPlasma.cmake b/modules/FindPlasma.cmake index 00e8a084..f256a453 100644 --- a/modules/FindPlasma.cmake +++ b/modules/FindPlasma.cmake @@ -14,18 +14,14 @@ if (PLASMA_INCLUDE_DIR) endif (PLASMA_INCLUDE_DIR) -FIND_PATH(PLASMA_INCLUDE_DIR NAMES plasma/kpanelapplet.h - PATHS - ${INCLUDE_INSTALL_DIR} - /usr/include - /usr/local/include +find_path(PLASMA_INCLUDE_DIR NAMES plasma/kpanelapplet.h + PATHS + ${INCLUDE_INSTALL_DIR} ) -FIND_LIBRARY(PLASMA_LIBRARIES NAMES plasma - PATHS - ${LIB_INSTALL_DIR} - /usr/lib - /usr/local/lib +find_library(PLASMA_LIBRARIES NAMES plasma + PATHS + ${LIB_INSTALL_DIR} ) if (PLASMA_LIBRARIES AND PLASMA_INCLUDE_DIR) set(PLASMA_FOUND TRUE) @@ -41,4 +37,4 @@ else (PLASMA_FOUND) endif (Plasma_FIND_REQUIRED) endif (PLASMA_FOUND) -MARK_AS_ADVANCED(PLASMA_INCLUDE_DIR PLASMA_LIBRARIES) +mark_as_advanced(PLASMA_INCLUDE_DIR PLASMA_LIBRARIES) -- cgit v1.2.1 From 509b5e18f3ba6f4c5ccd27470f48f89d7ec2fc5e Mon Sep 17 00:00:00 2001 From: Laurent Montel Date: Mon, 2 Jul 2007 12:44:24 +0000 Subject: Be silent if already found svn path=/trunk/KDE/kdelibs/; revision=682336 --- modules/FindPlasma.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'modules/FindPlasma.cmake') diff --git a/modules/FindPlasma.cmake b/modules/FindPlasma.cmake index f256a453..b0f1b377 100644 --- a/modules/FindPlasma.cmake +++ b/modules/FindPlasma.cmake @@ -8,10 +8,10 @@ # For details see the accompanying COPYING-CMAKE-SCRIPTS file. -if (PLASMA_INCLUDE_DIR) +if (PLASMA_INCLUDE_DIR AND PLASMA_LIBRARIES) # Already in cache, be silent - set(PLASMA_FOUND TRUE) -endif (PLASMA_INCLUDE_DIR) + set(Plasma_FIND_QUIETLY TRUE) +endif (PLASMA_INCLUDE_DIR AND PLASMA_LIBRARIES) find_path(PLASMA_INCLUDE_DIR NAMES plasma/kpanelapplet.h -- cgit v1.2.1 From ce182ad897473c2661139855e52ba0df9508b4bc Mon Sep 17 00:00:00 2001 From: Laurent Montel Date: Fri, 6 Jul 2007 13:18:36 +0000 Subject: Better to test on plasma.h, kpanelapplet.h is into kicker svn path=/trunk/KDE/kdelibs/; revision=684281 --- modules/FindPlasma.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/FindPlasma.cmake') diff --git a/modules/FindPlasma.cmake b/modules/FindPlasma.cmake index b0f1b377..8aa0d1c9 100644 --- a/modules/FindPlasma.cmake +++ b/modules/FindPlasma.cmake @@ -14,7 +14,7 @@ if (PLASMA_INCLUDE_DIR AND PLASMA_LIBRARIES) endif (PLASMA_INCLUDE_DIR AND PLASMA_LIBRARIES) -find_path(PLASMA_INCLUDE_DIR NAMES plasma/kpanelapplet.h +find_path(PLASMA_INCLUDE_DIR NAMES plasma/plasma.h PATHS ${INCLUDE_INSTALL_DIR} ) -- cgit v1.2.1 From fda274b64c61ae5a65153af082c40a454f696d1c Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Tue, 24 Jul 2007 15:02:12 +0000 Subject: PLASMA_LIBS not PLASMA_LIBRARIES svn path=/trunk/KDE/kdelibs/; revision=691895 --- modules/FindPlasma.cmake | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'modules/FindPlasma.cmake') diff --git a/modules/FindPlasma.cmake b/modules/FindPlasma.cmake index 8aa0d1c9..469779ce 100644 --- a/modules/FindPlasma.cmake +++ b/modules/FindPlasma.cmake @@ -8,10 +8,10 @@ # For details see the accompanying COPYING-CMAKE-SCRIPTS file. -if (PLASMA_INCLUDE_DIR AND PLASMA_LIBRARIES) +if (PLASMA_INCLUDE_DIR AND PLASMA_LIBS) # Already in cache, be silent set(Plasma_FIND_QUIETLY TRUE) -endif (PLASMA_INCLUDE_DIR AND PLASMA_LIBRARIES) +endif (PLASMA_INCLUDE_DIR AND PLASMA_LIBS) find_path(PLASMA_INCLUDE_DIR NAMES plasma/plasma.h @@ -19,17 +19,17 @@ find_path(PLASMA_INCLUDE_DIR NAMES plasma/plasma.h ${INCLUDE_INSTALL_DIR} ) -find_library(PLASMA_LIBRARIES NAMES plasma +find_library(PLASMA_LIBS NAMES plasma PATHS ${LIB_INSTALL_DIR} ) -if (PLASMA_LIBRARIES AND PLASMA_INCLUDE_DIR) +if (PLASMA_LIBS AND PLASMA_INCLUDE_DIR) set(PLASMA_FOUND TRUE) -endif (PLASMA_LIBRARIES AND PLASMA_INCLUDE_DIR) +endif (PLASMA_LIBS AND PLASMA_INCLUDE_DIR) if (PLASMA_FOUND) if (NOT Plasma_FIND_QUIETLY) - message(STATUS "Found Plasma: ${PLASMA_LIBRARIES}") + message(STATUS "Found Plasma: ${PLASMA_LIBS}") endif (NOT Plasma_FIND_QUIETLY) else (PLASMA_FOUND) if (Plasma_FIND_REQUIRED) @@ -37,4 +37,4 @@ else (PLASMA_FOUND) endif (Plasma_FIND_REQUIRED) endif (PLASMA_FOUND) -mark_as_advanced(PLASMA_INCLUDE_DIR PLASMA_LIBRARIES) +mark_as_advanced(PLASMA_INCLUDE_DIR PLASMA_LIBS) -- cgit v1.2.1 From 3d129ea54f483730f508125fd8fa7cccab2fbdfb Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Tue, 24 Jul 2007 22:11:46 +0000 Subject: PLASMA_OPENGL_FOUND svn path=/trunk/KDE/kdelibs/; revision=692033 --- modules/FindPlasma.cmake | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'modules/FindPlasma.cmake') diff --git a/modules/FindPlasma.cmake b/modules/FindPlasma.cmake index 469779ce..6779cd04 100644 --- a/modules/FindPlasma.cmake +++ b/modules/FindPlasma.cmake @@ -25,6 +25,10 @@ find_library(PLASMA_LIBS NAMES plasma ) if (PLASMA_LIBS AND PLASMA_INCLUDE_DIR) set(PLASMA_FOUND TRUE) + + find_file(PLASMA_OPENGL_FOUND glapplet.h + PATHS ${PLASMA_INCLUDE_DIR} + NO_DEFAULT_PATH) endif (PLASMA_LIBS AND PLASMA_INCLUDE_DIR) if (PLASMA_FOUND) -- cgit v1.2.1 From 0e6e562f6144cb145c893aaf81c200e9bc4d8b73 Mon Sep 17 00:00:00 2001 From: Laurent Montel Date: Sun, 26 Aug 2007 13:49:18 +0000 Subject: Use FIND_PACKAGE_HANDLE_STANDARD_ARGS svn path=/trunk/KDE/kdelibs/; revision=704860 --- modules/FindPlasma.cmake | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'modules/FindPlasma.cmake') diff --git a/modules/FindPlasma.cmake b/modules/FindPlasma.cmake index 6779cd04..ca7953df 100644 --- a/modules/FindPlasma.cmake +++ b/modules/FindPlasma.cmake @@ -23,22 +23,14 @@ find_library(PLASMA_LIBS NAMES plasma PATHS ${LIB_INSTALL_DIR} ) -if (PLASMA_LIBS AND PLASMA_INCLUDE_DIR) - set(PLASMA_FOUND TRUE) +include(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(Plasma DEFAULT_MSG PLASMA_LIBS PLASMA_INCLUDE_DIR ) + +if (PLASMA_FOUND) find_file(PLASMA_OPENGL_FOUND glapplet.h PATHS ${PLASMA_INCLUDE_DIR} NO_DEFAULT_PATH) -endif (PLASMA_LIBS AND PLASMA_INCLUDE_DIR) - -if (PLASMA_FOUND) - if (NOT Plasma_FIND_QUIETLY) - message(STATUS "Found Plasma: ${PLASMA_LIBS}") - endif (NOT Plasma_FIND_QUIETLY) -else (PLASMA_FOUND) - if (Plasma_FIND_REQUIRED) - message(FATAL_ERROR "Could NOT find Plasma") - endif (Plasma_FIND_REQUIRED) endif (PLASMA_FOUND) mark_as_advanced(PLASMA_INCLUDE_DIR PLASMA_LIBS) -- cgit v1.2.1 From a3d7b228cbd5a315dc7dc9f08e262fca196c2399 Mon Sep 17 00:00:00 2001 From: Harald Sitter Date: Mon, 3 Sep 2007 15:36:40 +0000 Subject: I tend to like stuff which is actually working -.- svn path=/trunk/KDE/kdelibs/; revision=708000 --- modules/FindPlasma.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/FindPlasma.cmake') diff --git a/modules/FindPlasma.cmake b/modules/FindPlasma.cmake index ca7953df..bafa6495 100644 --- a/modules/FindPlasma.cmake +++ b/modules/FindPlasma.cmake @@ -28,7 +28,7 @@ include(FindPackageHandleStandardArgs) FIND_PACKAGE_HANDLE_STANDARD_ARGS(Plasma DEFAULT_MSG PLASMA_LIBS PLASMA_INCLUDE_DIR ) if (PLASMA_FOUND) - find_file(PLASMA_OPENGL_FOUND glapplet.h + find_file(PLASMA_OPENGL_FOUND plasma/glapplet.h PATHS ${PLASMA_INCLUDE_DIR} NO_DEFAULT_PATH) endif (PLASMA_FOUND) -- cgit v1.2.1 From 9adf0d066e86313a2f52e90804412321dda8eb0e Mon Sep 17 00:00:00 2001 From: Aleix Pol Gonzalez Date: Fri, 4 Apr 2008 14:28:05 +0000 Subject: Fixed an strange behaviour on the plasma finder. svn path=/trunk/KDE/kdelibs/; revision=793596 --- modules/FindPlasma.cmake | 2 ++ 1 file changed, 2 insertions(+) (limited to 'modules/FindPlasma.cmake') diff --git a/modules/FindPlasma.cmake b/modules/FindPlasma.cmake index bafa6495..05a646b8 100644 --- a/modules/FindPlasma.cmake +++ b/modules/FindPlasma.cmake @@ -16,11 +16,13 @@ endif (PLASMA_INCLUDE_DIR AND PLASMA_LIBS) find_path(PLASMA_INCLUDE_DIR NAMES plasma/plasma.h PATHS + ${KDE4_INCLUDE_DIR} ${INCLUDE_INSTALL_DIR} ) find_library(PLASMA_LIBS NAMES plasma PATHS + ${KDE4_LIB_DIR} ${LIB_INSTALL_DIR} ) -- cgit v1.2.1 From c2384636b87fae03be2ffbe61ed836fe62891c07 Mon Sep 17 00:00:00 2001 From: Laurent Montel Date: Tue, 4 Nov 2008 20:08:05 +0000 Subject: Pino was right it's better to use KDE4_PLASMA_LIBS find method to keep compatibility Remove all requires to Plasma svn path=/trunk/KDE/kdelibs/; revision=880118 --- modules/FindPlasma.cmake | 30 +++++------------------------- 1 file changed, 5 insertions(+), 25 deletions(-) (limited to 'modules/FindPlasma.cmake') diff --git a/modules/FindPlasma.cmake b/modules/FindPlasma.cmake index 05a646b8..fc724342 100644 --- a/modules/FindPlasma.cmake +++ b/modules/FindPlasma.cmake @@ -8,31 +8,11 @@ # For details see the accompanying COPYING-CMAKE-SCRIPTS file. -if (PLASMA_INCLUDE_DIR AND PLASMA_LIBS) - # Already in cache, be silent - set(Plasma_FIND_QUIETLY TRUE) -endif (PLASMA_INCLUDE_DIR AND PLASMA_LIBS) +set(PLASMA_LIBS ${KDE4_PLASMA_LIBS} ) +set(PLASMA_INCLUDE_DIR ${KDE4_INCLUDE_DIR}) - -find_path(PLASMA_INCLUDE_DIR NAMES plasma/plasma.h - PATHS - ${KDE4_INCLUDE_DIR} - ${INCLUDE_INSTALL_DIR} -) - -find_library(PLASMA_LIBS NAMES plasma - PATHS - ${KDE4_LIB_DIR} - ${LIB_INSTALL_DIR} -) - -include(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(Plasma DEFAULT_MSG PLASMA_LIBS PLASMA_INCLUDE_DIR ) - -if (PLASMA_FOUND) - find_file(PLASMA_OPENGL_FOUND plasma/glapplet.h - PATHS ${PLASMA_INCLUDE_DIR} - NO_DEFAULT_PATH) -endif (PLASMA_FOUND) +find_file(PLASMA_OPENGL_FOUND plasma/glapplet.h + PATHS ${PLASMA_INCLUDE_DIR} + NO_DEFAULT_PATH) mark_as_advanced(PLASMA_INCLUDE_DIR PLASMA_LIBS) -- cgit v1.2.1 From 62abaeb6540872f26b143978bbd5ca3d865c7388 Mon Sep 17 00:00:00 2001 From: Laurent Montel Date: Wed, 5 Nov 2008 12:26:28 +0000 Subject: Minor fix svn path=/trunk/KDE/kdelibs/; revision=880412 --- modules/FindPlasma.cmake | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'modules/FindPlasma.cmake') diff --git a/modules/FindPlasma.cmake b/modules/FindPlasma.cmake index fc724342..e204fc76 100644 --- a/modules/FindPlasma.cmake +++ b/modules/FindPlasma.cmake @@ -1,7 +1,5 @@ -# cmake macro to see if we have Plasma from KDE workspace - # PLASMA_INCLUDE_DIR -# PLASMA_FOUND +# PLASMA_LIBS # Copyright (C) 2007 Brad Hards # # Redistribution and use is allowed according to the terms of the BSD license. -- cgit v1.2.1 From 5daae928ee7f18f2d8efb43ab7b9b0c731b9e4a0 Mon Sep 17 00:00:00 2001 From: Laurent Montel Date: Wed, 5 Nov 2008 14:32:59 +0000 Subject: fix PLASMA_FOUND svn path=/trunk/KDE/kdelibs/; revision=880466 --- modules/FindPlasma.cmake | 1 + 1 file changed, 1 insertion(+) (limited to 'modules/FindPlasma.cmake') diff --git a/modules/FindPlasma.cmake b/modules/FindPlasma.cmake index e204fc76..9346067b 100644 --- a/modules/FindPlasma.cmake +++ b/modules/FindPlasma.cmake @@ -8,6 +8,7 @@ set(PLASMA_LIBS ${KDE4_PLASMA_LIBS} ) set(PLASMA_INCLUDE_DIR ${KDE4_INCLUDE_DIR}) +set(PLASMA_FOUND true) find_file(PLASMA_OPENGL_FOUND plasma/glapplet.h PATHS ${PLASMA_INCLUDE_DIR} -- cgit v1.2.1 From 34bf652b09c5a929bf0a43a744fdd51153906020 Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Mon, 5 Jan 2009 18:36:26 +0000 Subject: -disable FindPlasma.cmake: it was broken, undocumented and since plasma didn't keep compatibility the cmake support for plasma also doesn't have to This file is not used by anything in trunk/KDE/ anymore. Alex svn path=/trunk/KDE/kdelibs/; revision=906186 --- modules/FindPlasma.cmake | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) (limited to 'modules/FindPlasma.cmake') diff --git a/modules/FindPlasma.cmake b/modules/FindPlasma.cmake index 9346067b..72d07c79 100644 --- a/modules/FindPlasma.cmake +++ b/modules/FindPlasma.cmake @@ -1,17 +1,20 @@ -# PLASMA_INCLUDE_DIR -# PLASMA_LIBS -# Copyright (C) 2007 Brad Hards -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - -set(PLASMA_LIBS ${KDE4_PLASMA_LIBS} ) -set(PLASMA_INCLUDE_DIR ${KDE4_INCLUDE_DIR}) -set(PLASMA_FOUND true) - -find_file(PLASMA_OPENGL_FOUND plasma/glapplet.h - PATHS ${PLASMA_INCLUDE_DIR} - NO_DEFAULT_PATH) +# FindPlasma.cmake was part of KDE 4.1, but Plasma itself didn't guarantee compatibility before 4.2, +# so anything which relied on Plasma < 4.2 is broken anyway with KDE 4.2. +# So since the package itself didn't keep compatibility, it doesn't make sense to provide +# this file just to keep compatibility for the cmake part, this doesn't help anybody. +# Especially now that plasma is part of kdelibs and as such the variables required +# for using plasma are set by FindKDE4Internal.cmake. +# This file is not used anywhere in trunk/KDE/ anymore, 3rd party projects get a +# error message which tells them what to do, so we should be fine. +# Alex +# -mark_as_advanced(PLASMA_INCLUDE_DIR PLASMA_LIBS) +message(FATAL_ERROR "FindPlasma.cmake is deprecated. Now with KDE 4.2 Plasma is part of kdelibs and automatically found using find_package(KDE4) instead. +Replace the variables previously coming from FindPlasma.cmake as follows: +PLASMA_OPENGL_FOUND -> KDE4_PLASMA_OPENGL_FOUND +PLASMA_LIBS -> KDE4_PLASMA_LIBS +PLASMA_INCLUDE_DIR -> KDE4_INCLUDE_DIR or KDE4_INCLUDES, should be already set anyway +PLASMA_FOUND -> nothing, it's always there if KDE4, version 4.2 or newer has been found. +If you see this error message in a module within KDE/, update it from svn, it has been fixed already. +") -- cgit v1.2.1