diff options
author | Brad King <brad.king@kitware.com> | 2009-09-01 18:04:53 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2009-09-01 18:04:53 (GMT) |
commit | 16ce84b06712a8f859a352804013805f8f8435c4 (patch) | |
tree | ca5e381f344d1e2acf466c473c70e5427100d058 /Source/cmExportCommand.h | |
parent | ed0650f6ae10911092adc25373b9c61724192124 (diff) | |
download | CMake-16ce84b06712a8f859a352804013805f8f8435c4.zip CMake-16ce84b06712a8f859a352804013805f8f8435c4.tar.gz CMake-16ce84b06712a8f859a352804013805f8f8435c4.tar.bz2 |
Teach export(PACKAGE) to fill the package registry
We define the export(PACKAGE) command mode to store the location of the
build tree in the user package registry. This will help find_package
locate the package in the build tree. It simplies user workflow for
manually building a series of dependent projects.
Diffstat (limited to 'Source/cmExportCommand.h')
-rw-r--r-- | Source/cmExportCommand.h | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/Source/cmExportCommand.h b/Source/cmExportCommand.h index 22a93f3..69652cf 100644 --- a/Source/cmExportCommand.h +++ b/Source/cmExportCommand.h @@ -84,7 +84,19 @@ public: "The file created by this command is specific to the build tree and " "should never be installed. " "See the install(EXPORT) command to export targets from an " - "installation tree."; + "installation tree." + "\n" + " export(PACKAGE <name>)\n" + "Store the current build directory in the CMake user package registry " + "for package <name>. " + "The find_package command may consider the directory while searching " + "for package <name>. " + "This helps dependent projects find and use a package from the " + "current project's build tree without help from the user. " + "Note that the entry in the package registry that this command " + "creates works only in conjunction with a package configuration " + "file (<name>Config.cmake) that works with the build tree." + ; } cmTypeMacro(cmExportCommand, cmCommand); @@ -98,6 +110,14 @@ private: friend class cmExportBuildFileGenerator; std::string ErrorMessage; + + bool HandlePackage(std::vector<std::string> const& args); + void StorePackageRegistryWin(std::string const& package, + const char* content, const char* hash); + void StorePackageRegistryDir(std::string const& package, + const char* content, const char* hash); + void ReportRegistryError(std::string const& msg, std::string const& key, + long err); }; |