Skip to content

Commit

Permalink
[CMake] Ensure the appropriate data output dirs are created at config…
Browse files Browse the repository at this point in the history
…ure-time
  • Loading branch information
past-due committed Sep 7, 2023
1 parent a4ed9ea commit 5e42254
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions data/CMakeLists.txt
Expand Up @@ -223,9 +223,11 @@ if (WZ_INCLUDE_TERRAIN_HIGH)
endif()

file(REMOVE_RECURSE "${CMAKE_CURRENT_BINARY_DIR}/terrain_overrides/high")
file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/terrain_overrides/high/texpages")
file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/terrain_overrides/high/tileset")

set(high_texture_folders "texpages")
file(GLOB tertiles_dirs LIST_DIRECTORIES true RELATIVE "${_terrain_overrides_high_base_path}" "${_terrain_overrides_high_base_path}/texpages/tertilesc*hw-*")
file(GLOB tertiles_dirs LIST_DIRECTORIES true RELATIVE "${_terrain_overrides_high_base_path}" CONFIGURE_DEPENDS "${_terrain_overrides_high_base_path}/texpages/tertilesc*hw-*")
list(APPEND high_texture_folders ${tertiles_dirs})

foreach(tex_folder ${high_texture_folders})
Expand Down Expand Up @@ -255,7 +257,7 @@ if (WZ_INCLUDE_TERRAIN_HIGH)
endforeach()

set(_base_output_dir "${CMAKE_CURRENT_BINARY_DIR}/terrain_overrides/high")
file(GLOB_RECURSE ALL_TEXPAGES LIST_DIRECTORIES false "${_terrain_overrides_high_base_path}/texpages/*.*" "${_terrain_overrides_high_base_path}/tileset/*.*")
file(GLOB_RECURSE ALL_TEXPAGES LIST_DIRECTORIES false CONFIGURE_DEPENDS "${_terrain_overrides_high_base_path}/texpages/*.*" "${_terrain_overrides_high_base_path}/tileset/*.*")
list(APPEND ALL_TEXPAGES_unprocessed ${ALL_TEXPAGES})
list(REMOVE_ITEM ALL_TEXPAGES_unprocessed ${PROCESSED_TEXTURE_FILES})
foreach(TEXPAGE_FILE ${ALL_TEXPAGES_unprocessed})
Expand Down

0 comments on commit 5e42254

Please sign in to comment.