diff options
author | Alex Neundorf <neundorf@kde.org> | 2012-09-23 18:40:40 +0200 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2012-09-30 10:26:54 -0400 |
commit | 6f50a04cc1c4584472f850e06daad7ae20af45c4 (patch) | |
tree | 4ef4a21ed8131c8b84df082cd40ce09b1ab0364e /Source/cmFindPackageCommand.cxx | |
parent | 0cfd055acda3543d66690b5e92d8ee7c20e0654f (diff) | |
download | cmake-6f50a04cc1c4584472f850e06daad7ae20af45c4.tar.gz |
exports: define a CMAKE_FIND_PACKAGE_NAME var set by find_package()
This way the name of the searched package can be accessed in find-modules,
config-files and more importantly in generated target export files.
This is now used when a target export file detects that a required
target does not exist.
Alex
Diffstat (limited to 'Source/cmFindPackageCommand.cxx')
-rw-r--r-- | Source/cmFindPackageCommand.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx index c20941aaaa..470cecabec 100644 --- a/Source/cmFindPackageCommand.cxx +++ b/Source/cmFindPackageCommand.cxx @@ -840,6 +840,8 @@ bool cmFindPackageCommand //---------------------------------------------------------------------------- void cmFindPackageCommand::SetModuleVariables(const std::string& components) { + this->AddFindDefinition("CMAKE_FIND_PACKAGE_NAME", this->Name.c_str()); + // Store the list of components. std::string components_var = this->Name + "_FIND_COMPONENTS"; this->AddFindDefinition(components_var.c_str(), components.c_str()); |