1 /*============================================================================
2 CMake - Cross Platform Makefile Generator
3 Copyright 2012 Nicolas Despres <nicolas.despres@gmail.com>
5 Distributed under the OSI-approved BSD License (the "License");
6 see accompanying file Copyright.txt for details.
8 This software is distributed WITHOUT ANY WARRANTY; without even the
9 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10 See the License for more information.
11 ============================================================================*/
12 #ifndef cmOSXBundleGenerator_h
13 #define cmOSXBundleGenerator_h
15 #include "cmStandardIncludes.h"
16 #include "cmSourceFile.h"
23 class cmLocalGenerator;
25 class cmOSXBundleGenerator
28 static void PrepareTargetProperties(cmTarget* target);
30 cmOSXBundleGenerator(cmTarget* target,
31 std::string targetNameOut,
32 const char* configName);
34 void CreateAppBundle(std::string& targetName, std::string& outpath);
35 void CreateFramework(std::string const& targetName);
36 void CreateCFBundle(std::string& targetName, std::string& outpath);
38 struct MacOSXContentGeneratorType
40 virtual ~MacOSXContentGeneratorType() {}
41 virtual void operator()(cmSourceFile& source, const char* pkgloc) = 0;
44 void GenerateMacOSXContentStatements(
45 std::vector<cmSourceFile*> const& sources,
46 MacOSXContentGeneratorType* generator);
47 std::string InitMacOSXContentDirectory(const char* pkgloc);
49 std::string GetMacContentDirectory() const
50 { return this->MacContentDirectory; }
51 std::string GetFrameworkVersion() const
52 { return this->FrameworkVersion; }
53 void SetMacContentFolders(std::set<cmStdString>* macContentFolders)
54 { this->MacContentFolders = macContentFolders; }
62 cmLocalGenerator* LocalGenerator;
63 std::string TargetNameOut;
64 const char* ConfigName;
65 std::string MacContentDirectory;
66 std::string FrameworkVersion;
67 std::set<cmStdString>* MacContentFolders;