Skip to content
Snippets Groups Projects
Commit ce7f76de authored by Christoph Junghans's avatar Christoph Junghans
Browse files

cmake: switch plumed to full static mode

parent 58d2f0cc
No related branches found
No related tags found
No related merge requests found
......@@ -528,6 +528,7 @@ if(PKG_USER-SCAFACOS)
endif()
if(PKG_USER-PLUMED)
find_package(GSL REQUIRED)
option(DOWNLOAD_PLUMED "Download Plumed (instead of using the system's one)" OFF)
if(DOWNLOAD_PLUMED)
include(ExternalProject)
......@@ -540,12 +541,14 @@ if(PKG_USER-PLUMED)
ExternalProject_get_property(plumed_build INSTALL_DIR)
set(PLUMED_INSTALL_DIR ${INSTALL_DIR})
list(APPEND LAMMPS_DEPS plumed_build)
list(APPEND LAMMPS_LINK_LIBS ${PLUMED_INSTALL_DIR}/lib/libplumedWrapper.a ${CMAKE_DL_LIBS})
list(APPEND LAMMPS_LINK_LIBS ${PLUMED_INSTALL_DIR}/lib/plumed/obj/kernel.o
${PLUMED_INSTALL_DIR}/lib/plumed/obj/PlumedStatic.o ${GSL_LIBRARIES} ${CMAKE_DL_LIBS})
set(PLUMED_INCLUDE_DIRS "${PLUMED_INSTALL_DIR}/include")
else()
find_package(PkgConfig REQUIRED)
pkg_check_modules(PLUMED plumedWrapper REQUIRED)
list(APPEND LAMMPS_LINK_LIBS ${PLUMED_LDFLAGS})
pkg_check_modules(PLUMED plumed REQUIRED)
include(${PLUMED_LIBDIR}/plumed/src/lib/Plumed.cmake.static)
list(APPEND LAMMPS_LINK_LIBS ${PLUMED_LOAD})
endif()
include_directories(${PLUMED_INCLUDE_DIRS})
endif()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment