diff --git a/CMakeLists.txt b/CMakeLists.txt index 8c438a905d..0541e1d64c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -199,10 +199,10 @@ list(APPEND DOC_FILES "${ROOT_DIR}/contributors.md" # targets, like `install`, so we have to trick it and execute dependency ourselves. install(CODE "execute_process(COMMAND \"${CMAKE_COMMAND}\" --build \"${CMAKE_CURRENT_BINARY_DIR}\" --target g2)") if (DOWNLOAD_TITLE_SEQUENCES) - # If openrct2.parkseq exists, assume all the title sequences are already present + # If openrct2.parkseq or data/title/ exists, assume all the title sequences are already present install(CODE - "if (EXISTS \"\$ENV{DESTDIR}/${CMAKE_INSTALL_FULL_DATADIR}/${PROJECT}/title/openrct2.parkseq\")\n\ - message(\"Using cache title sequences\")\n\ + "if (EXISTS \"\$ENV{DESTDIR}/${CMAKE_INSTALL_FULL_DATADIR}/${PROJECT}/title/openrct2.parkseq\" OR EXISTS ${CMAKE_SOURCE_DIR}/data/title/)\n\ + message(\"Using cached title sequences\")\n\ else () \n\ file(DOWNLOAD ${TITLE_SEQUENCE_URL} \$ENV{DESTDIR}${CMAKE_INSTALL_FULL_DATADIR}/${PROJECT}/title/title-sequences.zip EXPECTED_HASH SHA1=${TITLE_SEQUENCE_SHA1} SHOW_PROGRESS)\n\ execute_process(COMMAND \"${CMAKE_COMMAND}\" -E chdir \$ENV{DESTDIR}${CMAKE_INSTALL_FULL_DATADIR}/${PROJECT}/title/ \"${CMAKE_COMMAND}\" -E tar xvf title-sequences.zip)\n\