-#| Debugging Module
-include ( "${DebugModulePath}/setup.cmake" )
-PathPrepend( DEBUG_SRCS ${DebugModulePath} ${DEBUG_SRCS} )
+ # Check if this is a main module add
+ foreach ( extraArg ${ARGN} )
+ # Display detected source files
+ if ( NOT DEFINED SubModule )
+ message ( STATUS "Detected ${ModuleType} Module Source Files:" )
+ message ( "${${ModuleType}_SRCS}" )
+ endif ()
+ endforeach ()
+
+ # Check for any capabilities.kll files in the Module
+ set ( kll_capabilities_file "${ModuleFullPath}/capabilities.kll" )
+ if ( EXISTS ${kll_capabilities_file} )
+ # Add the kll file and any submodule kll files to the running list
+ set ( ${ModuleType}Module_KLL ${${ModuleType}Module_KLL} ${kll_capabilities_file} )
+ endif ()
+
+
+ # Finally, add the sources and kll files to the parent scope (i.e. return)
+ set ( ${ModuleType}_SRCS ${${ModuleType}_SRCS} PARENT_SCOPE )
+ set ( ${ModuleType}Module_KLL ${${ModuleType}Module_KLL} PARENT_SCOPE )
+endfunction ()