Rex Dieter 29094f
From 24441a94cf79b28c6a8d91ff0c9622f30a9487ae Mon Sep 17 00:00:00 2001
Rex Dieter 29094f
From: Benjamin Reed <ranger@befunk.com>
Rex Dieter 29094f
Date: Wed, 27 May 2009 19:54:45 +0000
Rex Dieter 29094f
Subject: [PATCH 14/33] first attempt at cpack-ing a KDE package -- works on
Rex Dieter 29094f
 OSX
Rex Dieter 29094f
Rex Dieter 29094f
svn path=/trunk/kdesupport/automoc/; revision=973773
Rex Dieter 29094f
---
Rex Dieter 29094f
 CMakeLists.txt    | 14 ++++++++++++++
Rex Dieter 29094f
 cpack/LICENSE.txt |  8 ++++++++
Rex Dieter 29094f
 cpack/README.txt  |  3 +++
Rex Dieter 29094f
 3 files changed, 25 insertions(+)
Rex Dieter 29094f
 create mode 100644 cpack/LICENSE.txt
Rex Dieter 29094f
 create mode 100644 cpack/README.txt
Rex Dieter 29094f
Rex Dieter 29094f
diff --git a/CMakeLists.txt b/CMakeLists.txt
Rex Dieter 29094f
index 16bfc92..570d6a4 100644
Rex Dieter 29094f
--- a/CMakeLists.txt
Rex Dieter 29094f
+++ b/CMakeLists.txt
Rex Dieter 29094f
@@ -13,6 +13,20 @@ endif (CMAKE_COMPILER_IS_GNUCXX OR CMAKE_C_COMPILER MATCHES "icc")
Rex Dieter 29094f
 # set the current version number
Rex Dieter 29094f
 include(Automoc4Version.cmake)
Rex Dieter 29094f
 
Rex Dieter 29094f
+set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Automatic moc for Qt 4 packages")
Rex Dieter 29094f
+set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/cpack/README.txt")
Rex Dieter 29094f
+set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/cpack/LICENSE.txt")
Rex Dieter 29094f
+set(CPACK_PACKAGE_VERSION ${AUTOMOC4_VERSION})
Rex Dieter 29094f
+set(CPACK_PACKAGE_VERSION_MAJOR ${AUTOMOC4_VERSION_MAJOR})
Rex Dieter 29094f
+set(CPACK_PACKAGE_VERSION_MINOR ${AUTOMOC4_VERSION_MINOR})
Rex Dieter 29094f
+set(CPACK_PACKAGE_VERSION_PATCH ${AUTOMOC4_VERSION_PATCH})
Rex Dieter 29094f
+set(CPACK_SET_DESTDIR ON)
Rex Dieter 29094f
+if (APPLE)
Rex Dieter 29094f
+   set(CPACK_PACKAGE_RELOCATABLE OFF)
Rex Dieter 29094f
+endif (APPLE)
Rex Dieter 29094f
+
Rex Dieter 29094f
+include(CPack)
Rex Dieter 29094f
+
Rex Dieter 29094f
 configure_file(automoc4_config.h.in ${CMAKE_CURRENT_BINARY_DIR}/automoc4_config.h)
Rex Dieter 29094f
 
Rex Dieter 29094f
 # Always include srcdir and builddir in include path
Rex Dieter 29094f
diff --git a/cpack/LICENSE.txt b/cpack/LICENSE.txt
Rex Dieter 29094f
new file mode 100644
Rex Dieter 29094f
index 0000000..b650661
Rex Dieter 29094f
--- /dev/null
Rex Dieter 29094f
+++ b/cpack/LICENSE.txt
Rex Dieter 29094f
@@ -0,0 +1,8 @@
Rex Dieter 29094f
+Copyright (C) 2007 Matthias Kretz <kretz@kde.org>
Rex Dieter 29094f
+
Rex Dieter 29094f
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Rex Dieter 29094f
+
Rex Dieter 29094f
+1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Rex Dieter 29094f
+2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
Rex Dieter 29094f
+
Rex Dieter 29094f
+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.
Rex Dieter 29094f
diff --git a/cpack/README.txt b/cpack/README.txt
Rex Dieter 29094f
new file mode 100644
Rex Dieter 29094f
index 0000000..974e1fc
Rex Dieter 29094f
--- /dev/null
Rex Dieter 29094f
+++ b/cpack/README.txt
Rex Dieter 29094f
@@ -0,0 +1,3 @@
Rex Dieter 29094f
+This package contains the automoc4 binary which is used to run moc on the right binaries in a Qt 4 or KDE 4 application.
Rex Dieter 29094f
+
Rex Dieter 29094f
+Moc is the meta object compiler which is a much used tool when using the Qt toolkit.
Rex Dieter 29094f
-- 
Rex Dieter 29094f
2.4.3
Rex Dieter 29094f