+ # if libcp2k not found then ask user to provide CP2K_LINKER_FLAGS
+ if(NOT LIBCP2K_FOUND)
+ message(FATAL_ERROR "pkg-config could not find libcp2k, define CP2K_LINKER_FLAGS for custom linking of libcp2k")
+ endif()
+
+ # libcp2k found: add libraries and paths to the respecting GROMACS variables
+ message(STATUS "Found libcp2k in ${LIBCP2K_LIBDIR}")
+ include_directories(SYSTEM "${LIBCP2K_INCLUDE_DIRS}")
+ link_directories(${LIBCP2K_LIBRARY_DIRS})
+ list(APPEND GMX_COMMON_LIBRARIES ${LIBCP2K_LIBRARIES})
+ endif()
+