diff options
author | Brad King <brad.king@kitware.com> | 2009-01-07 19:16:28 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2009-01-07 19:16:28 (GMT) |
commit | 254782ed7607db23bf65acc780f6c014eb16985c (patch) | |
tree | bbe597fb1046af823316b8730366a15456251e9c /Source/cmExportInstallFileGenerator.cxx | |
parent | 377bebb9101b2bcf67e92143243fe26dba8abf6d (diff) | |
download | CMake-254782ed7607db23bf65acc780f6c014eb16985c.zip CMake-254782ed7607db23bf65acc780f6c014eb16985c.tar.gz CMake-254782ed7607db23bf65acc780f6c014eb16985c.tar.bz2 |
ENH: Refactor computation of import file glob
New method cmExportInstallFileGenerator::GetConfigImportFileGlob
computes the globbing expression that an installed export file uses to
load its per-configuration support files.
Diffstat (limited to 'Source/cmExportInstallFileGenerator.cxx')
-rw-r--r-- | Source/cmExportInstallFileGenerator.cxx | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/Source/cmExportInstallFileGenerator.cxx b/Source/cmExportInstallFileGenerator.cxx index c71336a..532444f 100644 --- a/Source/cmExportInstallFileGenerator.cxx +++ b/Source/cmExportInstallFileGenerator.cxx @@ -28,6 +28,15 @@ cmExportInstallFileGenerator } //---------------------------------------------------------------------------- +std::string cmExportInstallFileGenerator::GetConfigImportFileGlob() +{ + std::string glob = this->FileBase; + glob += "-*"; + glob += this->FileExt; + return glob; +} + +//---------------------------------------------------------------------------- bool cmExportInstallFileGenerator::GenerateMainFile(std::ostream& os) { // Create all the imported targets. @@ -55,7 +64,7 @@ bool cmExportInstallFileGenerator::GenerateMainFile(std::ostream& os) os << "# Load information for each installed configuration.\n" << "GET_FILENAME_COMPONENT(_DIR \"${CMAKE_CURRENT_LIST_FILE}\" PATH)\n" << "FILE(GLOB CONFIG_FILES \"${_DIR}/" - << this->FileBase << "-*" << this->FileExt << "\")\n" + << this->GetConfigImportFileGlob() << "\")\n" << "FOREACH(f ${CONFIG_FILES})\n" << " INCLUDE(${f})\n" << "ENDFOREACH(f)\n" |