Skip to content

Commit

Permalink
try externals/nitro too
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Smith authored and Dan Smith committed Aug 29, 2022
1 parent 55a1026 commit 3f35004
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions externals/nitro/modules/c++/nitf/source/UnitTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -240,10 +240,15 @@ std::string nitf::Test::buildPluginsDir(const std::string& dir)
if (!is_directory(plugins))
{
// Developers might not set things up for "cmake --install ."
plugins = buildDir_.parent_path() / "modules" / "c" / dir;
static const auto modules_c_dir = std::filesystem::path("modules") / "c" / dir;
plugins = buildDir_.parent_path() / modules_c_dir;
if (!is_directory(plugins))
{
plugins = buildDir_.parent_path() / "externals" / "nitro" / modules_c_dir;
if (!is_directory(plugins))
{
throw std::logic_error("Can't find 'plugins' directory: " + plugins.string());
}
}
}
return plugins.string();
Expand All @@ -259,4 +264,4 @@ fs::path nitf::Test::findInputFile(const fs::path& inputFile)
{
const auto root = find_NITRO_root();
return root / inputFile;
}
}

0 comments on commit 3f35004

Please sign in to comment.