
# sources which should be compiled into the library
SET( SRCS auv_camera_geometry.cpp
          auv_epipolar_geometry.cpp
          auv_outlier.cpp
          auv_camera_calib.cpp
          auv_stereo_calib.cpp
          auv_stereo_geometry.cpp
          auv_ml3d.cpp
          auv_image_distortion.cpp ) 


# Sparse bundle adjustment library sources
SET( SBA_SRCS sba-1.6/sba_chkjac.c  
              sba-1.6/sba_crsm.c  
              sba-1.6/sba_lapack.c  
              sba-1.6/sba_levmar.c  
              sba-1.6/sba_levmar_wrap.c )

# Build the library on 'make'
ADD_LIBRARY( snapper SHARED ${SRCS} ${SBA_SRCS}  )

TARGET_LINK_LIBRARIES( snapper ${OpenCV_LIBRARIES}
                               ${LAPACK_LIBRARIES}
                               ${SDL_LIBRARY}
                               libplankton::plankton )

TARGET_INCLUDE_DIRECTORIES(snapper INTERFACE $<INSTALL_INTERFACE:include/libsnapper>)

# Install the library on 'make install'
# this should be kept in sync with the binary package name
# and be updated when the ABI (not just API) changes
SET_PROPERTY(TARGET snapper PROPERTY VERSION ${LIBSNAPPER_VERSION})
SET_PROPERTY(TARGET snapper PROPERTY SOVERSION 1)
# Install the library on 'make install'
INSTALL(TARGETS snapper EXPORT LibSnapperTargets LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}")

