Skip to content

Commit ac52d9f

Browse files
authored
Merge pull request #1716 from CesiumGS/add-macos-unreal-engine-root-environment-var-to-cmake
Added default UNREAL_ENGINE_ROOT value for MacOS
2 parents 3d3ced2 + d03b1cd commit ac52d9f

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

extern/CMakeLists.txt

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,17 @@ if (DEFINED ENV{UNREAL_ENGINE_ROOT} AND NOT UNREAL_ENGINE_ROOT)
1111
endif()
1212

1313
if (NOT UNREAL_ENGINE_ROOT)
14-
# On Windows, try to use the default UE 5.4 location
15-
set(WINDOWS_DEFAULT_UNREAL_INSTALLATION "C:/Program Files/Epic Games/UE_5.4")
16-
if (WIN32 AND EXISTS "${WINDOWS_DEFAULT_UNREAL_INSTALLATION}")
17-
set(UNREAL_ENGINE_ROOT "${WINDOWS_DEFAULT_UNREAL_INSTALLATION}")
14+
# On Windows and Mac, try to use the default UE 5.4 location
15+
if (WIN32)
16+
set(DEFAULT_UNREAL_INSTALLATION "C:/Program Files/Epic Games/UE_5.4")
17+
elseif(APPLE)
18+
set(DEFAULT_UNREAL_INSTALLATION "/Users/Shared/Epic Games/UE_5.4")
19+
endif()
20+
21+
if (NOT EXISTS "${DEFAULT_UNREAL_INSTALLATION}")
22+
message(FATAL_ERROR "Please specify the root of your Unreal Engine installation, either by setting the UNREAL_ENGINE_ROOT environment variable or with -DUNREAL_ENGINE_ROOT=path on the cmake command-line.")
1823
else()
19-
message(FATAL_ERROR "Please specify the root of your Unreal Engine installation, either by setting the UNREAL_ENGINE_ROOT environment variable or with -DUNREAL_ENGINE_ROOT=path on the cmake command-line.")
24+
set(UNREAL_ENGINE_ROOT "${DEFAULT_UNREAL_INSTALLATION}")
2025
endif()
2126
endif()
2227

0 commit comments

Comments
 (0)