From ec79334e0ccb35e520d467499494bdfd61f84362 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Janiszewski?= Date: Fri, 16 Feb 2018 15:14:52 +0100 Subject: [PATCH] Allow caching title sequences in data/ --- CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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\