]> git.xonotic.org Git - xonotic/netradiant.git/commitdiff
cmake: allow to set an arbitrary directory to store downloaded gamepacks 132/head
authorThomas Debesse <dev@illwieckz.net>
Sun, 16 Jun 2019 14:24:52 +0000 (16:24 +0200)
committerThomas Debesse <dev@illwieckz.net>
Sun, 16 Jun 2019 15:42:54 +0000 (17:42 +0200)
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

index d16f794172255957172fcb7d98c8521faa0c32ad..5c388a5e06aff4927fec687bf009bee95a0bfc2e 100644 (file)
@@ -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 ()