2 file(GLOB MDLIB_SOURCES *.c)
4 # Files called xxx_test.c are test drivers with a main() function for
5 # module xxx.c, so they should not be included in the library
6 file(GLOB_RECURSE NOT_MDLIB_SOURCES *_test.c *\#*)
7 list(REMOVE_ITEM MDLIB_SOURCES ${NOT_MDLIB_SOURCES})
9 add_library(md ${MDLIB_SOURCES})
10 target_link_libraries(md gmx ${GMX_EXTRA_LIBRARIES} ${FFT_LIBRARIES} ${XML_LIBRARIES})
11 set_target_properties(md PROPERTIES OUTPUT_NAME "md${GMX_LIBS_SUFFIX}" SOVERSION ${SOVERSION} INSTALL_NAME_DIR "${LIB_INSTALL_DIR}")
13 install(TARGETS md DESTINATION ${LIB_INSTALL_DIR} COMPONENT libraries)
15 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libmd.pc.cmakein ${CMAKE_CURRENT_BINARY_DIR}/libmd.pc @ONLY)
16 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libmd.pc
17 DESTINATION ${LIB_INSTALL_DIR}/pkgconfig
18 RENAME "libmd${GMX_LIBS_SUFFIX}.pc"
19 COMPONENT development)