From 3ff95653fd145f6b33687ad613eb07da73884e1a Mon Sep 17 00:00:00 2001 From: Thomas Debesse Date: Sun, 16 Jun 2019 16:24:52 +0200 Subject: [PATCH] cmake: allow to set an arbitrary directory to store downloaded gamepacks this is useful when you have as many as build directories as os/arch combination but want to download game packs only once --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d16f7941..5c388a5e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -37,6 +37,8 @@ if (FHS_INSTALL) set(RADIANT_DATA_DIR ${CMAKE_INSTALL_PREFIX}/share/${RADIANT_BASENAME}) endif () +set(GAMEPACKS_DOWNLOAD_DIR ${PROJECT_BINARY_DIR}/download CACHE PATH "Where to store downloaded game packs") + #----------------------------------------------------------------------- # Version #----------------------------------------------------------------------- @@ -322,7 +324,7 @@ set(GAMEPACKS_NAME_LIST none CACHE STRING "Download game packs by name") if (DOWNLOAD_GAMEPACKS) add_custom_target(game_packs ALL - COMMAND "${PROJECT_SOURCE_DIR}/gamepack-manager" --license ${GAMEPACKS_LICENSE_LIST} --name ${GAMEPACKS_NAME_LIST} --download-dir "${PROJECT_BINARY_DIR}/download" --install-dir "${PROJECT_BINARY_DIR}" --download --install + COMMAND "${PROJECT_SOURCE_DIR}/gamepack-manager" --license ${GAMEPACKS_LICENSE_LIST} --name ${GAMEPACKS_NAME_LIST} --download-dir "${GAMEPACKS_DOWNLOAD_DIR}" --install-dir "${PROJECT_BINARY_DIR}" --download --install COMMENT "Downloading game packs" ) endif () -- 2.39.2