Skip to content

Commit 604ba83

Browse files
committed
fix(build): use absolute system archiver paths
2 parents 8bcd746 + c62291b commit 604ba83

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/commands/BuildCommand.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1150,6 +1150,14 @@ namespace vix::commands::BuildCommand
11501150
vars.emplace_back("CMAKE_BUILD_TYPE", p.buildType);
11511151
vars.emplace_back("CMAKE_EXPORT_COMPILE_COMMANDS", "ON");
11521152

1153+
#ifndef _WIN32
1154+
if (util::file_exists("/usr/bin/ar"))
1155+
vars.emplace_back("CMAKE_AR", "/usr/bin/ar");
1156+
1157+
if (util::file_exists("/usr/bin/ranlib"))
1158+
vars.emplace_back("CMAKE_RANLIB", "/usr/bin/ranlib");
1159+
#endif
1160+
11531161
if (opt.warningCheck)
11541162
{
11551163
const std::string cxxCompiler = warning_check_cxx_compiler();

0 commit comments

Comments
 (0)