From: Thomas Debesse Date: Fri, 31 May 2019 21:25:48 +0000 (+0200) Subject: cmake/gamepacks: tell cmake about the gamepack files and let it install them X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=2f2d300f7ced6af996ad91abbe3afdf90d3957aa;p=xonotic%2Fnetradiant.git cmake/gamepacks: tell cmake about the gamepack files and let it install them --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 098de3dc..fd6e6f5f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -172,8 +172,8 @@ endif () if (BUILD_BINARIES) if (APPLE) if (BUILD_RADIANT) - option(XWINDOWS "Build against X11" ON) - endif () + option(XWINDOWS "Build against X11" ON) + endif() add_definitions( -DPOSIX=1 @@ -189,8 +189,8 @@ if (BUILD_BINARIES) ) else () if (BUILD_RADIANT) - set(XWINDOWS ON) - endif() + set(XWINDOWS ON) + endif () add_definitions( -DPOSIX=1 @@ -351,9 +351,14 @@ if (DOWNLOAD_GAMEPACKS) else () set(GAME_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") endif () - install(CODE - "execute_process(COMMAND \"${PROJECT_SOURCE_DIR}/gamepack-manager\" --license ${GAMEPACKS_LICENSE_LIST} --name ${GAMEPACKS_NAME_LIST} --download-dir \"${PROJECT_BINARY_DIR}/download\" --install-dir \"${GAME_INSTALL_PREFIX}\" --install)" - ) + + file(GLOB GAME_DIRS ${PROJECT_BINARY_DIR}/*.game) + + install(DIRECTORY + ${PROJECT_BINARY_DIR}/games + ${GAME_DIRS} + DESTINATION ${RADIANT_DATA_SUBDIR} + ) endif() if(BUILD_BINARIES AND FHS_INSTALL AND NOT WIN32 AND NOT APPLE)