Switch remaining main() functions and copyrite.c to C++.
[alexxy/gromacs.git] / src / ngmx / CMakeLists.txt
1 if(X11_FOUND)
2
3 set(NGMX_COMMON_SOURCE
4     xutil.c         xmb.c           x11.c
5     xdlghi.c        fgrid.c         xdlgitem.c
6     popup.c         pulldown.c      xdlg.c
7     manager.c       buttons.c       nmol.c
8     nleg.c          dialogs.c       logo.c
9     filter.c        molps.c)
10
11 include_directories(${X11_INCLUDE_DIR})
12 include_directories(${CMAKE_CURRENT_SOURCE_DIR})
13
14 # List of programs with single corresponding *.c source file,
15 # used to create build rules automatically.
16 #
17 set(NGMX_PROGRAMS
18     ngmx g_xrama)
19
20 foreach(PROG ${NGMX_PROGRAMS})
21         add_executable(${PROG} ${PROG}.cpp ${NGMX_COMMON_SOURCE})
22         target_link_libraries(${PROG} libgromacs ${GMX_EXTRA_LIBRARIES})
23         gmx_add_man_page(${PROG})
24         set_target_properties(${PROG} PROPERTIES OUTPUT_NAME "${PROG}${GMX_BINARY_SUFFIX}")
25 endforeach(PROG)
26
27 install(TARGETS ${NGMX_PROGRAMS}
28         COMPONENT ngmx
29         RUNTIME DESTINATION ${BIN_INSTALL_DIR})
30
31 endif(X11_FOUND)