CMake: remove data_dir from build
This commit is contained in:
		| @@ -24,7 +24,6 @@ set(TWN_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE INTERNAL "") | |||||||
|  |  | ||||||
| # feature configuration, set them with -DFEATURE=ON/OFF in cli | # feature configuration, set them with -DFEATURE=ON/OFF in cli | ||||||
| option(TWN_FEATURE_DYNLIB_GAME  "Enable dynamic library loading support" ON) | option(TWN_FEATURE_DYNLIB_GAME  "Enable dynamic library loading support" ON) | ||||||
| option(TWN_ARCHIVE_DATA         "Enable archival of assets"              OFF) |  | ||||||
|  |  | ||||||
| # todo: figure out how to compile for dynamic linking instead | # todo: figure out how to compile for dynamic linking instead | ||||||
| if(EMSCRIPTEN) | if(EMSCRIPTEN) | ||||||
| @@ -250,7 +249,7 @@ function(link_deps target) | |||||||
| endfunction() | endfunction() | ||||||
|  |  | ||||||
|  |  | ||||||
| function(use_townengine target sources output_directory data_dir) | function(use_townengine target sources output_directory) | ||||||
|         if(TWN_FEATURE_DYNLIB_GAME) |         if(TWN_FEATURE_DYNLIB_GAME) | ||||||
|                 # game shared library, for reloading |                 # game shared library, for reloading | ||||||
|                 add_library(${target}_game SHARED ${sources}) |                 add_library(${target}_game SHARED ${sources}) | ||||||
| @@ -305,13 +304,6 @@ function(use_townengine target sources output_directory data_dir) | |||||||
|                                                                                  $<TARGET_FILE_DIR:${target}_app> |                                                                                  $<TARGET_FILE_DIR:${target}_app> | ||||||
|                                    COMMAND_EXPAND_LISTS) |                                    COMMAND_EXPAND_LISTS) | ||||||
|         endif() |         endif() | ||||||
|  |  | ||||||
|         if (TWN_ARCHIVE_DATA) |  | ||||||
|                 # zip up assets |  | ||||||
|                 add_custom_target(archive-data ALL |  | ||||||
|                                   COMMAND cd ${data_dir} && ${CMAKE_COMMAND} -E tar "cf" ${output_directory}/data.${PACKAGE_EXTENSION} --format=zip ./ |  | ||||||
|                                   WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) |  | ||||||
|         endif() |  | ||||||
| endfunction() | endfunction() | ||||||
|  |  | ||||||
| give_options_without_warnings(twn_third_parties) | give_options_without_warnings(twn_third_parties) | ||||||
|   | |||||||
| @@ -20,4 +20,4 @@ set(SOURCE_FILES | |||||||
|         scenes/ingame.c scenes/ingame.h |         scenes/ingame.c scenes/ingame.h | ||||||
| ) | ) | ||||||
|  |  | ||||||
| use_townengine(${PROJECT_NAME} "${SOURCE_FILES}" ${CMAKE_CURRENT_SOURCE_DIR} ../../common-data) | use_townengine(${PROJECT_NAME} "${SOURCE_FILES}" ${CMAKE_CURRENT_SOURCE_DIR}) | ||||||
|   | |||||||
| @@ -17,4 +17,4 @@ set(SOURCE_FILES | |||||||
|         scenes/ingame.c scenes/ingame.h |         scenes/ingame.c scenes/ingame.h | ||||||
| ) | ) | ||||||
|  |  | ||||||
| use_townengine(${PROJECT_NAME} "${SOURCE_FILES}" ${CMAKE_CURRENT_SOURCE_DIR} ../../common-data) | use_townengine(${PROJECT_NAME} "${SOURCE_FILES}" ${CMAKE_CURRENT_SOURCE_DIR}) | ||||||
|   | |||||||
| @@ -13,4 +13,4 @@ set(SOURCE_FILES | |||||||
|         state.h |         state.h | ||||||
| ) | ) | ||||||
|  |  | ||||||
| use_townengine(${PROJECT_NAME} "${SOURCE_FILES}" ${CMAKE_CURRENT_SOURCE_DIR} ../../common-data) | use_townengine(${PROJECT_NAME} "${SOURCE_FILES}" ${CMAKE_CURRENT_SOURCE_DIR}) | ||||||
|   | |||||||
| @@ -74,4 +74,4 @@ set(SOURCE_FILES | |||||||
| ) | ) | ||||||
|  |  | ||||||
|  |  | ||||||
| use_townengine(${PROJECT_NAME} "${SOURCE_FILES}" ${CMAKE_CURRENT_SOURCE_DIR} ../../data) | use_townengine(${PROJECT_NAME} "${SOURCE_FILES}" ${CMAKE_CURRENT_SOURCE_DIR}) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user