Skip to content

Commit b4e5ed0

Browse files
committed
Add define HXCPP_GENERATE_MSVC to make the hxcpp build tool output an MSVC solution/project
1 parent fc8307b commit b4e5ed0

3 files changed

Lines changed: 801 additions & 4 deletions

File tree

tools/hxcpp/BuildTool.hx

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -304,8 +304,20 @@ class BuildTool
304304
}
305305

306306
Profile.setEntry("build");
307-
for(target in inTargets)
308-
buildTarget(target,destination);
307+
if (mDefines.exists("HXCPP_GENERATE_MSVC"))
308+
{
309+
// Calculate platform string
310+
var platform = m64 ? "x64" : (arm64 ? "ARM64" : "Win32");
311+
312+
var gen = new GenMsvc(mDefines, mTargets, mCompiler, platform, defaultCxxStandard);
313+
for(target in inTargets)
314+
gen.generate(target);
315+
}
316+
else
317+
{
318+
for(target in inTargets)
319+
buildTarget(target,destination);
320+
}
309321

310322
var linkOutputs = mDefines.get("HXCPP_LINK_OUTPUTS");
311323
if (linkOutputs!=null)
@@ -1888,7 +1900,6 @@ class BuildTool
18881900
if (targets.length==0)
18891901
targets.push("default");
18901902

1891-
18921903
new BuildTool(makefile,defines,targets,include_path,dirtyList);
18931904
}
18941905
}

tools/hxcpp/Compiler.hx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ class Compiler
226226
return args;
227227
}
228228

229-
function getArgs(inFile:File)
229+
public function getArgs(inFile:File)
230230
{
231231
var nvcc = inFile.isNvcc();
232232
var asm = inFile.isAsm();

0 commit comments

Comments
 (0)