add flags for plugins using nuget package

This commit is contained in:
Mikaël Capelle
2020-11-20 20:36:36 +01:00
parent 695aac556c
commit 21e057b555
3 changed files with 18 additions and 1 deletions
+1
View File
@@ -111,6 +111,7 @@ void add_tasks()
.add_task<mo>("modorganizer-installer_quick")
.add_task<mo>("modorganizer-installer_fomod")
.add_task<mo>("modorganizer-installer_fomod_csharp")
.add_task<mo>("modorganizer-installer_omod", mo::nuget)
.add_task<mo>("modorganizer-installer_ncc")
.add_task<mo>("modorganizer-bsa_extractor")
.add_task<mo>("modorganizer-plugin_python")
+14
View File
@@ -54,6 +54,11 @@ bool modorganizer::is_gamebryo_plugin() const
return is_set(flags_, gamebryo);
}
bool modorganizer::is_nuget_plugin() const
{
return is_set(flags_, nuget);
}
fs::path modorganizer::source_path()
{
return {};
@@ -146,6 +151,15 @@ void modorganizer::do_build_and_install()
run_tool(create_this_cmake_tool());
});
// until https://gitlab.kitware.com/cmake/cmake/-/issues/20646 is resolved,
// we need a manual way of running the msbuild -t:restore
if (is_nuget_plugin()) {
instrument<times::build>([&]
{
run_tool(create_this_msbuild_tool().targets({ "restore" }));
});
}
instrument<times::build>([&]
{
run_tool(create_this_msbuild_tool());
+3 -1
View File
@@ -288,7 +288,8 @@ public:
enum flags
{
noflags = 0x00,
gamebryo = 0x01
gamebryo = 0x01,
nuget = 0x02,
};
modorganizer(std::string name, flags f=noflags);
@@ -306,6 +307,7 @@ public:
bool is_super() const override;
bool is_gamebryo_plugin() const;
bool is_nuget_plugin() const;
url git_url() const;
std::string org() const;