diff --git a/cmake/OpenMWMacros.cmake b/cmake/OpenMWMacros.cmake index 8263763a22..4f363fb639 100644 --- a/cmake/OpenMWMacros.cmake +++ b/cmake/OpenMWMacros.cmake @@ -2,8 +2,11 @@ macro (add_openmw_dir dir) set (files) foreach (u ${ARGN}) -list (APPEND files "${dir}/${u}.*") -list (APPEND OPENMW_FILES "${dir}/${u}") +file (GLOB ALL RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "${dir}/${u}.*") +foreach (f ${ALL}) +list (APPEND files "${f}") +list (APPEND OPENMW_FILES "${f}") +endforeach (f) endforeach (u) source_group ("apps\\openmw\\${dir}" FILES ${files}) endmacro (add_openmw_dir)