Blob Blame History Raw
From 24441a94cf79b28c6a8d91ff0c9622f30a9487ae Mon Sep 17 00:00:00 2001
From: Benjamin Reed <ranger@befunk.com>
Date: Wed, 27 May 2009 19:54:45 +0000
Subject: [PATCH 14/33] first attempt at cpack-ing a KDE package -- works on
 OSX

svn path=/trunk/kdesupport/automoc/; revision=973773
---
 CMakeLists.txt    | 14 ++++++++++++++
 cpack/LICENSE.txt |  8 ++++++++
 cpack/README.txt  |  3 +++
 3 files changed, 25 insertions(+)
 create mode 100644 cpack/LICENSE.txt
 create mode 100644 cpack/README.txt

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 16bfc92..570d6a4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -13,6 +13,20 @@ endif (CMAKE_COMPILER_IS_GNUCXX OR CMAKE_C_COMPILER MATCHES "icc")
 # set the current version number
 include(Automoc4Version.cmake)
 
+set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Automatic moc for Qt 4 packages")
+set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/cpack/README.txt")
+set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/cpack/LICENSE.txt")
+set(CPACK_PACKAGE_VERSION ${AUTOMOC4_VERSION})
+set(CPACK_PACKAGE_VERSION_MAJOR ${AUTOMOC4_VERSION_MAJOR})
+set(CPACK_PACKAGE_VERSION_MINOR ${AUTOMOC4_VERSION_MINOR})
+set(CPACK_PACKAGE_VERSION_PATCH ${AUTOMOC4_VERSION_PATCH})
+set(CPACK_SET_DESTDIR ON)
+if (APPLE)
+   set(CPACK_PACKAGE_RELOCATABLE OFF)
+endif (APPLE)
+
+include(CPack)
+
 configure_file(automoc4_config.h.in ${CMAKE_CURRENT_BINARY_DIR}/automoc4_config.h)
 
 # Always include srcdir and builddir in include path
diff --git a/cpack/LICENSE.txt b/cpack/LICENSE.txt
new file mode 100644
index 0000000..b650661
--- /dev/null
+++ b/cpack/LICENSE.txt
@@ -0,0 +1,8 @@
+Copyright (C) 2007 Matthias Kretz <kretz@kde.org>
+
+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 above copyright notice, this list of conditions and the following disclaimer.
+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.
+
+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/cpack/README.txt b/cpack/README.txt
new file mode 100644
index 0000000..974e1fc
--- /dev/null
+++ b/cpack/README.txt
@@ -0,0 +1,3 @@
+This package contains the automoc4 binary which is used to run moc on the right binaries in a Qt 4 or KDE 4 application.
+
+Moc is the meta object compiler which is a much used tool when using the Qt toolkit.
-- 
2.4.3