From dc273755cc767432373fe24961c8dd868693ce2b Mon Sep 17 00:00:00 2001 From: Stefan Bienert <stefan.bienert@unibas.ch> Date: Fri, 29 May 2015 11:59:40 +0200 Subject: [PATCH] Made plugin path a CMake variable --- modules/mol/mm/src/CMakeLists.txt | 6 ++++++ modules/mol/mm/src/{settings.hh => settings.hh.in} | 10 +++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) rename modules/mol/mm/src/{settings.hh => settings.hh.in} (96%) diff --git a/modules/mol/mm/src/CMakeLists.txt b/modules/mol/mm/src/CMakeLists.txt index 5751ca883..f5d7ba62c 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 69d4911a0..b3f5511a1 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 -- GitLab