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 include(../contrib/BuildMdrunOpenMM)
17 add_library(fahcore ${MDRUN_SOURCES})
19 add_executable(mdrun ${MDRUN_SOURCES})
20 gmx_add_man_page(mdrun)
21 target_link_libraries(mdrun ${GMX_EXTRA_LIBRARIES} libgromacs
22 ${GMX_EXE_LINKER_FLAGS})
23 set_target_properties(mdrun PROPERTIES OUTPUT_NAME "mdrun${GMX_BINARY_SUFFIX}"
24 COMPILE_FLAGS "${OpenMP_C_FLAGS}")
25 install(TARGETS mdrun DESTINATION ${BIN_INSTALL_DIR} COMPONENT mdrun)
27 # Create the custom install-mdrun target
28 if (BUILD_SHARED_LIBS)
29 # If shared libraries are used, we need to install the libraries in
30 # addition to the mdrun binary.
31 add_custom_target(install-mdrun
32 COMMAND ${CMAKE_COMMAND} -DCOMPONENT=libraries
33 -P ${CMAKE_BINARY_DIR}/cmake_install.cmake
34 COMMAND ${CMAKE_COMMAND} -DCOMPONENT=mdrun
35 -P ${CMAKE_BINARY_DIR}/cmake_install.cmake
36 COMMENT "Installing mdrun")
37 else (BUILD_SHARED_LIBS)
38 add_custom_target(install-mdrun
39 COMMAND ${CMAKE_COMMAND} -DCOMPONENT=mdrun
40 -P ${CMAKE_BINARY_DIR}/cmake_install.cmake
41 COMMENT "Installing mdrun")
42 endif (BUILD_SHARED_LIBS)
43 add_dependencies(install-mdrun mdrun)