Skip to content
This repository was archived by the owner on Mar 25, 2025. It is now read-only.

Commit b683286

Browse files
committed
compile fixes
1 parent ddf8bfc commit b683286

File tree

1 file changed

+32
-30
lines changed

1 file changed

+32
-30
lines changed

Source/UnrealEnginePython/UnrealEnginePython.Build.cs

Lines changed: 32 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ public UnrealEnginePython(TargetInfo Target)
186186

187187
if ((Target.Platform == UnrealTargetPlatform.Win64) || (Target.Platform == UnrealTargetPlatform.Win32))
188188
{
189-
if(UseThirdPartyPython)
189+
if (UseThirdPartyPython)
190190
{
191191
PythonHome = ThirdPartyPythonHome;
192192

@@ -250,39 +250,41 @@ public UnrealEnginePython(TargetInfo Target)
250250
PublicLibraryPaths.Add(Path.GetDirectoryName(libPath));
251251
PublicDelayLoadDLLs.Add(libPath);
252252
Definitions.Add(string.Format("UNREAL_ENGINE_PYTHON_ON_MAC"));
253-
}
254-
else if (Target.Platform == UnrealTargetPlatform.Linux)
255-
{
256-
if (pythonHome == "")
257-
{
258-
string includesPath = DiscoverLinuxPythonIncludesPath();
259-
if (includesPath == null)
260-
{
261-
throw new System.Exception("Unable to find Python includes, please add a search path to linuxKnownIncludesPaths");
262-
}
263-
string libsPath = DiscoverLinuxPythonLibsPath();
264-
if (libsPath == null)
265-
{
266-
throw new System.Exception("Unable to find Python libs, please add a search path to linuxKnownLibsPaths");
267-
}
268-
PublicIncludePaths.Add(includesPath);
269-
PublicAdditionalLibraries.Add(libsPath);
270-
}
271-
else
272-
{
273-
string []items = pythonHome.Split(';');
274-
PublicIncludePaths.Add(items[0]);
275-
PublicAdditionalLibraries.Add(items[1]);
253+
}
254+
else if (Target.Platform == UnrealTargetPlatform.Linux)
255+
{
256+
if (PythonHome == "")
257+
{
258+
string includesPath = DiscoverLinuxPythonIncludesPath();
259+
if (includesPath == null)
260+
{
261+
throw new System.Exception("Unable to find Python includes, please add a search path to linuxKnownIncludesPaths");
262+
}
263+
string libsPath = DiscoverLinuxPythonLibsPath();
264+
if (libsPath == null)
265+
{
266+
throw new System.Exception("Unable to find Python libs, please add a search path to linuxKnownLibsPaths");
267+
}
268+
PublicIncludePaths.Add(includesPath);
269+
PublicAdditionalLibraries.Add(libsPath);
270+
}
271+
else
272+
{
273+
string[] items = PythonHome.Split(';');
274+
PublicIncludePaths.Add(items[0]);
275+
PublicAdditionalLibraries.Add(items[1]);
276+
}
276277
}
277278
}
278-
279-
string enableThreads = System.Environment.GetEnvironmentVariable("UEP_ENABLE_THREADS");
280-
if (!string.IsNullOrEmpty(enableThreads))
281-
{
282-
Definitions.Add("UEPY_THREADING");
283-
System.Console.WriteLine("*** Enabled Python Threads support ***");
284279
}
285280

281+
/*string enableThreads = System.Environment.GetEnvironmentVariable("UEP_ENABLE_THREADS");
282+
if (!string.IsNullOrEmpty(enableThreads))
283+
{
284+
Definitions.Add("UEPY_THREADING");
285+
System.Console.WriteLine("*** Enabled Python Threads support ***");
286+
}*/
287+
286288
private string DiscoverPythonPath(string[] knownPaths)
287289
{
288290
// insert the PYTHONHOME content as the first known path

0 commit comments

Comments
 (0)