Compare commits
2 Commits
0f60f0f657
...
6f876678f5
| Author | SHA1 | Date | |
|---|---|---|---|
| 6f876678f5 | |||
| 2326857a43 |
@@ -32,11 +32,15 @@ if(NOT TARGET XCEngine)
|
||||
option(XCENGINE_ENABLE_MONO_SCRIPTING "Build the Mono-based C# scripting runtime" ON)
|
||||
|
||||
if(NOT DEFINED XCENGINE_MONO_ROOT_DIR OR XCENGINE_MONO_ROOT_DIR STREQUAL "")
|
||||
file(GLOB XCENGINE_MONO_ROOT_DIR_CANDIDATES "${XCENGINE_ROOT_DIR}/*/Fermion/Fermion/external/mono")
|
||||
if(XCENGINE_MONO_ROOT_DIR_CANDIDATES)
|
||||
list(GET XCENGINE_MONO_ROOT_DIR_CANDIDATES 0 XCENGINE_MONO_ROOT_DIR_DEFAULT)
|
||||
if(EXISTS "${XCENGINE_ROOT_DIR}/engine/third_party/mono/binary/mscorlib.dll")
|
||||
set(XCENGINE_MONO_ROOT_DIR_DEFAULT "${XCENGINE_ROOT_DIR}/engine/third_party/mono")
|
||||
else()
|
||||
set(XCENGINE_MONO_ROOT_DIR_DEFAULT "${XCENGINE_ROOT_DIR}/managed/mono")
|
||||
file(GLOB XCENGINE_MONO_ROOT_DIR_CANDIDATES "${XCENGINE_ROOT_DIR}/*/Fermion/Fermion/external/mono")
|
||||
if(XCENGINE_MONO_ROOT_DIR_CANDIDATES)
|
||||
list(GET XCENGINE_MONO_ROOT_DIR_CANDIDATES 0 XCENGINE_MONO_ROOT_DIR_DEFAULT)
|
||||
else()
|
||||
set(XCENGINE_MONO_ROOT_DIR_DEFAULT "${XCENGINE_ROOT_DIR}/managed/mono")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(
|
||||
|
||||
@@ -48,6 +48,11 @@ std::filesystem::path FindBundledMonoRootDirectory(const std::filesystem::path&
|
||||
return {};
|
||||
}
|
||||
|
||||
const std::filesystem::path projectBundledMonoRoot = repositoryRoot / "engine" / "third_party" / "mono";
|
||||
if (std::filesystem::exists(projectBundledMonoRoot / "binary" / "mscorlib.dll", ec)) {
|
||||
return projectBundledMonoRoot.lexically_normal();
|
||||
}
|
||||
|
||||
for (std::filesystem::directory_iterator it(repositoryRoot, ec), end; it != end && !ec; it.increment(ec)) {
|
||||
if (ec || !it->is_directory(ec)) {
|
||||
continue;
|
||||
|
||||
@@ -715,7 +715,6 @@ if(MSVC)
|
||||
COMPILE_PDB_OUTPUT_DIRECTORY_RELEASE "${CMAKE_CURRENT_BINARY_DIR}/compile-pdb/Release"
|
||||
COMPILE_PDB_OUTPUT_DIRECTORY_MINSIZEREL "${CMAKE_CURRENT_BINARY_DIR}/compile-pdb/MinSizeRel"
|
||||
COMPILE_PDB_OUTPUT_DIRECTORY_RELWITHDEBINFO "${CMAKE_CURRENT_BINARY_DIR}/compile-pdb/RelWithDebInfo"
|
||||
VS_GLOBAL_UseMultiToolTask "false"
|
||||
)
|
||||
endif()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user