Skip to content
This repository has been archived by the owner on Oct 15, 2021. It is now read-only.

Linux compilation fixes #15

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@


#include "GeoReferencingSubsystem.h"
#include "Interfaces\IPluginManager.h"
#include "Interfaces/IPluginManager.h"
#include <SimulationSettings.h>
#include "..\Public\GeoReferencingSubsystem.h"
#include "GeoReferencingActor.h"
#include "../Public/GeoReferencingSubsystem.h"
#include "GeoreferencingActor.h"


UGeoReferencingSubsystem::UGeoReferencingSubsystem() :
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,11 @@ FText USimulationUtilitiesLibrary::AsAngle(double Val, const FNumberFormattingOp
int32 degrees = FMath::TruncToInt(Val);
int32 minutes = FMath::TruncToInt(60.0 * FMath::Abs<double>(Val - degrees));
double seconds = 3600.0 * FMath::Abs<double>(Val - degrees) - 60.0 * minutes;
return FText::Format(NSLOCTEXT("SimulationModule", "AngleDMSFmt", "{0} {1}' {2}\""), FText::AsNumber(degrees), FText::AsNumber(minutes), FText::AsNumber(seconds, Options));
return FText::Format(NSLOCTEXT("SimulationModule", "AngleDMSFmt", "{0}° {1}' {2}\""), FText::AsNumber(degrees), FText::AsNumber(minutes), FText::AsNumber(seconds, Options));
}
else
{
return FText::Format(NSLOCTEXT("SimulationModule", "AngleDegFmt", "{0}"), FText::AsNumber(Val, Options));
return FText::Format(NSLOCTEXT("SimulationModule", "AngleDegFmt", "{0}°"), FText::AsNumber(Val, Options));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,19 @@ public SimulationModule(ReadOnlyTargetRules Target) : base(Target)
}
);

// Stage Proj data files
string ProjRedistFolder = Path.Combine(ModuleDirectory, @"..\ThirdParty\Proj\redist");
RuntimeDependencies.Add("$(BinaryOutputDir)/proj-data/*", Path.Combine(ProjRedistFolder, "proj-data/*"), StagedFileType.SystemNonUFS);

// Add dependencies to PROJ
List<string> RuntimeModuleNames = new List<string>();
if (Target.Platform == UnrealTargetPlatform.Win64)
{
List<string> RuntimeModuleNames = new List<string>();
RuntimeModuleNames.Add("jpeg62.dll");
RuntimeModuleNames.Add("lzma.dll");
RuntimeModuleNames.Add("sqlite3.dll");
RuntimeModuleNames.Add("tiff.dll");
RuntimeModuleNames.Add("zlib1.dll");
string ProjRedistFolder = Path.Combine(ModuleDirectory, @"..\ThirdParty\Proj\redist");


foreach (string RuntimeModuleName in RuntimeModuleNames)
{
Expand All @@ -76,9 +78,6 @@ public SimulationModule(ReadOnlyTargetRules Target) : base(Target)
//PublicDelayLoadDLLs.Add(RuntimeModuleName);
RuntimeDependencies.Add("$(BinaryOutputDir)/" + RuntimeModuleName, ModulePath);
}

// Stage Proj data files
RuntimeDependencies.Add("$(BinaryOutputDir)/proj-data/*", Path.Combine(ProjRedistFolder, "proj-data/*"), StagedFileType.SystemNonUFS);
}
}
}
27 changes: 19 additions & 8 deletions SimulationPlugin/Source/ThirdParty/Proj/Proj.Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,35 @@ public Proj(ReadOnlyTargetRules Target) : base(Target)
{
Type = ModuleType.External;
bEnableExceptions = true;

// add include path
string IncPath = Path.Combine(ModuleDirectory, "include");
PublicSystemIncludePaths.Add(IncPath);

// add lib path
string LibPath = Path.Combine(ModuleDirectory, "lib");

if (Target.Platform == UnrealTargetPlatform.Win64)
{
// add include path
string IncPath = Path.Combine(ModuleDirectory, "include");
PublicSystemIncludePaths.Add(IncPath);

// add lib path
string LibPath = Path.Combine(ModuleDirectory, "lib");

// Explicitly name the used libraries
LibPath = Path.Combine(LibPath, "Win64");
PublicAdditionalLibraries.Add(Path.Combine(LibPath, "proj.lib"));
PublicAdditionalLibraries.Add(Path.Combine(LibPath, "sqlite3.lib"));
PublicAdditionalLibraries.Add(Path.Combine(LibPath, "tiff.lib"));

// add macros
PublicDefinitions.Add("WITH_PROJ_API=1");
PublicDefinitions.Add("__WINDOWS__");
}
else if(Target.Platform == UnrealTargetPlatform.Linux)
{
// Explicitly name the used libraries
LibPath = Path.Combine(LibPath, "Linux");
PublicAdditionalLibraries.Add(Path.Combine(LibPath, "libproj.a"));
PublicAdditionalLibraries.Add(Path.Combine(LibPath, "libsqlite3.a"));
PublicAdditionalLibraries.Add(Path.Combine(LibPath, "libtiff.a"));
}

// add macros
PublicDefinitions.Add("WITH_PROJ_API=1");
}
}
Binary file not shown.
Binary file not shown.
Binary file not shown.