diff --git a/CMakeLists.txt b/CMakeLists.txt
index 700942b6dafdcafe49c0d7f10ce8bc9d6da53874..499676d063d54d6d7bd81f0978dd141d17cbfff4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -28,4 +28,4 @@ if(DUNE_ENABLE_PYTHONBINDINGS)
 endif()
 
 # finalize the dune project, e.g. generating config.h etc.
-finalize_dune_project(MODULE_CONFIG_H)
+finalize_dune_project()
diff --git a/cmake/modules/DuneMacros.cmake b/cmake/modules/DuneMacros.cmake
index d4ae13a2f083671747477cc33e97f1b721e77090..60f9f6a3a9f82b6b9675d779f6e083757e503b6a 100644
--- a/cmake/modules/DuneMacros.cmake
+++ b/cmake/modules/DuneMacros.cmake
@@ -931,7 +931,7 @@ endif()
   # install pkg-config files
   create_and_install_pkconfig(${DUNE_INSTALL_LIBDIR})
 
-  if("${ARGC}" GREATER "1" AND "${ARGV0}" STREQUAL "GLOBAL_CONFIG_H")
+  if("${ARGC}" GREATER "1")
     message(STATUS "Adding custom target for config.h generation")
     dune_regenerate_config_cmake()
     # add a target to generate config.h.cmake