# SPDX-FileCopyrightText: Copyright (c) Stanford University, The Regents of the University of California, and others.
# SPDX-License-Identifier: BSD-3-Clause

# Build the model object files.

set(lib svzero_model_library)

set(CXXSRCS
  ActivationFunction.cpp
  SphereMaterial.cpp
  BloodVesselRC.cpp
  Block.cpp
  BloodVessel.cpp
  BloodVesselCRL.cpp
  BloodVesselJunction.cpp
  ChamberSphere.cpp
  ChamberElastanceInductor.cpp
  ChamberElastanceInductorExponential.cpp
  ClosedLoopCoronaryBC.cpp
  ClosedLoopCoronaryLeftBC.cpp
  ClosedLoopCoronaryRightBC.cpp
  ClosedLoopHeartPulmonary.cpp
  ClosedLoopRCRBC.cpp
  DOFHandler.cpp
  FlowReferenceBC.cpp
  Junction.cpp
  Model.cpp
  Node.cpp
  OpenLoopCoronaryBC.cpp
  OpenLoopCoronaryVarResBC.cpp
  Parameter.cpp
  PressureReferenceBC.cpp
  ResistanceBC.cpp
  ResistiveJunction.cpp
  ValveTanh.cpp
  WindkesselBC.cpp
  LinearElastanceChamber.cpp
  PiecewiseValve.cpp
)

set(HDRS
  ActivationFunction.h
  SphereMaterial.h
  BloodVesselRC.h
  Block.h
  BlockType.h
  BloodVessel.h
  BloodVesselCRL.h
  BloodVesselJunction.h
  ChamberSphere.h
  ChamberElastanceInductor.h
  ChamberElastanceInductorExponential.h
  ClosedLoopCoronaryBC.h
  ClosedLoopCoronaryLeftBC.h
  ClosedLoopCoronaryRightBC.h
  ClosedLoopHeartPulmonary.h
  ClosedLoopRCRBC.h
  DOFHandler.h
  FlowReferenceBC.h
  Junction.h
  Model.h
  Node.h
  OpenLoopCoronaryBC.h
  OpenLoopCoronaryVarResBC.h
  Parameter.h
  PressureReferenceBC.h
  ResistanceBC.h
  ResistiveJunction.h
  ValveTanh.h
  WindkesselBC.h
  LinearElastanceChamber.h
  PiecewiseValve.h
)

add_library(${lib} OBJECT ${CXXSRCS} ${HDRS})

target_include_directories( ${lib} PUBLIC
  ${CMAKE_SOURCE_DIR}/src/algebra
  ${CMAKE_SOURCE_DIR}/src/model
  ${CMAKE_SOURCE_DIR}/src/solve
)

target_link_libraries( ${lib} Eigen3::Eigen )
target_link_libraries( ${lib} nlohmann_json::nlohmann_json )

