Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the vcpkg-enabled version of cesium-native. #1447

Open
wants to merge 120 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
120 commits
Select commit Hold shift + click to select a range
c843346
Use the vcpkg-enabled version of cesium-native.
kring Jun 6, 2024
903bac0
Use libSearchPattern.
kring Jun 6, 2024
45c54d6
Add unmodified ktx port from the 2024.02.14 label of microsoft/vcpkg.
kring Jun 7, 2024
109d2c5
Add our patch to the ktx vcpkg port.
kring Jun 7, 2024
3c12468
Move some changes previously in cesium-native to cesium-unreal.
kring Jun 7, 2024
2b64650
Fix release build.
kring Jun 7, 2024
711e120
Update cesium-native.
kring Jun 7, 2024
e33a412
First crack at vcpkg / Android support.
kring Jun 7, 2024
6f2d53b
Cache vcpkg.
kring Jun 7, 2024
82dbba1
Better vcpkg cache key.
kring Jun 7, 2024
053417f
Fix variable usage in cache key.
kring Jun 7, 2024
a2e9cf8
Add zlib-ng port from 2024.02.14 tag in microsoft/vcpkg repo.
kring Jun 7, 2024
475c95a
Fix several problems with the Android build.
kring Jun 7, 2024
674cf4a
Add vcpkg caching to Android, and always save it.
kring Jun 7, 2024
860bb5b
Maybe make some progress toward working Android and iOS.
kring Jun 7, 2024
315010b
Temporarily disable most of the Android build.
kring Jun 7, 2024
26cf067
Better vcpkg cache warmup.
kring Jun 7, 2024
94e3375
Better cache key.
kring Jun 8, 2024
886882e
Restore full Android build.
kring Jun 8, 2024
8266b4c
Re-add MikkTSpace PrivateIncludePath for Android / iOS.
kring Jun 10, 2024
7789321
Fix Linux vcpkg build.
kring Jun 10, 2024
b1544af
Linux-AMD64 -> Linux-x86_64
kring Jun 10, 2024
cdac578
Update cesium-native.
kring Jun 10, 2024
87f6399
Hacky library rename, as an experiment.
kring Jun 11, 2024
e72c55d
Fix path in hack.
kring Jun 11, 2024
3114793
Use OpenSSL from Unreal Engine.
kring Jun 11, 2024
d568abd
Remove a hack.
kring Jun 11, 2024
29b59f4
Proper overlay port for Unreal OpenSSL.
kring Jun 11, 2024
b73f00c
Add OpenSSL paths for other platforms.
kring Jun 11, 2024
fdb6be6
Exclude libssl and libcrypto from CfUnreal build.
kring Jun 11, 2024
9737a61
Specify UNREAL_ENGINE_ROOT.
kring Jun 11, 2024
727cdd5
Fix Linux UE 5.3 / 5.4 build, hopefully.
kring Jun 11, 2024
16903c5
Cache vcpkg on Linux, macOS, and iOS.
kring Jun 11, 2024
770eff7
First attempt at vcpkg on macOS.
kring Jun 11, 2024
bc4ff80
Specify system name on macOS.
kring Jun 12, 2024
139777d
VCPKG_SYSTEM_NAME -> VCPKG_CMAKE_SYSTEM_NAME
kring Jun 12, 2024
4c5c548
Remove installation of msys2 during ktx build.
kring Jun 12, 2024
66a5848
UE OpenSSL paths on macOS / iOS.
kring Jun 12, 2024
1e5cf5c
Add asyncplusplus overlay port.
kring Jun 12, 2024
d5bb575
Use a version of Async++ with a required fix for C++20 support.
kring Jun 12, 2024
610bbdd
Fix typo.
kring Jun 12, 2024
0268d89
Better macOS CPU architecture selection.
kring Jun 12, 2024
f07c237
Better CPU arch selection, attempt universal (not optimistic).
kring Jun 12, 2024
6321d1c
Improve vcpkg caching on CI.
kring Jun 12, 2024
912eefd
Android triplet.
kring Jun 12, 2024
2a60eaa
Pass cache ID explicitly.
kring Jun 12, 2024
c81df69
Remove redundant restore-key.
kring Jun 12, 2024
b85c2ca
Flesh out android triplet.
kring Jun 12, 2024
9b1447e
libwebp inexplicably requires ANDROID_NDK to be set.
kring Jun 12, 2024
818199e
Maybe better without an explicit android toolchain.
kring Jun 12, 2024
8a83611
Update cesium-native.
kring Jun 12, 2024
c1e5fa4
Specify VCPKG_OSX_ARCHITECTURES in macOS triplets.
kring Jun 12, 2024
6b1e224
Specify UNREAL_ENGINE_ROOT on iOS.
kring Jun 12, 2024
f2c1701
Add arm64-ios-unreal triplet.
kring Jun 12, 2024
33acbc5
Set CMAKE_SYSTEM_PROCESSOR on macOS.
kring Jun 12, 2024
12a8723
Another go at robust VCPKG_TRIPLET detection logic.
kring Jun 12, 2024
bca5167
Use toolchain file on iOS, flesh out iOS triplet.
kring Jun 12, 2024
1cb60fc
Don't try to set properties on non-existent target.
kring Jun 12, 2024
b7a67b1
Specify CMAKE_SYSTEM_NAME=Darwin when building on macOS.
kring Jun 12, 2024
bf6da8e
Don't let ktx be a framework on iOS.
kring Jun 12, 2024
a01ff2f
More fixes for KTX build on iOS, build macOS to separate dirs.
kring Jun 13, 2024
3173f8e
Explicitly set CMAKE_SYSTEM_PROCESSOR in iOS toolchain.
kring Jun 13, 2024
60d373a
Use the lipo tool correctly.
kring Jun 13, 2024
25c88e1
Fix vcpkg cache path for non-Windows.
kring Jun 13, 2024
8321143
Don't try to lipo-together identical libraries.
kring Jun 13, 2024
7ef5e8f
Try again to fix the cache path.
kring Jun 13, 2024
2a358fa
Improve triplet organization.
kring Jun 13, 2024
6e80bd5
Merge remote-tracking branch 'origin/fix-warnings' into vcpkg
kring Jun 13, 2024
fd1625f
Add visibility-related flags to triplets.
kring Jun 13, 2024
35bc6ab
Invalidate vcpkg cache on triplet or toolchain changes.
kring Jun 14, 2024
0982821
Fix restore-key.
kring Jun 14, 2024
308a4cf
Set VCPKG_C_FLAGS on macOS.
kring Jun 14, 2024
40b6127
Merge remote-tracking branch 'origin/fix-warnings' into vcpkg
kring Jun 14, 2024
a7db660
Set IncludeOrderVersion, remove unnecessary precompiled header.
kring Jun 14, 2024
ce8334f
Use C++20 and swl::variant instead of std::variant.
kring Jun 14, 2024
f470d09
Fix compile problems on Android.
kring Jun 15, 2024
cc5640b
Fix swl-variant problem on Windows.
kring Jun 15, 2024
6e76d42
Specify VCPKG_PLATFORM_TOOLSET_VERSION=14.34 on Windows.
kring Jun 17, 2024
3590c0d
Merge remote-tracking branch 'origin/vcpkg' into vcpkg-swl
kring Jun 17, 2024
b6d7594
Update cesium-native.
kring Jun 18, 2024
14752f3
Update cesium-native.
kring Jun 18, 2024
6110ba1
Update cesium-native.
kring Jun 18, 2024
e3b342f
Store PropertyArrayCopy in variants.
kring Jun 19, 2024
e614d8b
Fix test failures caused by bad tests.
kring Jun 19, 2024
9ef66c2
View plus explicit storage for MetadataValue / PropertyArray
kring Jun 20, 2024
de4c5e0
Test build with origin swl-variant.
kring Jun 20, 2024
1751fc2
Run Apple builds on macos-13-arm64.
kring Jun 20, 2024
e8621c0
Combine macOS / iOS build jobs.
kring Jun 20, 2024
a35b935
Fix combine step dependencies.
kring Jun 20, 2024
6a3a716
Use macos-13 runner.
kring Jun 21, 2024
3ec0de5
Let's try macOS 14.
kring Jun 21, 2024
eed71cd
Only build vcpkg release on CI, build Intel+Apple on UE5.2
kring Jun 21, 2024
83415cb
Fix artifacts in combine steps.
kring Jun 21, 2024
b4d48ab
Exclude more stuff when extracting UE.
kring Jun 21, 2024
14a7e71
Another attempt at excluding files.
kring Jun 21, 2024
ef18e49
Remove previous attempt at listifying.
kring Jun 21, 2024
bd4d1c7
Exclude more stuff from the ZIP.
kring Jun 21, 2024
7afd807
Restore apparently-required TextToSpeech plugin.
kring Jun 21, 2024
532ec91
Only exclude some experimental plugins.
kring Jun 21, 2024
2690c7e
Restore non-experimental plugins for 5.2 and 5.3, too.
kring Jun 21, 2024
20622af
Delete reference to deleted AutomationScripts.
kring Jun 21, 2024
e234f09
Restore svn.
kring Jun 21, 2024
95951fb
Print brew inventory.
kring Jun 22, 2024
9c6c642
Restore oodle, remove google chrome.
kring Jun 22, 2024
9c4a1e3
Combine macOS / iOS plugin build steps.
kring Jun 22, 2024
cddd054
Re-add Python.
kring Jun 22, 2024
9d4ebae
Apparently in UE 5.4 we just can't remove any plugins at all.
kring Jun 22, 2024
b61cf60
Delete things.
kring Jun 22, 2024
86dc9b5
Remove the entire xcode 16 directory that might exist.
kring Jun 22, 2024
65ba91b
Don't compress debug sections.
kring Jun 23, 2024
4466573
Fix warnings in UE 5.4.
kring Jun 23, 2024
89719d0
Fix another UE 5.4 warning.
kring Jun 24, 2024
b668fca
Merge pull request #1455 from CesiumGS/vcpkg-swl
kring Jun 24, 2024
e620dba
Merge remote-tracking branch 'origin/main' into vcpkg
kring Jul 2, 2024
11e26aa
Only specify MSVC toolset version on CI.
kring Jul 22, 2024
d1f2fd6
Merge remote-tracking branch 'origin/main' into vcpkg
kring Jul 22, 2024
0605fa5
Add port overlay for sqlite3.
kring Jul 22, 2024
c83b36b
Isolate sqlite.
kring Jul 23, 2024
89eef57
Update cesium-native.
kring Jul 24, 2024
00a26bd
Fix find_package(OpenSSL).
kring Jul 25, 2024
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
81 changes: 31 additions & 50 deletions Source/CesiumEditor/CesiumEditor.Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,71 +26,52 @@ public CesiumEditor(ReadOnlyTargetRules Target) : base(Target)
}
);

string libPrefix;
string libPostfix;
string platform;
if (Target.Platform == UnrealTargetPlatform.Win64) {
platform = "Windows-x64";
libPostfix = ".lib";
libPrefix = "";
string libSearchPattern;
if (Target.Platform == UnrealTargetPlatform.Win64)
{
platform = "Windows-AMD64-";
libSearchPattern = "*.lib";
}
else if (Target.Platform == UnrealTargetPlatform.Mac) {
platform = "Darwin-x64";
libPostfix = ".a";
libPrefix = "lib";
else if (Target.Platform == UnrealTargetPlatform.Mac)
{
platform = "Darwin-AMD64-";
libSearchPattern = "lib*.a";
}
else if(Target.Platform == UnrealTargetPlatform.Android) {
platform = "Android-xaarch64";
libPostfix = ".a";
libPrefix = "lib";
else if (Target.Platform == UnrealTargetPlatform.Android)
{
platform = "Android-ARM64-";
libSearchPattern = "lib*.a";
}
else if(Target.Platform == UnrealTargetPlatform.Linux) {
platform = "Linux-x64";
libPostfix = ".a";
libPrefix = "lib";
else if (Target.Platform == UnrealTargetPlatform.Linux)
{
platform = "Linux-AMD64-";
libSearchPattern = "lib*.a";
}
else if(Target.Platform == UnrealTargetPlatform.IOS) {
platform = "iOS-xarm64";
libPostfix = ".a";
libPrefix = "lib";
else if (Target.Platform == UnrealTargetPlatform.IOS)
{
platform = "iOS-ARM64-";
libSearchPattern = "lib*.a";
}
else {
platform = "Unknown";
libPostfix = ".Unknown";
libPrefix = "Unknown";
else
{
throw new InvalidOperationException("Cesium for Unreal does not support this platform.");
}

string libPath = Path.Combine(ModuleDirectory, "../ThirdParty/lib/" + platform);

string releasePostfix = "";
string debugPostfix = "d";

bool preferDebug = (Target.Configuration == UnrealTargetConfiguration.Debug || Target.Configuration == UnrealTargetConfiguration.DebugGame);
string postfix = preferDebug ? debugPostfix : releasePostfix;

string[] libs = new string[]
if (Target.Configuration == UnrealTargetConfiguration.Debug || Target.Configuration == UnrealTargetConfiguration.DebugGame)
{
"CesiumIonClient",
"csprng"
};

if (preferDebug)
{
// We prefer Debug, but might still use Release if that's all that's available.
foreach (string lib in libs)
string libPathDebug = libPath + "Debug";
if (Directory.Exists(libPathDebug))
{
string debugPath = Path.Combine(libPath, libPrefix + lib + debugPostfix + libPostfix);
if (!File.Exists(debugPath))
{
Console.WriteLine("Using release build of cesium-native because a debug build is not available.");
preferDebug = false;
postfix = releasePostfix;
break;
}
libPath = libPathDebug;
}
}

PublicAdditionalLibraries.AddRange(libs.Select(lib => Path.Combine(libPath, libPrefix + lib + postfix + libPostfix)));
string[] allLibs = Directory.GetFiles(libPath, libSearchPattern);

PublicAdditionalLibraries.AddRange(allLibs);

PublicDependencyModuleNames.AddRange(
new string[]
Expand Down
109 changes: 21 additions & 88 deletions Source/CesiumRuntime/CesiumRuntime.Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,119 +26,52 @@ public CesiumRuntime(ReadOnlyTargetRules Target) : base(Target)
}
);

string libPrefix;
string libPostfix;
string platform;
string libSearchPattern;
if (Target.Platform == UnrealTargetPlatform.Win64)
{
platform = "Windows-x64";
libPostfix = ".lib";
libPrefix = "";
platform = "Windows-AMD64-";
libSearchPattern = "*.lib";
}
else if (Target.Platform == UnrealTargetPlatform.Mac)
{
platform = "Darwin-x64";
libPostfix = ".a";
libPrefix = "lib";
platform = "Darwin-AMD64-";
libSearchPattern = "lib*.a";
}
else if (Target.Platform == UnrealTargetPlatform.Android)
{
platform = "Android-xaarch64";
libPostfix = ".a";
libPrefix = "lib";
platform = "Android-ARM64-";
libSearchPattern = "lib*.a";
}
else if (Target.Platform == UnrealTargetPlatform.Linux)
{
platform = "Linux-x64";
libPostfix = ".a";
libPrefix = "lib";
platform = "Linux-AMD64-";
libSearchPattern = "lib*.a";
}
else if(Target.Platform == UnrealTargetPlatform.IOS)
{
platform = "iOS-xarm64";
libPostfix = ".a";
libPrefix = "lib";
}
else {
platform = "Unknown";
libPostfix = ".Unknown";
libPrefix = "Unknown";
}

string libPath = Path.Combine(ModuleDirectory, "../ThirdParty/lib/" + platform);

string releasePostfix = "";
string debugPostfix = "d";

bool preferDebug = (Target.Configuration == UnrealTargetConfiguration.Debug || Target.Configuration == UnrealTargetConfiguration.DebugGame);
string postfix = preferDebug ? debugPostfix : releasePostfix;

string[] libs = new string[]
{
"async++",
"Cesium3DTiles",
"Cesium3DTilesContent",
"Cesium3DTilesReader",
"Cesium3DTilesSelection",
"CesiumAsync",
"CesiumIonClient",
"CesiumGeometry",
"CesiumGeospatial",
"CesiumGltfReader",
"CesiumGltfContent",
"CesiumGltf",
"CesiumJsonReader",
"CesiumRasterOverlays",
"CesiumQuantizedMeshTerrain",
"CesiumUtility",
"csprng",
"draco",
"ktx",
//"MikkTSpace",
"meshoptimizer",
"modp_b64",
"s2geometry",
"spdlog",
"sqlite3",
"tinyxml2",
"turbojpeg",
"uriparser",
"webpdecoder",
};

// Use our own copy of MikkTSpace on Android.
if (Target.Platform == UnrealTargetPlatform.Android || Target.Platform == UnrealTargetPlatform.IOS)
{
libs = libs.Concat(new string[] { "MikkTSpace" }).ToArray();
PrivateIncludePaths.Add(Path.Combine(ModuleDirectory, "../ThirdParty/include/mikktspace"));
}

if (Target.Platform == UnrealTargetPlatform.Win64)
{
libs = libs.Concat(new string[] { "tidy_static", "zlibstatic" }).ToArray();
platform = "iOS-ARM64-";
libSearchPattern = "lib*.a";
}
else
{
libs = libs.Concat(new string[] { "tidy", "z" }).ToArray();
throw new InvalidOperationException("Cesium for Unreal does not support this platform.");
}

if (preferDebug)
string libPath = Path.Combine(ModuleDirectory, "../ThirdParty/lib/" + platform);

if (Target.Configuration == UnrealTargetConfiguration.Debug || Target.Configuration == UnrealTargetConfiguration.DebugGame)
{
// We prefer Debug, but might still use Release if that's all that's available.
foreach (string lib in libs)
string libPathDebug = libPath + "Debug";
if (Directory.Exists(libPathDebug))
{
string debugPath = Path.Combine(libPath, libPrefix + lib + debugPostfix + libPostfix);
if (!File.Exists(debugPath))
{
Console.WriteLine("Using release build of cesium-native because a debug build is not available.");
preferDebug = false;
postfix = releasePostfix;
break;
}
libPath = libPathDebug;
}
}

PublicAdditionalLibraries.AddRange(libs.Select(lib => Path.Combine(libPath, libPrefix + lib + postfix + libPostfix)));
string[] allLibs = Directory.GetFiles(libPath, libSearchPattern);

PublicAdditionalLibraries.AddRange(allLibs);

PublicDependencyModuleNames.AddRange(
new string[]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include "UnrealMetadataConversions.h"
#include <CesiumGltf/FeatureIdTextureView.h>
#include <CesiumUtility/Tracing.h>
#include <glm/gtx/integer.hpp>
#include <optional>
#include <unordered_map>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include <CesiumGltf/PropertyTexturePropertyView.h>
#include <CesiumGltf/PropertyTextureView.h>
#include <CesiumUtility/Tracing.h>
#include <glm/gtx/integer.hpp>
#include <unordered_map>

using namespace CesiumTextureUtility;
Expand Down
2 changes: 1 addition & 1 deletion Source/CesiumRuntime/Private/CesiumFlyToComponent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include "UObject/ConstructorHelpers.h"
#include "VecMath.h"

#include <glm/gtx/quaternion.hpp>
#include <glm/gtc/quaternion.hpp>

UCesiumFlyToComponent::UCesiumFlyToComponent() {
// Structure to hold one-time initialization
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include "Components/SceneComponent.h"
#include "GameFramework/Actor.h"
#include "VecMath.h"
#include <glm/gtx/quaternion.hpp>
#include <glm/gtc/quaternion.hpp>

// These are the "changes" that can happen to this component, how it detects
// them, and what it does about them:
Expand Down
4 changes: 2 additions & 2 deletions Source/CesiumRuntime/Private/CesiumGltfComponent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1939,7 +1939,7 @@ static void loadInstancingData(
quatView[i].value[0],
quatView[i].value[1],
quatView[i].value[2]);
instanceTransforms[i] = instanceTransforms[i] * glm::toMat4(quat);
instanceTransforms[i] = instanceTransforms[i] * glm::mat4_cast(quat);
}
} else if constexpr (is_int_quat_v<ValueType>) {
for (int64_t i = 0; i < count; ++i) {
Expand All @@ -1948,7 +1948,7 @@ static void loadInstancingData(
val[j] = GltfNormalized(quatView[i].value[j]);
}
glm::dquat quat(val[3], val[0], val[1], val[2]);
instanceTransforms[i] = instanceTransforms[i] * glm::toMat4(quat);
instanceTransforms[i] = instanceTransforms[i] * glm::mat4_cast(quat);
}
}
});
Expand Down
2 changes: 2 additions & 0 deletions Source/CesiumRuntime/Private/GeoTransforms.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
#include "CesiumTransforms.h"
#include "VecMath.h"
#include <glm/gtc/matrix_inverse.hpp>

#define GLM_ENABLE_EXPERIMENTAL
#include <glm/gtx/quaternion.hpp>

using namespace CesiumGeospatial;
Expand Down
3 changes: 1 addition & 2 deletions Source/CesiumRuntime/Private/GlobeAwareDefaultPawn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@
#include <glm/ext/vector_double3.hpp>
#include <glm/glm.hpp>
#include <glm/gtc/matrix_inverse.hpp>
#include <glm/gtx/quaternion.hpp>
#include <glm/gtx/rotate_vector.hpp>
#include <glm/gtc/quaternion.hpp>

#if WITH_EDITOR
#include "Editor.h"
Expand Down
3 changes: 0 additions & 3 deletions Source/CesiumRuntime/Private/VecMath.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@
#include "CesiumUtility/Math.h"
#include "Math/Quat.h"
#include "Math/RotationMatrix.h"
#include <glm/detail/type_quat.hpp>
#include <glm/gtc/quaternion.hpp>
#include <glm/gtx/rotate_vector.hpp>
#include <glm/gtx/transform.hpp>

glm::dmat4 VecMath::createMatrix4D(const FMatrix& m) noexcept {
return glm::dmat4(
Expand Down
18 changes: 7 additions & 11 deletions extern/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,26 +37,18 @@ set(PRIVATE_CESIUM_SQLITE ON)

set(CMAKE_MSVC_RUNTIME_LIBRARY MultiThreadedDLL)
set(CMAKE_INSTALL_PREFIX ${CMAKE_CURRENT_LIST_DIR}/../Source/ThirdParty)
set(CMAKE_INSTALL_LIBDIR ${CMAKE_INSTALL_PREFIX}/lib/${CMAKE_SYSTEM_NAME}-x${CESIUM_ARCHITECTURE})
set(CMAKE_INSTALL_LIBDIR ${CMAKE_INSTALL_PREFIX}/lib/${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}-$<IF:$<CONFIG:Debug>,Debug,Release>)

# Always define this, since Unreal does in debug anyway
# We don't want any mismatches, especially with class member ordering
add_compile_definitions(NDEBUG)

set(CESIUM_DEBUG_POSTFIX "d")
set(CESIUM_RELEASE_POSTFIX "")

set(CMAKE_DEBUG_POSTFIX ${CESIUM_DEBUG_POSTFIX})
set(CMAKE_RELEASE_POSTFIX ${CESIUM_RELEASE_POSTFIX})
set(CMAKE_MINSIZEREL_POSTFIX ${CESIUM_RELEASE_POSTFIX})
set(CMAKE_RELWITHDEBINFO_POSTFIX ${CESIUM_RELEASE_POSTFIX})

# On Mac and Linux, Unreal uses -fvisibility-ms-compat.
# On Android, it uses -fvisibility=hidden
if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR ${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility-ms-compat -fvisibility-inlines-hidden")
elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Android")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden -fvisibility-inlines-hidden")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidde\n -fvisibility-inlines-hidden")
j9liu marked this conversation as resolved.
Show resolved Hide resolved
elseif (${CMAKE_SYSTEM_NAME} STREQUAL "iOS")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden")
elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
Expand Down Expand Up @@ -93,10 +85,14 @@ if (CESIUM_USE_UNREAL_TRACING)
list(APPEND CESIUM_EXTRA_INCLUDES "${CMAKE_CURRENT_SOURCE_DIR}/include")
endif()

if(WIN32)
set(VCPKG_TRIPLET "x64-windows-unreal")
endif()

add_subdirectory(cesium-native)

# cesium-native doesn't require this header to be public, but Cesium for Unreal wants to use it.
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/cesium-native/extern/stb/stb_image_resize.h TYPE INCLUDE)
#install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/cesium-native/extern/stb/stb_image_resize.h TYPE INCLUDE)

# Unreal Engine doesn't include MikkTSpace on Android.
# So add our own.
Expand Down
2 changes: 1 addition & 1 deletion extern/cesium-native
Submodule cesium-native updated 98 files
+0 −67 .gitmodules
+153 −159 CMakeLists.txt
+1 −6 Cesium3DTiles/CMakeLists.txt
+6 −12 Cesium3DTilesContent/CMakeLists.txt
+0 −1 Cesium3DTilesContent/include/Cesium3DTilesContent/GltfConverterResult.h
+2 −2 Cesium3DTilesContent/include/Cesium3DTilesContent/GltfConverterUtility.h
+1 −3 Cesium3DTilesContent/src/B3dmToGltfConverter.cpp
+1 −1 Cesium3DTilesContent/src/BatchTableToGltfStructuralMetadata.cpp
+2 −2 Cesium3DTilesContent/src/GltfConverterUtility.cpp
+16 −7 Cesium3DTilesContent/src/I3dmToGltfConverter.cpp
+1 −1 Cesium3DTilesContent/src/PntsToGltfConverter.cpp
+4 −3 Cesium3DTilesContent/test/TestI3dmToGltfConverter.cpp
+1 −6 Cesium3DTilesReader/CMakeLists.txt
+8 −22 Cesium3DTilesSelection/CMakeLists.txt
+0 −12 Cesium3DTilesSelection/include/Cesium3DTilesSelection/tinyxml-cesium.h
+1 −2 Cesium3DTilesSelection/src/CesiumIonTilesetLoader.cpp
+1 −0 Cesium3DTilesSelection/src/LayerJsonTerrainLoader.cpp
+1 −1 Cesium3DTilesSelection/src/TilesetContentManager.cpp
+1 −1 Cesium3DTilesSelection/src/TilesetJsonLoader.cpp
+0 −12 Cesium3DTilesSelection/src/tinyxml2.h
+1 −6 Cesium3DTilesWriter/CMakeLists.txt
+6 −18 CesiumAsync/CMakeLists.txt
+49 −7 CesiumAsync/src/QueuedScheduler.cpp
+2 −1 CesiumAsync/src/SqliteCache.cpp
+1 −4 CesiumGeometry/CMakeLists.txt
+5 −7 CesiumGeospatial/CMakeLists.txt
+3 −1 CesiumGeospatial/src/S2CellID.cpp
+18 −12 CesiumGeospatial/test/TestS2CellID.cpp
+2 −5 CesiumGltf/CMakeLists.txt
+12 −1 CesiumGltf/include/CesiumGltf/MetadataConversions.h
+0 −5 CesiumGltfContent/CMakeLists.txt
+6 −12 CesiumGltfReader/CMakeLists.txt
+2 −5 CesiumGltfWriter/CMakeLists.txt
+2 −18 CesiumIonClient/CMakeLists.txt
+14 −51 CesiumIonClient/src/fillWithRandomBytes.cpp
+1 −6 CesiumJsonReader/CMakeLists.txt
+0 −5 CesiumJsonWriter/CMakeLists.txt
+9 −3 CesiumNativeTests/CMakeLists.txt
+2 −1 CesiumNativeTests/src/test-main.cpp
+4 −8 CesiumQuantizedMeshTerrain/CMakeLists.txt
+1 −0 CesiumQuantizedMeshTerrain/src/QuantizedMeshLoader.cpp
+2 −16 CesiumRasterOverlays/CMakeLists.txt
+1 −0 CesiumRasterOverlays/src/BingMapsRasterOverlay.cpp
+1 −3 CesiumRasterOverlays/src/IonRasterOverlay.cpp
+6 −18 CesiumUtility/CMakeLists.txt
+71 −0 CesiumUtility/include/CesiumUtility/Log.h
+6 −6 CesiumUtility/src/Gunzip.cpp
+0 −6 ThirdParty.json
+5 −0 cmake/compiler.cmake
+16 −0 cmake/defaults.cmake
+280 −0 cmake/ezvcpkg/ezvcpkg.cmake
+17 −0 cmake/macros/cesium_glob_files.cmake
+65 −0 cmake/macros/configure_cesium_library.cmake
+14 −0 cmake/macros/dump_cmake_variables.cmake
+32 −197 extern/CMakeLists.txt
+0 −1 extern/CSPRNG
+0 −1 extern/Catch2
+0 −1 extern/GSL
+0 −1 extern/KTX-Software
+0 −1 extern/PicoSHA2
+0 −1 extern/asyncplusplus
+0 −1 extern/cpp-httplib
+0 −1 extern/draco
+0 −1 extern/earcut
+0 −1 extern/expected-lite
+0 −1 extern/glm
+3 −0 extern/include/catch2/catch.hpp
+4 −0 extern/include/cesium-sqlite3.h
+0 −1 extern/libjpeg-turbo
+0 −1 extern/libmorton
+0 −1 extern/libwebp
+0 −1 extern/meshoptimizer
+0 −7 extern/modp_b64/CMakeLists.txt
+0 −33 extern/modp_b64/LICENSE
+0 −6 extern/modp_b64/README.cesium
+0 −17 extern/modp_b64/README.chromium
+0 −253 extern/modp_b64/modp_b64.cc
+0 −171 extern/modp_b64/modp_b64.h
+0 −481 extern/modp_b64/modp_b64_data.h
+0 −1 extern/rapidjson
+0 −1 extern/s2geometry
+0 −1 extern/spdlog
+0 −42 extern/sqlite3/CMakeLists.txt
+0 −7 extern/sqlite3/cesium-sqlite3.h
+0 −231,754 extern/sqlite3/sqlite3.c
+0 −12,237 extern/sqlite3/sqlite3.h
+0 −1 extern/stb
+0 −1 extern/tinyxml2
+0 −1 extern/uriparser
+122 −0 extern/vcpkg-overlays/ktx/0001-Use-vcpkg-zstd.patch
+17 −0 extern/vcpkg-overlays/ktx/0002-Fix-versioning.patch
+13 −0 extern/vcpkg-overlays/ktx/0003-mkversion.patch
+21 −0 extern/vcpkg-overlays/ktx/0004-quirks.patch
+17 −0 extern/vcpkg-overlays/ktx/0005-no-vendored-libs.patch
+13 −0 extern/vcpkg-overlays/ktx/CESIUM-0001-do-not-define-_DEBUG.patch
+83 −0 extern/vcpkg-overlays/ktx/portfile.cmake
+37 −0 extern/vcpkg-overlays/ktx/vcpkg.json
+0 −1 extern/zlib
Loading