fix soh otr asset building not detecting textures (#2702)

This commit is contained in:
Adam Bird 2023-04-13 18:37:10 -04:00 committed by GitHub
parent 92fa54c3f9
commit 660c3ec3b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 3 deletions

View File

@ -108,7 +108,7 @@ find_package(Python3 COMPONENTS Interpreter)
add_custom_target(
ExtractAssets
# CMake versions prior to 3.17 do not have the rm command, use remove instead for older versions
COMMAND ${CMAKE_COMMAND} -E $<IF:$<VERSION_LESS:${CMAKE_VERSION},3.17>,remove,rm> -f oot.otr oot-mq.otr
COMMAND ${CMAKE_COMMAND} -E $<IF:$<VERSION_LESS:${CMAKE_VERSION},3.17>,remove,rm> -f oot.otr oot-mq.otr soh.otr
COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter/extract_assets.py -z "$<TARGET_FILE:ZAPD>" --non-interactive
COMMAND ${CMAKE_COMMAND} -DSOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR} -DBINARY_DIR=${CMAKE_BINARY_DIR} -P ${CMAKE_CURRENT_SOURCE_DIR}/copy-existing-otrs.cmake
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter

View File

@ -119,8 +119,8 @@ static void ExporterProgramEnd()
if (splitPath.size() >= 3)
{
const std::string& extension = splitPath.at(splitPath.size() - 1);
const std::string& format = splitPath.at(splitPath.size() - 2);
const std::string extension = splitPath.at(splitPath.size() - 1);
const std::string format = splitPath.at(splitPath.size() - 2);
splitPath.pop_back();
splitPath.pop_back();
std::string afterPath = std::accumulate(splitPath.begin(), splitPath.end(), std::string(""));

View File

@ -12,4 +12,7 @@ if(EXISTS ${SOURCE_DIR}/OTRExporter/soh.otr)
endif()
if(NOT EXISTS ${SOURCE_DIR}/oot.otr AND NOT EXISTS ${SOURCE_DIR}/oot-mq.otr)
message(FATAL_ERROR, "No OTR files found.")
endif()
if(NOT EXISTS ${SOURCE_DIR}/soh.otr)
message(FATAL_ERROR, "No soh OTR found.")
endif()