| 1 |
add_library(IO) |
| 2 |
|
| 3 |
avogadro_headers(IO |
| 4 |
cjsonformat.h |
| 5 |
cmlformat.h |
| 6 |
cmsgpackformat.h |
| 7 |
dcdformat.h |
| 8 |
fileformat.h |
| 9 |
fileformatmanager.h |
| 10 |
gromacsformat.h |
| 11 |
mdlformat.h |
| 12 |
lammpsformat.h |
| 13 |
pdbformat.h |
| 14 |
sdfformat.h |
| 15 |
trrformat.h |
| 16 |
turbomoleformat.h |
| 17 |
vaspformat.h |
| 18 |
xyzformat.h |
| 19 |
) |
| 20 |
|
| 21 |
target_sources(IO PRIVATE |
| 22 |
cjsonformat.cpp |
| 23 |
cmlformat.cpp |
| 24 |
cmsgpackformat.cpp |
| 25 |
dcdformat.cpp |
| 26 |
fileformat.cpp |
| 27 |
fileformatmanager.cpp |
| 28 |
gromacsformat.cpp |
| 29 |
lammpsformat.cpp |
| 30 |
mdlformat.cpp |
| 31 |
pdbformat.cpp |
| 32 |
sdfformat.cpp |
| 33 |
trrformat.cpp |
| 34 |
turbomoleformat.cpp |
| 35 |
vaspformat.cpp |
| 36 |
xyzformat.cpp |
| 37 |
) |
| 38 |
|
| 39 |
if(USE_HDF5) |
| 40 |
find_package(HDF5 REQUIRED COMPONENTS C) |
| 41 |
target_compile_definitions(IO PRIVATE AVO_USE_HDF5 H5_USE_110_API) |
| 42 |
avogadro_headers(IO hdf5dataformat.h) |
| 43 |
target_sources(IO PRIVATE hdf5dataformat.cpp) |
| 44 |
target_link_libraries(IO PRIVATE hdf5::hdf5) |
| 45 |
endif() |
| 46 |
|
| 47 |
if(USE_MMTF) |
| 48 |
find_package(MMTF REQUIRED) |
| 49 |
target_compile_definitions(IO PRIVATE AVO_USE_MMTF) |
| 50 |
avogadro_headers(IO mmtfformat.h) |
| 51 |
target_sources(IO PRIVATE mmtfformat.cpp) |
| 52 |
target_link_libraries(IO PRIVATE mmtf::mmtf) |
| 53 |
endif() |
| 54 |
|
| 55 |
avogadro_add_library(IO) |
| 56 |
|
| 57 |
target_link_libraries(IO |
| 58 |
PUBLIC Avogadro::Core |
| 59 |
PRIVATE struct pugixml::pugixml nlohmann_json::nlohmann_json) |
| 60 |
if(WIN32) |
| 61 |
target_link_libraries(IO PRIVATE ws2_32) |
| 62 |
endif() |