Renamed md_openmm into openmm_wrapper, and do_md_openmm into md_openmm.
[gromacs/rigid-bodies.git] / src / kernel / CMakeLists.txt
blobf26f6acc630d213ec1c3e01fa974e8d95a10447b
2 set(GMXPREPROCESS_SOURCES 
3     add_par.c       
4     compute_io.c    
5     convparm.c      
6     gen_ad.c        
7     gen_vsite.c     
8     genhydro.c   
9     gpp_atomtype.c  
10     gpp_bond_atomtype.c     
11     h_db.c          
12     hackblock.c             
13     hizzie.c        
14     nm2type.c
15     pdb2top.c       
16     pgutil.c        
17     readir.c        
18     readpull.c      
19     resall.c        
20     sorting.c       
21     specbond.c      
22     ter_db.c        
23     tomorse.c       
24     topdirs.c       
25     topexcl.c       
26     topio.c         
27     toppush.c       
28     topshake.c      
29     toputil.c       
30     tpbcmp.c        
31     vsite_parm.c    
32     xlate.c)
34 set(MDRUN_SOURCES 
35     gctio.c    ionize.c runner.c
36     do_gct.c     repl_ex.c  xutils.c
37     md.c         mdrun.c    genalg.c md_openmm.c)
39 add_library(gmxpreprocess ${GMXPREPROCESS_SOURCES})
40 target_link_libraries(gmxpreprocess md)
42 if(GMX_OPENMM) 
43     add_subdirectory(gmx_gpu_utils)
44     include_directories(./gmx_gpu_utils ${OpenMM_INCLUDE_DIR})
45     link_directories(${OpenMM_LIBRARY_DIR}) 
46     add_definitions( -DOPENMM_PLUGIN_DIR="${OpenMM_PLUGIN_DIR}" ) 
47     add_library(openmm_api_wrapper openmm_wrapper.cpp)
48 #    remove_definitions( -DOPENMM_PLUGIN_DIR="${OpenMM_PLUGIN_DIR}" )  # TODO where should this go?!
49     set(GMX_OPENMM_LIBRARIES openmm_api_wrapper gmx_gpu_utils OpenMM)   
50     install(TARGETS openmm_api_wrapper gmx_gpu_utils DESTINATION ${LIB_INSTALL_DIR})   
51 endif(GMX_OPENMM)
53 if(GMX_FAHCORE)
54   add_library(fahcore ${MDRUN_SOURCES})
55 else(GMX_FAHCORE)
57 list(APPEND GMX_EXTRA_LIBRARIES gmxpreprocess md)
59 add_executable(grompp grompp.c)
60 target_link_libraries(grompp ${GMX_EXTRA_LIBRARIES})
62 add_executable(tpbconv tpbconv.c)
63 target_link_libraries(tpbconv ${GMX_EXTRA_LIBRARIES})
65 add_executable(pdb2gmx pdb2gmx.c)
66 target_link_libraries(pdb2gmx ${GMX_EXTRA_LIBRARIES})
68 add_executable(protonate protonate.c)
69 target_link_libraries(protonate ${GMX_EXTRA_LIBRARIES})
71 add_executable(luck luck.c)
72 target_link_libraries(luck ${GMX_EXTRA_LIBRARIES})
74 add_executable(gmxdump gmxdump.c)
75 target_link_libraries(gmxdump ${GMX_EXTRA_LIBRARIES})
77 add_executable(x2top x2top.c)
78 target_link_libraries(x2top ${GMX_EXTRA_LIBRARIES})
80 add_executable(gmxcheck gmxcheck.c)
81 target_link_libraries(gmxcheck ${GMX_EXTRA_LIBRARIES})
83 add_executable(mdrun ${MDRUN_SOURCES})
84 target_link_libraries(mdrun ${GMX_EXTRA_LIBRARIES} ${GMX_OPENMM_LIBRARIES})
86 install(TARGETS 
87         grompp
88         tpbconv
89         pdb2gmx
90         protonate
91         luck
92         gmxdump
93         x2top
94         gmxcheck
95         mdrun
96         gmxpreprocess DESTINATION ${LIB_INSTALL_DIR}
97         RUNTIME DESTINATION ${BIN_INSTALL_DIR})
99 endif(GMX_FAHCORE)