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 cmOSXBundleGenerator(cmTarget* target,
29 const char* configName);
31 // create an app bundle at a given root, and return
32 // the directory within the bundle that contains the executable
33 void CreateAppBundle(const std::string& targetName, std::string& root);
35 // create a framework at a given root
36 void CreateFramework(const std::string& targetName,
37 const std::string& root);
39 // create a cf bundle at a given root
40 void CreateCFBundle(const std::string& targetName,
41 const std::string& root);
43 struct MacOSXContentGeneratorType
45 virtual ~MacOSXContentGeneratorType() {}
46 virtual void operator()(cmSourceFile& source, const char* pkgloc) = 0;
49 void GenerateMacOSXContentStatements(
50 std::vector<cmSourceFile*> const& sources,
51 MacOSXContentGeneratorType* generator);
52 std::string InitMacOSXContentDirectory(const char* pkgloc);
54 void SetMacContentFolders(std::set<cmStdString>* macContentFolders)
55 { this->MacContentFolders = macContentFolders; }
63 cmLocalGenerator* LocalGenerator;
64 const char* ConfigName;
65 std::set<cmStdString>* MacContentFolders;