diff --git a/DuneCommonConfig.cmake.in b/DuneCommonConfig.cmake.in
index a6ffcb812cbe473e4f18ae7299cd97e10500f161..6e5c28a23aa2718afcd208368af3a8928dbaa2e6 100644
--- a/DuneCommonConfig.cmake.in
+++ b/DuneCommonConfig.cmake.in
@@ -12,4 +12,5 @@ set(@DUNE_MOD_NAME_UPPERCASE@_CXX_FLAGS "@CMAKE_CXX_FLAGS@")
 set(@DUNE_MOD_NAME_UPPERCASE@_CXX_FLAGS_DEBUG "@CMAKE_CXX_FLAGS_DEBUG@")
 set(@DUNE_MOD_NAME_UPPERCASE@_CXX_FLAGS_MINSIZEREL "@CMAKE_CXX_FLAGS_MINSIZEREL@")
 set(@DUNE_MOD_NAME_UPPERCASE@_CXX_FLAGS_RELEASE "@CMAKE_CXX_FLAGS_RELEASE@")
-set(@DUNE_MOD_NAME_UPPERCASE@_CXX_FLAGS_RELWITHDEBINFO "@CMAKE_CXX_FLAGS_RELWITHDEBINFO@")
\ No newline at end of file
+set(@DUNE_MOD_NAME_UPPERCASE@_CXX_FLAGS_RELWITHDEBINFO "@CMAKE_CXX_FLAGS_RELWITHDEBINFO@")
+set(@DUNE_MOD_NAME_UPPERCASE@_LIBS "dunecommon")
\ No newline at end of file
diff --git a/cmake/modules/DuneMacros.cmake b/cmake/modules/DuneMacros.cmake
index d7446063e4cd6761150e26fcec643256bd643a59..39a4c9855c60ac4497a0f2c16e78994fa6cf7795 100644
--- a/cmake/modules/DuneMacros.cmake
+++ b/cmake/modules/DuneMacros.cmake
@@ -195,6 +195,14 @@ macro(dune_project)
     # set includes
     dune_module_to_uppercase(_upper_case "${_mod}")
     include_directories("${${_upper_case}_INCLUDE_DIRS}")
+    message("${_upper_case}_LIBS=${${_upper_case}_LIBS}")
+    if(${_upper_case}_LIBS)
+      foreach(_lib ${${_upper_case}_LIBS})
+	message("_lib=${_lib}")
+	list(APPEND DUNE_DEFAULT_LIBS "${_lib}")
+      endforeach(_lib ${${_upper_case}_LIBS})
+      message("DUNE_DEFAULT_LIBS=${DUNE_DEFAULT_LIBS}")
+    endif(${_upper_case}_LIBS)
   endforeach(_mod DEPENDENCY_TREE)
 
   # Search for a cmake files containing tests and directives
@@ -290,7 +298,11 @@ MACRO(finalize_dune_project)
 ENDMACRO(finalize_dune_project)
 
 MACRO(target_link_dune_default_libraries _target)
-  add_DUNE_MPI_flags(${_target})
+  message("libs ${DUNE_DEFAULT_LIBS}")
+  foreach(_lib ${DUNE_DEFAULT_LIBS})
+    message("lib=${_lib}")
+    target_link_libraries(${_target} ${_lib})
+  endforeach(_lib ${DUNE_DEFAULT_LIBS})
 ENDMACRO(target_link_dune_default_libraries)