diff --git a/modules/mol/mm/src/CMakeLists.txt b/modules/mol/mm/src/CMakeLists.txt
index 5751ca88379cc84827d209cfc87960bd27363ce0..f5d7ba62c87a26d480e10cd969fa0ac896f14c79 100644
--- a/modules/mol/mm/src/CMakeLists.txt
+++ b/modules/mol/mm/src/CMakeLists.txt
@@ -36,6 +36,12 @@ set(OST_MOL_MM_SOURCES
   steep.cc
 )
 
+# create settings.hh as configurational header, needed to set the plugins path
+set(config_hh_generator "CMake")
+set(SETTINGS_HH_FILE "${CMAKE_CURRENT_SOURCE_DIR}/settings.hh")
+configure_file(settings.hh.in ${SETTINGS_HH_FILE})
+
+
 set(MOL_MM_DEPS ost_mol ost_io)
 
 
diff --git a/modules/mol/mm/src/settings.hh b/modules/mol/mm/src/settings.hh.in
similarity index 96%
rename from modules/mol/mm/src/settings.hh
rename to modules/mol/mm/src/settings.hh.in
index 69d4911a0443e691909072650520df369e878ee9..b3f5511a1d65f35e3f54bd8f4559549f3fdda4ba 100644
--- a/modules/mol/mm/src/settings.hh
+++ b/modules/mol/mm/src/settings.hh.in
@@ -20,6 +20,10 @@
 #ifndef OST_MM_SETTINGS_HH
 #define OST_MM_SETTINGS_HH
 
+/*
+  DO NOT EDIT, automatically generated by @config_hh_generator@
+*/
+
 #include <vector>
 
 #include <boost/shared_ptr.hpp>
@@ -130,8 +134,8 @@ struct Settings{
                 reaction_field_dielectric(78.3),
                 use_dispersion_correction(true),
                 keep_ff_specific_naming(true),
-                openmm_plugin_directory("/usr/local/openmm/lib/plugins"),
-                custom_plugin_directory("/usr/local/openmm/lib/plugins")
+                openmm_plugin_directory("@OPEN_MM_PLUGIN_DIR@"),
+                custom_plugin_directory("@OPEN_MM_PLUGIN_DIR@")
 
                   {   }
 
@@ -190,4 +194,4 @@ struct Settings{
 
 }}} //namespace
 
-#endif
\ No newline at end of file
+#endif