PROJECT(LIBVLH)

# configure source files
SET(LIBVLH_SRC
    trilinear.C VLTools.C VLCorr.C showVImage.C pictureView.C prefs.C lView.C
    lLoad.C timecourse.C flow.C dialog.C bildWin.C preferences.C power.C
    rawCW.C rawpaint.C VCheck.C fenster1.C rawplot.C openGL.C bilderCW.C
    interpolator.cc)

QT_WRAP_CPP(vlh LIBVLH_MOC
    pictureView.h dialog.h bildWin.h preferences.h fenster1.h rawplot.h
    rawpaint.h rawCW.h openGL.h bilderCW.h lView.h VLCorr.h)

INCLUDE_DIRECTORIES(${QT_INCLUDE_DIR} xpm)

ADD_LIBRARY(vlh ${LIBVLH_SRC} ${LIBVLH_MOC})
TARGET_LINK_LIBRARIES(vlh 
  ${QT_LIBRARIES}
  ${OPENGL_gl_LIBRARY}
  ${OPENGL_glu_LIBRARY}
  ${FFTW3_FFTW3_LIBRARY}
  lipsia)

# this libraries contains undefined symbols by design (e.g. 'pr')
# therefore it cannot be linked with '--no-undefined' !!
SET_TARGET_PROPERTIES(vlh
    PROPERTIES COMPILE_FLAGS -ansi)

# only install when built as a shared lib
IF (BUILD_SHARED_LIBS)
  INSTALL(TARGETS vlh
    LIBRARY DESTINATION ${LIPSIA_INSTALL_LIB_DIR} COMPONENT RuntimeLibraries)
ENDIF (BUILD_SHARED_LIBS)
