summaryrefslogtreecommitdiff
path: root/lib/modules
diff options
context:
space:
mode:
authorDaniel Nicoletti <mirttex85-pk@yahoo.com.br>2008-06-28 20:03:24 -0300
committerDaniel Nicoletti <mirttex85-pk@yahoo.com.br>2008-06-28 20:03:24 -0300
commitffe2c8d6fe8a3dc2908e4afb305d46cec566275e (patch)
treeba843dee4befdba4940d7269b9cdc20f101d39e3 /lib/modules
parent2aa2ae3428d9730fe55215c94ad3d090e470a81a (diff)
The AddRm gui is almost there,
but everything is broken cause the lib swicthed to cmake Fixed install/remove crash and fixed the location of FindQPackageKit
Diffstat (limited to 'lib/modules')
-rw-r--r--lib/modules/CMakeLists.txt17
-rw-r--r--lib/modules/FindQPackageKit.cmake40
2 files changed, 57 insertions, 0 deletions
diff --git a/lib/modules/CMakeLists.txt b/lib/modules/CMakeLists.txt
new file mode 100644
index 0000000..1f8b0a2
--- /dev/null
+++ b/lib/modules/CMakeLists.txt
@@ -0,0 +1,17 @@
+
+## install the cmake files
+
+file(GLOB cmakeFiles "${CMAKE_CURRENT_SOURCE_DIR}/*.cmake")
+# FIXME remove safely /usr/share
+set(module_install_dir ${DATA_INSTALL_DIR}/usr/share/cmake/modules )
+
+install( FILES ${cmakeFiles}
+ DESTINATION ${module_install_dir} )
+
+
+# with cmake 2.6 and above create and install a man page for the kdelibs cmake modules
+# (cmake 2.4 doesn't support creating documentation for cmake modules in custom directories)
+# if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER "2.5")
+# add_custom_target(KDECMakeModulesManPage ALL COMMAND ${CMAKE_COMMAND} -DCMAKE_MODULE_PATH=${CMAKE_CURRENT_SOURCE_DIR} --help-custom-modules ${CMAKE_CURRENT_BINARY_DIR}/kdecmake.1)
+# install(FILES ${CMAKE_CURRENT_BINARY_DIR}/kdecmake.1 DESTINATION "${MAN_INSTALL_DIR}/man1")
+# endif("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER "2.5")
diff --git a/lib/modules/FindQPackageKit.cmake b/lib/modules/FindQPackageKit.cmake
new file mode 100644
index 0000000..f5d3e29
--- /dev/null
+++ b/lib/modules/FindQPackageKit.cmake
@@ -0,0 +1,40 @@
+# - Try to find QPackageKit
+# Once done this will define
+#
+# QPACKAGEKIT_FOUND - system has QPackageKit
+# QPACKAGEKIT_INCLUDE_DIR - the QPackageKit include directory
+# QPACKAGEKIT_LIBS - Link these to use QPackageKit
+# QPACKAGEKIT_DEFINITIONS - Compiler switches required for using QPackageKit
+
+# Copyright (c) 2008, Adrien Bustany, <madcat@mymadcat.com>
+#
+# Redistribution and use is allowed according to the terms of the GPLv3+ license.
+# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+
+IF (QPACKAGEKIT_INCLUDE_DIR AND QPACKAGEKIT_LIBS)
+ SET(QPACKAGEKIT_FIND_QUIETLY TRUE)
+ENDIF (QPACKAGEKIT_INCLUDE_DIR AND QPACKAGEKIT_LIBS)
+
+FIND_PATH(QPACKAGEKIT_INCLUDE_DIR QPackageKit)
+FIND_LIBRARY(QPACKAGEKIT_LIBS NAMES packagekit-qt)
+
+IF (QPACKAGEKIT_INCLUDE_DIR AND QPACKAGEKIT_LIBS)
+ SET(QPACKAGEKIT_FOUND TRUE)
+ELSE (QPACKAGEKIT_INCLUDE_DIR AND QPACKAGEKIT_LIBS)
+ SET(QPACKAGEKIT_FOUND FALSE)
+ENDIF (QPACKAGEKIT_INCLUDE_DIR AND QPACKAGEKIT_LIBS)
+
+SET(QPACKAGEKIT_INCLUDE_DIR QPACKAGEKIT_INCLUDE_DIR/packagekit-qt)
+
+IF (QPACKAGEKIT_FOUND)
+ IF (NOT QPACKAGEKIT_FIND_QUIETLY)
+ MESSAGE(STATUS "Found QPackageKit: ${QPACKAGEKIT_INCLUDE_DIR}")
+ ENDIF (NOT QPACKAGEKIT_FIND_QUIETLY)
+ELSE (QPACKAGEKIT_FOUND)
+ IF (QPACKAGEKIT_FIND_REQUIRED)
+ MESSAGE(FATAL_ERROR "Could NOT find QPackageKit")
+ ENDIF (QPACKAGEKIT_FIND_REQUIRED)
+ENDIF (QPACKAGEKIT_FOUND)
+
+MARK_AS_ADVANCED(QPACKAGEKIT_INCLUDE_DIR QPACKAGEKIT_LIBS)
+