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

32 lines
872 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
2012-07-20 23:31:49 +02:00
macro (copy_all_files source_dir destination_dir files)
foreach (f ${files})
2012-07-04 00:26:57 +02:00
get_filename_component(filename ${f} NAME)
2012-07-20 23:31:49 +02:00
configure_file(${source_dir}/${f} ${destination_dir}/${filename} COPYONLY)
2012-07-04 00:26:57 +02:00
endforeach (f)
endmacro (copy_all_files)