# Vendored subset of GEMMI (Global Phasing), v0.7.5. A single static `gemmi` target with all
# the compiled sources: symmetry/MTZ/XDS I/O plus the atomic-model reading and structure-factor /
# bulk-solvent / map machinery (pdb, ccp4, calculate, eig3, resinfo, polyheur).
#
# read_cif/mmcif/json/mmread_gz are the mmCIF and mmJSON side of coordinate reading, so `--model`
# takes a .cif as readily as a .pdb. They bring GEMMI's own copy of the PEGTL parser with them
# (gemmi/third_party/tao, MIT, Colin Hirsch and Daniel Frey) - header-only, and included from
# gemmi/cif.hpp exactly where upstream GEMMI expects it.
#
# to_mmcif/to_pdb are the writing side, which `rugnux --model` needs to put the model it has placed
# against the data on disk. to_mmcif.cpp calls use_hetatm() out of to_pdb.cpp, so the two come together.
#
# assembly.cpp expands a deposited model's strict-NCS operators into the full asymmetric unit.
#
# fprime is GEMMI's Cromer-Liberman f'/f'' (its port of the Larch routines, credited in its header), for the
# anomalous signal the refinement's solvent sites are expected to show at the data's wavelength.
#
# monlib/topo/riding_h are the restraint side: a monomer library read from memory (MonLib) and the
# topology of a model built from it (prepare_topology), for rugnux's restrained refinement.
ADD_LIBRARY(gemmi STATIC
        symmetry.cpp gz.cpp mtz.cpp sprintf.cpp xds_ascii.cpp
        pdb.cpp resinfo.cpp polyheur.cpp calculate.cpp eig3.cpp ccp4.cpp
        read_cif.cpp mmcif.cpp json.cpp mmread_gz.cpp
        to_mmcif.cpp to_pdb.cpp assembly.cpp
        monlib.cpp topo.cpp riding_h.cpp fprime.cpp
        gemmi/cellred.hpp
        gemmi/symmetry.hpp
        gemmi/fail.hpp
        gemmi/unitcell.hpp
        gemmi/math.hpp)
TARGET_INCLUDE_DIRECTORIES(gemmi PUBLIC .)
TARGET_LINK_LIBRARIES(gemmi PRIVATE ZLIB::ZLIB)
