Unable to load terrain and other data in the scene after being compiled and packaged into a PC by cesium

I compiled according to these two command lines in the official document:

**cmake -B build -S . -DCMAKE_BUILD_TYPE=RelWithDebInfo**
**cmake --build build -j14 --target install --config RelWithDebInfo**

Subsequently, packaging was carried out in Unity, and the following error was reported:

**An error occurred while building CesiumForUnityNative. See G:\Unity\cesium\cesium-unity-samples\Packages\com.cesium.unity\native~\build-Standalone\build.log for details. The command-line was:**
**cmake --build "G:\Unity\cesium\cesium-unity-samples\Packages\com.cesium.unity\native~\build-Standalone" --config RelWithDebInfo --parallel 17 --target install**

And in the packaged exe scenario, nothing can be loaded. What is the reason for this?

Did you look in the log for details, like the message says? The answer will be in there.

The following errors are recorded in the log. How can I solve them?

– Selecting Windows SDK version 10.0.20348.0 to target Windows 10.0.19045.
CMake Warning (dev) at extern/tidy-html5/CMakeLists.txt:26 (project):
Policy CMP0048 is not set: project() command manages VERSION variables.
Run “cmake --help-policy CMP0048” for policy details. Use the cmake_policy
command to set the policy and suppress this warning.

The following variable(s) would be set to empty:


This warning is for project developers. Use -Wno-dev to suppress it.

→ TIDY_SO_VERSION = 59. This is an ODD (development) release.
– *** Debug Logging is NOT enabled.
– Using /MD DYNAMIC runtime
– *** Only building static library STATIC, version 5.9.14, date 2021.08.17
CMake Error at C:/Program Files/CMake/share/cmake-3.26/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find Bash (missing: BASH_EXECUTABLE)
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.26/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
extern/cesium-native/extern/KTX-Software/cmake/modules/FindBash.cmake:96 (find_package_handle_standard_args)
extern/cesium-native/extern/KTX-Software/CMakeLists.txt:8 (find_package)

– Configuring incomplete, errors occurred!

CMSBuild version 17.6.3+07e294721 for .NET Framework
MSBUILD : error MSB1009: ��Ŀ�ļ������ڡ�


The problem is here: Could NOT find Bash (missing: BASH_EXECUTABLE)

It can be solved by installing Git Bash.

But I just ran the command line using git bash

Hmm ok, is bash in your Path?


You’ll need to work out why the KTX-Software CMake scripts are unable to find it, then. This issue, along with the other issues it links to, may provide some things you can try: