Commit 79e255a7 authored by David Cole's avatar David Cole

ENH: Apply patch for feature request #7170. Thanks to Tim Shead for contributing...

parent edaa6d3a
......@@ -114,6 +114,7 @@ if(NOT CPACK_GENERATOR)
option(CPACK_BINARY_CYGWIN "Enable to build Cygwin binary packages" ON)
else(CYGWIN)
if(APPLE)
option(CPACK_BINARY_BUNDLE "Enable to build OSX bundles" OFF)
option(CPACK_BINARY_PACKAGEMAKER "Enable to build PackageMaker packages" ON)
option(CPACK_BINARY_OSXX11 "Enable to build OSX X11 packages" OFF)
else(APPLE)
......@@ -131,6 +132,7 @@ if(NOT CPACK_GENERATOR)
option(CPACK_BINARY_ZIP "Enable to build ZIP packages" ON)
endif(UNIX)
cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_BUNDLE Bundle)
cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_PACKAGEMAKER PackageMaker)
cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_OSXX11 OSXX11)
cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_CYGWIN CygwinBinary)
......@@ -171,7 +173,7 @@ endif(NOT CPACK_SOURCE_GENERATOR)
mark_as_advanced(CPACK_BINARY_CYGWIN CPACK_BINARY_PACKAGEMAKER CPACK_BINARY_OSXX11
CPACK_BINARY_STGZ CPACK_BINARY_TGZ CPACK_BINARY_TBZ2
CPACK_BINARY_DEB CPACK_BINARY_RPM CPACK_BINARY_TZ
CPACK_BINARY_NSIS CPACK_BINARY_ZIP
CPACK_BINARY_NSIS CPACK_BINARY_ZIP CPACK_BINARY_BUNDLE
CPACK_SOURCE_CYGWIN CPACK_SOURCE_TBZ2 CPACK_SOURCE_TGZ
CPACK_SOURCE_TZ CPACK_SOURCE_ZIP)
......
......@@ -374,6 +374,7 @@ ENDIF(UNIX)
IF(APPLE)
SET(CPACK_SRCS ${CPACK_SRCS}
CPack/cmCPackBundleGenerator.cxx
CPack/cmCPackOSXX11Generator.cxx
CPack/cmCPackPackageMakerGenerator.cxx
)
......
This diff is collapsed.
/*=========================================================================
Program: CMake - Cross-Platform Makefile Generator
Module: $RCSfile$
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) 2002 Kitware, Inc. All rights reserved.
See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#ifndef cmCPackBundleGenerator_h
#define cmCPackBundleGenerator_h
#include "cmCPackGenerator.h"
/** \class cmCPackBundleGenerator
* \brief A generator for OSX bundles
*
* Based on Gimp.app
*/
class cmCPackBundleGenerator : public cmCPackGenerator
{
public:
cmCPackTypeMacro(cmCPackBundleGenerator, cmCPackGenerator);
cmCPackBundleGenerator();
virtual ~cmCPackBundleGenerator();
protected:
virtual int InitializeInternal();
virtual const char* GetOutputExtension();
virtual const char* GetPackagingInstallPrefix();
int CompressFiles(const char* outFileName, const char* toplevel,
const std::vector<std::string>& files);
bool CopyFile(cmOStringStream& source, cmOStringStream& target);
bool RunCommand(cmOStringStream& command);
std::string InstallPrefix;
};
#endif
......@@ -25,6 +25,7 @@
#include "cmCPackSTGZGenerator.h"
#include "cmCPackNSISGenerator.h"
#ifdef __APPLE__
# include "cmCPackBundleGenerator.h"
# include "cmCPackPackageMakerGenerator.h"
# include "cmCPackOSXX11Generator.h"
#endif
......@@ -66,6 +67,8 @@ cmCPackGeneratorFactory::cmCPackGeneratorFactory()
this->RegisterGenerator("TZ", "Tar Compress compression",
cmCPackTarCompressGenerator::CreateGenerator);
#ifdef __APPLE__
this->RegisterGenerator("Bundle", "Mac OSX bundle",
cmCPackBundleGenerator::CreateGenerator);
this->RegisterGenerator("PackageMaker", "Mac OSX Package Maker installer",
cmCPackPackageMakerGenerator::CreateGenerator);
this->RegisterGenerator("OSXX11", "Mac OSX X11 bundle",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment