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