#   Configure files
configure_file(
  "${PROJECT_SOURCE_DIR}/src/main-mod.h.in"
  "${PROJECT_BINARY_DIR}/src/main-mod.h"
)


#  This is the includedir that is used to compile the sources
include_directories(
  "${PROJECT_SOURCE_DIR}/core"
  "${PROJECT_BINARY_DIR}/core"
  "${PROJECT_BINARY_DIR}/src"
  "${PROJECT_SOURCE_DIR}"
)


# source files
set(SOURCES main-run.cc main-res.cc main-mod.cc main-pdf.cc main.cc)


add_executable(deductor-app ${SOURCES})
target_link_libraries(deductor-app deductor ductcxx dl)


#  Intall the main program
set_target_properties(deductor-app PROPERTIES OUTPUT_NAME deductor)
install(TARGETS deductor-app DESTINATION bin)



#  LaTeX templates
set(LATEX summary-head.tex summary-ref.tex)

#  Install latex templates
install(FILES ${LATEX} DESTINATION share/deductor/tex-templates)
