From: Thomas Debesse Date: Sun, 16 Jun 2019 14:24:52 +0000 (+0200) Subject: cmake: allow to set an arbitrary directory to store downloaded gamepacks X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=3ff95653fd145f6b33687ad613eb07da73884e1a;p=xonotic%2Fnetradiant.git 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 --- 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 ()