file(COPY ${DATA_FILES} DESTINATION "${CMAKE_BINARY_DIR}/docs")
endif()
+option(DOWNLOAD_GAMEPACKS "Download game packs" ON)
+if(DOWNLOAD_GAMEPACKS)
+ add_custom_target(game_packs ALL
+ COMMAND ${CMAKE_COMMAND} -E make_directory games
+ COMMAND DOWNLOAD_GAMEPACKS=yes SOURCE_DIR="${CMAKE_SOURCE_DIR}" "${CMAKE_SOURCE_DIR}/install-gamepacks.sh" "${CMAKE_BINARY_DIR}"
+ )
+endif()
: ${SH:=sh}
: ${CP:=cp}
: ${CP_R:=cp -r}
+: ${SOURCE_DIR:=.}
dest=$1
case "$DOWNLOAD_GAMEPACKS" in
yes)
- LICENSEFILTER=GPL BATCH=1 $SH download-gamepacks.sh
+ LICENSEFILTER=GPL BATCH=1 $SH "$SOURCE_DIR/download-gamepacks.sh"
;;
all)
- BATCH=1 $SH download-gamepacks.sh
+ BATCH=1 $SH "$SOURCE_DIR/download-gamepacks.sh"
;;
*)
;;
for GAME in games/*; do
if [ "$GAME" = "games/*" ]; then
$ECHO "Game packs not found, please run"
- $ECHO " ./download-gamepacks.sh"
+ $ECHO " $SOURCE_DIR/download-gamepacks.sh"
$ECHO "and then try again!"
else
- $SH install-gamepack.sh "$GAME" "$dest"
+ $SH "$SOURCE_DIR/install-gamepack.sh" "$GAME" "$dest"
fi
done