diff --git a/cmake/modules/DuneEnableAllPackages.cmake b/cmake/modules/DuneEnableAllPackages.cmake
index fdc9acc74fa22ee5284862781a430dc3c1b539c1..5b9ddf76a480cb58c801652f52c3ce82ea11fcea 100644
--- a/cmake/modules/DuneEnableAllPackages.cmake
+++ b/cmake/modules/DuneEnableAllPackages.cmake
@@ -95,7 +95,7 @@ function(dune_register_package_flags)
     get_property(all_incs GLOBAL PROPERTY ALL_PKG_INCS)
     get_property(all_libs GLOBAL PROPERTY ALL_PKG_LIBS)
     get_property(all_defs GLOBAL PROPERTY ALL_PKG_DEFS)
-    get_property(all_defs GLOBAL PROPERTY ALL_PKG_OPTS)
+    get_property(all_opts GLOBAL PROPERTY ALL_PKG_OPTS)
     set_property(GLOBAL PROPERTY ALL_PKG_INCS "${REGISTRY_INCLUDE_DIRS}" "${all_incs}")
     set_property(GLOBAL PROPERTY ALL_PKG_LIBS "${REGISTRY_LIBRARIES}" "${all_libs}")
     set_property(GLOBAL PROPERTY ALL_PKG_DEFS "${REGISTRY_COMPILE_DEFINITIONS}" "${all_defs}")