summaryrefslogtreecommitdiffstats
path: root/Source/CPack
diff options
context:
space:
mode:
authorNils Gladitz <nilsgladitz@gmail.com>2014-05-15 17:12:40 (GMT)
committerBrad King <brad.king@kitware.com>2014-05-28 16:28:18 (GMT)
commit15a8af21e8bd8354dfff2063e01f695f85efdeb8 (patch)
treeb7d98cab3ba63f61074a4f63a250934f0294826a /Source/CPack
parent032961c6ac81d82270a7b1986935111aa5e32a56 (diff)
downloadCMake-15a8af21e8bd8354dfff2063e01f695f85efdeb8.zip
CMake-15a8af21e8bd8354dfff2063e01f695f85efdeb8.tar.gz
CMake-15a8af21e8bd8354dfff2063e01f695f85efdeb8.tar.bz2
Add an "installed file" property scope
Teach set_property and get_property an "INSTALL" property type to be associated with install-tree file paths. Make the properties available to CPack for use during packaging. Add a "prop_inst" Sphinx domain object type for documentation of such properties.
Diffstat (limited to 'Source/CPack')
-rw-r--r--Source/CPack/cmCPackGenerator.cxx8
-rw-r--r--Source/CPack/cmCPackGenerator.h3
-rw-r--r--Source/CPack/cpack.cxx9
3 files changed, 16 insertions, 4 deletions
diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx
index 9cdf5aa..91f92c5 100644
--- a/Source/CPack/cmCPackGenerator.cxx
+++ b/Source/CPack/cmCPackGenerator.cxx
@@ -1314,6 +1314,14 @@ int cmCPackGenerator::CleanTemporaryDirectory()
}
//----------------------------------------------------------------------
+cmInstalledFile const* cmCPackGenerator::GetInstalledFile(
+ std::string const& name) const
+{
+ cmake const* cm = this->MakefileMap->GetCMakeInstance();
+ return cm->GetInstalledFile(name);
+}
+
+//----------------------------------------------------------------------
int cmCPackGenerator::PrepareGroupingKind()
{
// find a component package method specified by the user
diff --git a/Source/CPack/cmCPackGenerator.h b/Source/CPack/cmCPackGenerator.h
index e780f0e..ed89b53 100644
--- a/Source/CPack/cmCPackGenerator.h
+++ b/Source/CPack/cmCPackGenerator.h
@@ -47,6 +47,7 @@
class cmMakefile;
class cmCPackLog;
+class cmInstalledFile;
/** \class cmCPackGenerator
* \brief A superclass of all CPack Generators
@@ -129,6 +130,8 @@ protected:
int CleanTemporaryDirectory();
+ cmInstalledFile const* GetInstalledFile(std::string const& name) const;
+
virtual const char* GetOutputExtension() { return ".cpack"; }
virtual const char* GetOutputPostfix() { return 0; }
diff --git a/Source/CPack/cpack.cxx b/Source/CPack/cpack.cxx
index 9eabdca..2aa5991 100644
--- a/Source/CPack/cpack.cxx
+++ b/Source/CPack/cpack.cxx
@@ -257,6 +257,11 @@ int main (int argc, char const* const* argv)
return 1;
}
+ if ( !cpackBuildConfig.empty() )
+ {
+ globalMF->AddDefinition("CPACK_BUILD_CONFIG", cpackBuildConfig.c_str());
+ }
+
if ( cmSystemTools::FileExists(cpackConfigFile.c_str()) )
{
cpackConfigFile =
@@ -317,10 +322,6 @@ int main (int argc, char const* const* argv)
cpackProjectDirectory.c_str());
}
}
- if ( !cpackBuildConfig.empty() )
- {
- globalMF->AddDefinition("CPACK_BUILD_CONFIG", cpackBuildConfig.c_str());
- }
cpackDefinitions::MapType::iterator cdit;
for ( cdit = definitions.Map.begin();
cdit != definitions.Map.end();