#############################################################
# There are warning issued during the compilation of almost
# any LaTeX source, but we want the compilation not to stop...
# Because the build process has -Werror set globally we want to
# disable it here specifically.
IF (PEDANTIC)
  REMOVE_DEFINITIONS (-Werror)
ENDIF (PEDANTIC)

IF (UNIX AND NOT APPLE)

  INCLUDE (UseLATEX.cmake)
  
  SET (texInputFiles massxpert-macros.tex massxpert-version.tex 
    titlepage.tex front-matter.tex toc-lof-lot.tex 
    preface.tex installation.tex basics-polchem.tex basics-massspec.tex
    generalities.tex xpertdef.tex xpertcalc.tex xpertedit.tex
    xpertminer.tex data-customization.tex appendices.tex 
    protein-1-letter.xml.tex leu-enkephalin.mxp.tex pka_ph_pi.xml.tex 
    GNU-GPL-3.0.tex index.tex)
  
  ADD_LATEX_DOCUMENT (massxpert.tex
    DEFAULT_PDF
    INPUTS ${texInputFiles}
    CONFIGURE massxpert-version.tex
    DEPENDS massxpert-style.sty 
    IMAGE_DIRS figures
    USE_INDEX)
  
  # With GNU/Linux deliver the user manual (because the Debian
  # Packaging involves creating a massxpert-doc package). But for
  # MS-Windows and MacOSX, we do not ship the user manual (too big
  # file).
  
  INSTALL (FILES ${CMAKE_BINARY_DIR}/usermanual/massxpert.pdf
    DESTINATION ${MASSXPERT_USERMAN_DIR})
  
ENDIF (UNIX AND NOT APPLE)

