1 include_directories(${CMAKE_SOURCE_DIR}/src/gromacs/gmxpreprocess)
4 do_gct.c gctio.c genalg.c ionize.c
6 pme_loadbal.c repl_ex.c runner.c xutils.c
10 # Even though the OpenMM build has "moved to contrib", many things
11 # have be be done from within the scope of the CMakeLists.txt that
12 # builds its mdrun, and that is here
13 list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/src/contrib)
15 include_directories(${CMAKE_CURRENT_SOURCE_DIR})
16 include(${CMAKE_SOURCE_DIR}/src/contrib/BuildMdrunOpenMM.cmake)
20 add_library(fahcore ${MDRUN_SOURCES})
22 add_executable(mdrun ${MDRUN_SOURCES})
23 gmx_add_man_page(mdrun)
24 target_link_libraries(mdrun ${GMX_EXTRA_LIBRARIES} libgromacs
25 ${GMX_EXE_LINKER_FLAGS})
26 set_target_properties(mdrun PROPERTIES OUTPUT_NAME "mdrun${GMX_BINARY_SUFFIX}"
27 COMPILE_FLAGS "${OpenMP_C_FLAGS}")
29 target_link_libraries(mdrun openmm_api_wrapper)
31 install(TARGETS mdrun DESTINATION ${BIN_INSTALL_DIR} COMPONENT mdrun)
33 # Create the custom install-mdrun target
34 if (BUILD_SHARED_LIBS)
35 # If shared libraries are used, we need to install the libraries in
36 # addition to the mdrun binary.
37 add_custom_target(install-mdrun
38 COMMAND ${CMAKE_COMMAND} -DCOMPONENT=libraries
39 -P ${CMAKE_BINARY_DIR}/cmake_install.cmake
40 COMMAND ${CMAKE_COMMAND} -DCOMPONENT=mdrun
41 -P ${CMAKE_BINARY_DIR}/cmake_install.cmake
42 COMMENT "Installing mdrun")
43 else (BUILD_SHARED_LIBS)
44 add_custom_target(install-mdrun
45 COMMAND ${CMAKE_COMMAND} -DCOMPONENT=mdrun
46 -P ${CMAKE_BINARY_DIR}/cmake_install.cmake
47 COMMENT "Installing mdrun")
48 endif (BUILD_SHARED_LIBS)
49 add_dependencies(install-mdrun mdrun)