generated-scripts: use CMAKE_CURRENT_LIST_DIR where possible

This commit is contained in:
Ben Boeckel
2022-04-20 14:08:05 -04:00
parent a1a7f62918
commit 4085128586
+1 -2
View File
@@ -253,8 +253,7 @@ void cmExportInstallFileGenerator::LoadConfigFiles(std::ostream& os)
// Now load per-configuration properties for them.
/* clang-format off */
os << "# Load information for each installed configuration.\n"
<< "get_filename_component(_DIR \"${CMAKE_CURRENT_LIST_FILE}\" PATH)\n"
<< "file(GLOB _cmake_config_files \"${_DIR}/"
<< "file(GLOB _cmake_config_files \"${CMAKE_CURRENT_LIST_DIR}/"
<< this->GetConfigImportFileGlob() << "\")\n"
<< "foreach(_cmake_config_file IN LISTS _cmake_config_files)\n"
<< " include(\"${_cmake_config_file}\")\n"