1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-25 06:35:30 +00:00
OpenMW/cmake/OpenMWMacros.cmake

33 lines
892 B
CMake
Raw Normal View History

2011-10-22 13:55:06 +02:00
macro (add_openmw_dir dir)
set (files)
foreach (u ${ARGN})
file (GLOB ALL ${CMAKE_CURRENT_SOURCE_DIR} "${dir}/${u}.[ch]pp")
foreach (f ${ALL})
list (APPEND files "${f}")
list (APPEND OPENMW_FILES "${f}")
endforeach (f)
2011-10-22 13:55:06 +02:00
endforeach (u)
2011-10-22 16:46:28 +02:00
source_group ("apps\\openmw\\${dir}" FILES ${files})
2011-10-22 13:55:06 +02:00
endmacro (add_openmw_dir)
2011-11-06 09:30:15 +01:00
macro (add_component_dir dir)
set (files)
foreach (u ${ARGN})
file (GLOB ALL ${CMAKE_CURRENT_SOURCE_DIR} "${dir}/${u}.[ch]pp")
2011-11-06 09:30:15 +01:00
foreach (f ${ALL})
list (APPEND files "${f}")
list (APPEND COMPONENT_FILES "${f}")
endforeach (f)
endforeach (u)
source_group ("components\\${dir}" FILES ${files})
endmacro (add_component_dir)
2012-07-04 00:26:57 +02:00
macro (copy_all_files file_expression destination_dir)
file (GLOB ALL "${file_expression}")
foreach (f ${ALL})
get_filename_component(filename ${f} NAME)
configure_file(${f} ${destination_dir}/${filename} COPYONLY)
endforeach (f)
endmacro (copy_all_files)