2019-12-26 23:01:54 -05:00
|
|
|
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
2019-10-04 13:11:45 -04:00
|
|
|
|
|
|
|
|
|
|
using UnrealBuildTool;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
|
|
|
|
|
|
public class DatasmithSDKTarget : TargetRules
|
|
|
|
|
|
{
|
|
|
|
|
|
public DatasmithSDKTarget(TargetInfo Target)
|
|
|
|
|
|
: base(Target)
|
|
|
|
|
|
{
|
|
|
|
|
|
Type = TargetType.Program;
|
2022-03-29 12:16:19 -04:00
|
|
|
|
IncludeOrderVersion = EngineIncludeOrderVersion.Latest;
|
|
|
|
|
|
DefaultBuildSettings = BuildSettingsVersion.Latest;
|
2019-11-14 17:19:25 -05:00
|
|
|
|
SolutionDirectory = "Programs/Datasmith";
|
2021-11-02 14:58:04 -04:00
|
|
|
|
bBuildInSolutionByDefault = false;
|
2019-10-04 13:11:45 -04:00
|
|
|
|
|
|
|
|
|
|
LaunchModuleName = "DatasmithSDK";
|
|
|
|
|
|
ExeBinariesSubFolder = "DatasmithSDK";
|
|
|
|
|
|
|
2021-04-08 14:32:07 -04:00
|
|
|
|
ExtraModuleNames.AddRange( new string[] { "DatasmithCore", "DatasmithExporter" } );
|
2019-10-04 13:11:45 -04:00
|
|
|
|
|
|
|
|
|
|
LinkType = TargetLinkType.Monolithic;
|
|
|
|
|
|
bShouldCompileAsDLL = true;
|
|
|
|
|
|
|
|
|
|
|
|
bBuildDeveloperTools = false;
|
|
|
|
|
|
bUseMallocProfiler = false;
|
2022-03-09 12:23:38 -05:00
|
|
|
|
bBuildWithEditorOnlyData = true;
|
2019-10-04 13:11:45 -04:00
|
|
|
|
bCompileAgainstEngine = false;
|
|
|
|
|
|
bCompileAgainstCoreUObject = true;
|
|
|
|
|
|
bCompileICU = false;
|
|
|
|
|
|
bUsesSlate = false;
|
2022-03-09 12:23:38 -05:00
|
|
|
|
bDisableDebugInfo = false;
|
2019-10-04 13:11:45 -04:00
|
|
|
|
bUsePDBFiles = true;
|
|
|
|
|
|
bHasExports = true;
|
|
|
|
|
|
bIsBuildingConsoleApplication = true;
|
|
|
|
|
|
|
2021-01-31 15:09:58 -04:00
|
|
|
|
if (Platform == UnrealTargetPlatform.Win64)
|
2019-10-04 13:11:45 -04:00
|
|
|
|
{
|
|
|
|
|
|
AddWindowsPostBuildSteps();
|
|
|
|
|
|
}
|
2022-05-12 10:43:57 -04:00
|
|
|
|
|
|
|
|
|
|
// Enable UDP in shipping (used by DirectLink)
|
|
|
|
|
|
if (BuildEnvironment == TargetBuildEnvironment.Unique)
|
|
|
|
|
|
{
|
|
|
|
|
|
GlobalDefinitions.Add("ALLOW_UDP_MESSAGING_SHIPPING=1"); // bypasses the 'if shipping' of UdpMessagingModule.cpp
|
|
|
|
|
|
GlobalDefinitions.Add("PLATFORM_SUPPORTS_MESSAGEBUS=1"); // required to enable the default MessageBus in MessagingModule.cpp
|
|
|
|
|
|
}
|
2019-10-04 13:11:45 -04:00
|
|
|
|
}
|
|
|
|
|
|
|
2020-09-24 00:43:27 -04:00
|
|
|
|
public void PostBuildCopy(string SrcPath, string DestPath)
|
2019-10-04 13:11:45 -04:00
|
|
|
|
{
|
|
|
|
|
|
PostBuildSteps.Add(string.Format("echo Copying {0} to {1}", SrcPath, DestPath));
|
2022-03-29 12:16:19 -04:00
|
|
|
|
PostBuildSteps.Add(string.Format("xcopy \"{0}\" \"{1}\" /R /Y /S /Q", SrcPath, DestPath));
|
2019-10-04 13:11:45 -04:00
|
|
|
|
}
|
2020-09-24 00:43:27 -04:00
|
|
|
|
|
|
|
|
|
|
public void AddWindowsPostBuildSteps()
|
|
|
|
|
|
{
|
|
|
|
|
|
// Copy the documentation
|
|
|
|
|
|
PostBuildCopy(
|
|
|
|
|
|
@"$(EngineDir)\Source\Programs\Enterprise\Datasmith\DatasmithSDK\Documentation\*.*",
|
|
|
|
|
|
@"$(EngineDir)\Binaries\$(TargetPlatform)\DatasmithSDK\Documentation\"
|
|
|
|
|
|
);
|
|
|
|
|
|
|
2021-04-08 14:32:07 -04:00
|
|
|
|
// Package our public headers
|
2020-09-24 00:43:27 -04:00
|
|
|
|
PostBuildCopy(
|
|
|
|
|
|
@"$(EngineDir)\Source\Runtime\Datasmith\DatasmithCore\Public\*.h",
|
|
|
|
|
|
@"$(EngineDir)\Binaries\$(TargetPlatform)\DatasmithSDK\Public\"
|
|
|
|
|
|
);
|
|
|
|
|
|
|
2020-11-24 18:42:39 -04:00
|
|
|
|
PostBuildCopy(
|
|
|
|
|
|
@"$(EngineDir)\Source\Runtime\Datasmith\DirectLink\Public\*.h",
|
|
|
|
|
|
@"$(EngineDir)\Binaries\$(TargetPlatform)\DatasmithSDK\Public\"
|
|
|
|
|
|
);
|
|
|
|
|
|
|
2020-09-24 00:43:27 -04:00
|
|
|
|
PostBuildCopy(
|
|
|
|
|
|
@"$(EngineDir)\Source\Developer\Datasmith\DatasmithExporter\Public\*.h",
|
|
|
|
|
|
@"$(EngineDir)\Binaries\$(TargetPlatform)\DatasmithSDK\Public\"
|
|
|
|
|
|
);
|
2021-04-08 14:32:07 -04:00
|
|
|
|
|
|
|
|
|
|
// Other headers we depend on, but that are not part of our public API:
|
|
|
|
|
|
PostBuildCopy(
|
|
|
|
|
|
@"$(EngineDir)\Source\Runtime\TraceLog\Public\*.h",
|
|
|
|
|
|
@"$(EngineDir)\Binaries\$(TargetPlatform)\DatasmithSDK\Private\"
|
|
|
|
|
|
);
|
|
|
|
|
|
PostBuildCopy(
|
|
|
|
|
|
@"$(EngineDir)\Source\Runtime\TraceLog\Public\*.inl",
|
|
|
|
|
|
@"$(EngineDir)\Binaries\$(TargetPlatform)\DatasmithSDK\Private\"
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
PostBuildCopy(
|
|
|
|
|
|
@"$(EngineDir)\Source\Runtime\Messaging\Public\*.h",
|
|
|
|
|
|
@"$(EngineDir)\Binaries\$(TargetPlatform)\DatasmithSDK\Private\"
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
PostBuildCopy(
|
|
|
|
|
|
@"$(EngineDir)\Source\Runtime\Core\Public\*.h",
|
|
|
|
|
|
@"$(EngineDir)\Binaries\$(TargetPlatform)\DatasmithSDK\Private\"
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
PostBuildCopy(
|
|
|
|
|
|
@"$(EngineDir)\Source\Runtime\Core\Public\*.inl",
|
|
|
|
|
|
@"$(EngineDir)\Binaries\$(TargetPlatform)\DatasmithSDK\Private\"
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
PostBuildCopy(
|
|
|
|
|
|
@"$(EngineDir)\Source\Runtime\CoreUObject\Public\*.h",
|
|
|
|
|
|
@"$(EngineDir)\Binaries\$(TargetPlatform)\DatasmithSDK\Private\"
|
|
|
|
|
|
);
|
2020-09-24 00:43:27 -04:00
|
|
|
|
}
|
2019-10-04 13:11:45 -04:00
|
|
|
|
}
|