From 17a5c22c8ff25dd29d5a29ca333962269723f882 Mon Sep 17 00:00:00 2001 From: scrawl Date: Fri, 20 Jul 2012 23:31:49 +0200 Subject: [PATCH] don't use globbing --- cmake/OpenMWMacros.cmake | 7 ++-- files/CMakeLists.txt | 49 ++++++++++++++++++++++++--- files/mygui/CMakeLists.txt | 68 +++++++++++++++++++++++++++++++++++++- 3 files changed, 115 insertions(+), 9 deletions(-) diff --git a/cmake/OpenMWMacros.cmake b/cmake/OpenMWMacros.cmake index c2567830d..e6f45fdb1 100644 --- a/cmake/OpenMWMacros.cmake +++ b/cmake/OpenMWMacros.cmake @@ -23,10 +23,9 @@ endforeach (u) source_group ("components\\${dir}" FILES ${files}) endmacro (add_component_dir) -macro (copy_all_files file_expression destination_dir) -file (GLOB ALL "${file_expression}") -foreach (f ${ALL}) +macro (copy_all_files source_dir destination_dir files) +foreach (f ${files}) get_filename_component(filename ${f} NAME) -configure_file(${f} ${destination_dir}/${filename} COPYONLY) +configure_file(${source_dir}/${f} ${destination_dir}/${filename} COPYONLY) endforeach (f) endmacro (copy_all_files) diff --git a/files/CMakeLists.txt b/files/CMakeLists.txt index ce8bc9fbd..3e99f5745 100644 --- a/files/CMakeLists.txt +++ b/files/CMakeLists.txt @@ -1,9 +1,50 @@ project(resources) -copy_all_files(${CMAKE_CURRENT_SOURCE_DIR}/water/* "${OpenMW_BINARY_DIR}/resources/water/") +set(WATER_FILES + underwater_dome.mesh + water_nm.png +) -copy_all_files(${CMAKE_CURRENT_SOURCE_DIR}/gbuffer/* "${OpenMW_BINARY_DIR}/resources/gbuffer/") +set(GBUFFER_FILES + gbuffer.compositor +) -copy_all_files(${CMAKE_CURRENT_SOURCE_DIR}/shadows/* "${OpenMW_BINARY_DIR}/resources/shadows/") +set(MATERIAL_FILES + atmosphere.shader + atmosphere.shaderset + clouds.shader + clouds.shaderset + core.h + moon.shader + moon.shaderset + objects.mat + objects.shader + objects.shaderset + openmw.configuration + quad2.shader + quad.mat + quad.shader + quad.shaderset + shadowcaster.mat + shadowcaster.shader + shadowcaster.shaderset + shadows.h + sky.mat + stars.shader + stars.shaderset + sun.shader + sun.shaderset + terrain.shader + terrain.shaderset + underwater.h + water.mat + water.shader + water.shaderset -copy_all_files(${CMAKE_CURRENT_SOURCE_DIR}/materials/* "${OpenMW_BINARY_DIR}/resources/materials/") +) + +copy_all_files(${CMAKE_CURRENT_SOURCE_DIR}/water "${OpenMW_BINARY_DIR}/resources/water/" "${WATER_FILES}") + +copy_all_files(${CMAKE_CURRENT_SOURCE_DIR}/gbuffer "${OpenMW_BINARY_DIR}/resources/gbuffer/" "${GBUFFER_FILES}") + +copy_all_files(${CMAKE_CURRENT_SOURCE_DIR}/materials "${OpenMW_BINARY_DIR}/resources/materials/" "${MATERIAL_FILES}") diff --git a/files/mygui/CMakeLists.txt b/files/mygui/CMakeLists.txt index b8a04a31c..ae007f023 100644 --- a/files/mygui/CMakeLists.txt +++ b/files/mygui/CMakeLists.txt @@ -3,4 +3,70 @@ set(SDIR ${CMAKE_CURRENT_SOURCE_DIR}) set(DDIR ${OpenMW_BINARY_DIR}/resources/mygui) -copy_all_files(${SDIR}/* ${DDIR}) +set(MYGUI_FILES + atlas1.cfg + bigbars.png + black.png + core.skin + core.xml + EBGaramond-Regular.ttf + mwgui.png + Obliviontt.zip + openmw_alchemy_window.layout + openmw_book.layout + openmw_box.skin.xml + openmw_button.skin.xml + openmw_chargen_birth.layout + openmw_chargen_class_description.layout + openmw_chargen_class.layout + openmw_chargen_create_class.layout + openmw_chargen_generate_class_result.layout + openmw_chargen_race.layout + openmw_chargen_review.layout + openmw_chargen_select_attribute.layout + openmw_chargen_select_skill.layout + openmw_chargen_select_specialization.layout + openmw_confirmation_dialog.layout + openmw_console.layout + openmw_console.skin.xml + openmw_container_window.layout + openmw_count_window.layout + openmw_dialogue_window.layout + openmw_dialogue_window_skin.xml + openmw_edit.skin.xml + openmw.font.xml + openmw_hud_box.skin.xml + openmw_hud_energybar.skin.xml + openmw_hud.layout + openmw_infobox.layout + openmw_interactive_messagebox.layout + openmw_inventory_window.layout + openmw_journal.layout + openmw_journal_skin.xml + openmw_layers.xml + openmw_list.skin.xml + openmw_mainmenu.layout + openmw_mainmenu_skin.xml + openmw_map_window.layout + openmw_map_window_skin.xml + openmw_messagebox.layout + openmw.pointer.xml + openmw_progress.skin.xml + openmw_resources.xml + openmw_scroll.layout + openmw_scroll_skin.xml + openmw_settings_window.layout + openmw_settings.xml + openmw_spell_window.layout + openmw_stats_window.layout + openmw_text_input.layout + openmw_text.skin.xml + openmw_tooltips.layout + openmw_trade_window.layout + openmw_windows.skin.xml + smallbars.png + VeraMono.ttf +) + + +copy_all_files(${CMAKE_CURRENT_SOURCE_DIR} ${DDIR} "${MYGUI_FILES}")