|
|
|
@ -113,7 +113,7 @@ int generate_cmake(const char *path) {
|
|
|
|
|
ss << "\n";
|
|
|
|
|
|
|
|
|
|
ss << "# Regenerate CMakeLists.txt file when necessary\n";
|
|
|
|
|
ss << "include(cmkr.cmake OPTIONAL RESULT_VARIABLE CMKR_INCLUDE_RESULT)\n";
|
|
|
|
|
ss << "include(cmkr.cmake OPTIONAL RESULT_VARIABLE CMKR_INCLUDE_RESULT)\n\n";
|
|
|
|
|
ss << "if(CMKR_INCLUDE_RESULT)\n";
|
|
|
|
|
ss << "\tcmkr()\n";
|
|
|
|
|
ss << "endif()\n";
|
|
|
|
@ -225,12 +225,17 @@ int generate_cmake(const char *path) {
|
|
|
|
|
} else {
|
|
|
|
|
set_val = std::get<bool>(set.val) ? "ON" : "OFF";
|
|
|
|
|
}
|
|
|
|
|
ss << "set(" << set.name << " " << set_val;;
|
|
|
|
|
ss << "set(" << set.name << " " << set_val;
|
|
|
|
|
;
|
|
|
|
|
if (set.cache) {
|
|
|
|
|
std::string typ;
|
|
|
|
|
if (set.val.index() == 1) typ = "STRING"; else typ = "BOOL";
|
|
|
|
|
if (set.val.index() == 1)
|
|
|
|
|
typ = "STRING";
|
|
|
|
|
else
|
|
|
|
|
typ = "BOOL";
|
|
|
|
|
ss << " CACHE " << typ << " \"" << set.comment << "\"";
|
|
|
|
|
if (set.force) ss << " FORCE";
|
|
|
|
|
if (set.force)
|
|
|
|
|
ss << " FORCE";
|
|
|
|
|
}
|
|
|
|
|
ss << ")\n\n";
|
|
|
|
|
}
|
|
|
|
@ -364,7 +369,11 @@ int generate_cmake(const char *path) {
|
|
|
|
|
ss << conf << " ";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
ss << "\n\tDESTINATION " << inst.destination << "\n\t)\n\n";
|
|
|
|
|
ss << "\n\tDESTINATION " << inst.destination << "\n\t";
|
|
|
|
|
if (!inst.targets.empty())
|
|
|
|
|
ss << "COMPONENT " << inst.targets[0] << "\n\t)\n\n";
|
|
|
|
|
else
|
|
|
|
|
ss << "\n\t)\n\n";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|