2011-10-22 11:55:06 +00:00
|
|
|
|
|
|
|
macro (add_openmw_dir dir)
|
|
|
|
set (files)
|
|
|
|
foreach (u ${ARGN})
|
2013-02-27 22:44:20 +00:00
|
|
|
file (GLOB ALL "${dir}/${u}.[ch]pp")
|
2011-10-30 17:43:27 +00:00
|
|
|
foreach (f ${ALL})
|
|
|
|
list (APPEND files "${f}")
|
|
|
|
list (APPEND OPENMW_FILES "${f}")
|
|
|
|
endforeach (f)
|
2011-10-22 11:55:06 +00:00
|
|
|
endforeach (u)
|
2011-10-22 14:46:28 +00:00
|
|
|
source_group ("apps\\openmw\\${dir}" FILES ${files})
|
2011-10-22 11:55:06 +00:00
|
|
|
endmacro (add_openmw_dir)
|
2011-11-06 08:30:15 +00:00
|
|
|
|
|
|
|
macro (add_component_dir dir)
|
|
|
|
set (files)
|
|
|
|
foreach (u ${ARGN})
|
2013-02-27 22:44:20 +00:00
|
|
|
file (GLOB ALL "${dir}/${u}.[ch]pp")
|
2011-11-06 08:30:15 +00: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-03 22:26:57 +00:00
|
|
|
|
2013-01-27 21:40:38 +00:00
|
|
|
macro (add_component_qt_dir dir)
|
|
|
|
set (files)
|
|
|
|
foreach (u ${ARGN})
|
2013-02-27 22:44:20 +00:00
|
|
|
file (GLOB ALL "${dir}/${u}.[ch]pp")
|
2013-01-27 21:40:38 +00:00
|
|
|
foreach (f ${ALL})
|
|
|
|
list (APPEND files "${f}")
|
|
|
|
list (APPEND COMPONENT_FILES "${f}")
|
|
|
|
endforeach (f)
|
2013-02-27 22:44:20 +00:00
|
|
|
file (GLOB MOC_H "${dir}/${u}.hpp")
|
2013-01-27 21:40:38 +00:00
|
|
|
foreach (fi ${MOC_H})
|
|
|
|
list (APPEND COMPONENT_MOC_FILES "${fi}")
|
|
|
|
endforeach (fi)
|
|
|
|
endforeach (u)
|
|
|
|
source_group ("components\\${dir}" FILES ${files})
|
|
|
|
endmacro (add_component_qt_dir)
|
|
|
|
|
2012-07-20 21:31:49 +00:00
|
|
|
macro (copy_all_files source_dir destination_dir files)
|
|
|
|
foreach (f ${files})
|
2012-07-03 22:26:57 +00:00
|
|
|
get_filename_component(filename ${f} NAME)
|
2012-07-20 21:31:49 +00:00
|
|
|
configure_file(${source_dir}/${f} ${destination_dir}/${filename} COPYONLY)
|
2012-07-03 22:26:57 +00:00
|
|
|
endforeach (f)
|
|
|
|
endmacro (copy_all_files)
|
2013-02-03 12:30:40 +00:00
|
|
|
|
|
|
|
macro (add_file project type file)
|
|
|
|
list (APPEND ${project}${type} ${file})
|
|
|
|
endmacro (add_file)
|
|
|
|
|
|
|
|
macro (add_unit project dir unit)
|
|
|
|
add_file (${project} _HDR ${comp} "${dir}/${unit}.hpp")
|
|
|
|
add_file (${project} _SRC ${comp} "${dir}/${unit}.cpp")
|
|
|
|
endmacro (add_unit)
|
|
|
|
|
|
|
|
macro (add_qt_unit project dir unit)
|
|
|
|
add_file (${project} _HDR ${comp} "${dir}/${unit}.hpp")
|
|
|
|
add_file (${project} _HDR_QT ${comp} "${dir}/${unit}.hpp")
|
|
|
|
add_file (${project} _SRC ${comp} "${dir}/${unit}.cpp")
|
|
|
|
endmacro (add_qt_unit)
|
|
|
|
|
|
|
|
macro (add_hdr project dir unit)
|
|
|
|
add_file (${project} _HDR ${comp} "${dir}/${unit}.hpp")
|
|
|
|
endmacro (add_hdr)
|
|
|
|
|
|
|
|
macro (add_qt_hdr project dir unit)
|
|
|
|
add_file (${project} _HDR ${comp} "${dir}/${unit}.hpp")
|
|
|
|
add_file (${project} _HDR_QT ${comp} "${dir}/${unit}.hpp")
|
|
|
|
endmacro (add_qt_hdr)
|
|
|
|
|
|
|
|
macro (opencs_units dir)
|
|
|
|
foreach (u ${ARGN})
|
|
|
|
add_qt_unit (OPENCS ${dir} ${u})
|
|
|
|
endforeach (u)
|
|
|
|
endmacro (opencs_units)
|
|
|
|
|
|
|
|
macro (opencs_units_noqt dir)
|
|
|
|
foreach (u ${ARGN})
|
|
|
|
add_unit (OPENCS ${dir} ${u})
|
|
|
|
endforeach (u)
|
2013-02-03 15:18:17 +00:00
|
|
|
endmacro (opencs_units_noqt)
|
2013-02-03 12:30:40 +00:00
|
|
|
|
|
|
|
macro (opencs_hdrs dir)
|
|
|
|
foreach (u ${ARGN})
|
|
|
|
add_qt_hdr (OPENCS ${dir} ${u})
|
|
|
|
endforeach (u)
|
|
|
|
endmacro (opencs_hdrs)
|
|
|
|
|
|
|
|
macro (opencs_hdrs_noqt dir)
|
|
|
|
foreach (u ${ARGN})
|
|
|
|
add_hdr (OPENCS ${dir} ${u})
|
|
|
|
endforeach (u)
|
2013-02-03 15:18:17 +00:00
|
|
|
endmacro (opencs_hdrs_noqt)
|