diff --git a/source/gmx/CMakeLists.txt b/source/gmx/CMakeLists.txt index c119e4b212..d445479d39 100644 --- a/source/gmx/CMakeLists.txt +++ b/source/gmx/CMakeLists.txt @@ -19,6 +19,7 @@ else() target_link_libraries(${libgmxname} PUBLIC ${LIB_DEEPMD_CC}) target_compile_definitions(${libgmxname} PUBLIC "DP_USE_CXX_API") endif() +target_compile_definitions(${libgmxname} PRIVATE "DP_GMX_PLUGIN_INTERNAL") target_include_directories(${libgmxname} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include) target_include_directories(${libgmxname} diff --git a/source/gmx/include/gmx_plugin.h b/source/gmx/include/gmx_plugin.h index 51eae8ca7e..430ca2fe0d 100644 --- a/source/gmx/include/gmx_plugin.h +++ b/source/gmx/include/gmx_plugin.h @@ -5,7 +5,11 @@ #include "DeepPot.h" namespace deepmd_compat = deepmd; #else +#ifdef DP_GMX_PLUGIN_INTERNAL #include "deepmd.hpp" +#else +#include "deepmd/deepmd.hpp" +#endif namespace deepmd_compat = deepmd::hpp; #endif