diff --git a/SimulationPlugin/Source/SimulationModule/Private/GeoReferencingSubsystem.cpp b/SimulationPlugin/Source/SimulationModule/Private/GeoReferencingSubsystem.cpp index d44cb2c..3ca5651 100644 --- a/SimulationPlugin/Source/SimulationModule/Private/GeoReferencingSubsystem.cpp +++ b/SimulationPlugin/Source/SimulationModule/Private/GeoReferencingSubsystem.cpp @@ -2,10 +2,10 @@ #include "GeoReferencingSubsystem.h" -#include "Interfaces\IPluginManager.h" +#include "Interfaces/IPluginManager.h" #include -#include "..\Public\GeoReferencingSubsystem.h" -#include "GeoReferencingActor.h" +#include "../Public/GeoReferencingSubsystem.h" +#include "GeoreferencingActor.h" UGeoReferencingSubsystem::UGeoReferencingSubsystem() : diff --git a/SimulationPlugin/Source/SimulationModule/Private/SimulationUtilitiesLibrary.cpp b/SimulationPlugin/Source/SimulationModule/Private/SimulationUtilitiesLibrary.cpp index 1ce382e..7fdde41 100644 --- a/SimulationPlugin/Source/SimulationModule/Private/SimulationUtilitiesLibrary.cpp +++ b/SimulationPlugin/Source/SimulationModule/Private/SimulationUtilitiesLibrary.cpp @@ -135,11 +135,11 @@ FText USimulationUtilitiesLibrary::AsAngle(double Val, const FNumberFormattingOp int32 degrees = FMath::TruncToInt(Val); int32 minutes = FMath::TruncToInt(60.0 * FMath::Abs(Val - degrees)); double seconds = 3600.0 * FMath::Abs(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)); } } diff --git a/SimulationPlugin/Source/SimulationModule/SimulationModule.Build.cs b/SimulationPlugin/Source/SimulationModule/SimulationModule.Build.cs index dc6f1b4..3f5090e 100644 --- a/SimulationPlugin/Source/SimulationModule/SimulationModule.Build.cs +++ b/SimulationPlugin/Source/SimulationModule/SimulationModule.Build.cs @@ -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 RuntimeModuleNames = new List(); if (Target.Platform == UnrealTargetPlatform.Win64) { - List RuntimeModuleNames = new List(); 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) { @@ -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); } } } diff --git a/SimulationPlugin/Source/ThirdParty/Proj/Proj.Build.cs b/SimulationPlugin/Source/ThirdParty/Proj/Proj.Build.cs index 65b925e..fca41bf 100644 --- a/SimulationPlugin/Source/ThirdParty/Proj/Proj.Build.cs +++ b/SimulationPlugin/Source/ThirdParty/Proj/Proj.Build.cs @@ -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"); } } diff --git a/SimulationPlugin/Source/ThirdParty/Proj/lib/Linux/libproj.a b/SimulationPlugin/Source/ThirdParty/Proj/lib/Linux/libproj.a new file mode 100644 index 0000000..5bba524 Binary files /dev/null and b/SimulationPlugin/Source/ThirdParty/Proj/lib/Linux/libproj.a differ diff --git a/SimulationPlugin/Source/ThirdParty/Proj/lib/Linux/libsqlite3.a b/SimulationPlugin/Source/ThirdParty/Proj/lib/Linux/libsqlite3.a new file mode 100644 index 0000000..bfaaa44 Binary files /dev/null and b/SimulationPlugin/Source/ThirdParty/Proj/lib/Linux/libsqlite3.a differ diff --git a/SimulationPlugin/Source/ThirdParty/Proj/lib/Linux/libtiff.a b/SimulationPlugin/Source/ThirdParty/Proj/lib/Linux/libtiff.a new file mode 100644 index 0000000..cd39340 Binary files /dev/null and b/SimulationPlugin/Source/ThirdParty/Proj/lib/Linux/libtiff.a differ diff --git a/SimulationPlugin/Source/ThirdParty/Proj/lib/proj.lib b/SimulationPlugin/Source/ThirdParty/Proj/lib/Win64/proj.lib similarity index 100% rename from SimulationPlugin/Source/ThirdParty/Proj/lib/proj.lib rename to SimulationPlugin/Source/ThirdParty/Proj/lib/Win64/proj.lib diff --git a/SimulationPlugin/Source/ThirdParty/Proj/lib/sqlite3.lib b/SimulationPlugin/Source/ThirdParty/Proj/lib/Win64/sqlite3.lib similarity index 100% rename from SimulationPlugin/Source/ThirdParty/Proj/lib/sqlite3.lib rename to SimulationPlugin/Source/ThirdParty/Proj/lib/Win64/sqlite3.lib diff --git a/SimulationPlugin/Source/ThirdParty/Proj/lib/tiff.lib b/SimulationPlugin/Source/ThirdParty/Proj/lib/Win64/tiff.lib similarity index 100% rename from SimulationPlugin/Source/ThirdParty/Proj/lib/tiff.lib rename to SimulationPlugin/Source/ThirdParty/Proj/lib/Win64/tiff.lib