cmake_minimum_required(VERSION 2.8)

SET(CMAKE_MODULE_PATH  "${CMAKE_SOURCE_DIR}/cmake/Modules;${CMAKE_MODULE_PATH}" )


SET(TARGET ThreeDDistortionModel)
project(${TARGET})

set(${PROJECT_NAME}_DESCRIPTION "3D distortion model for document images. Developped for the ANR-Digidoc project by kvcuong")
set(${PROJECT_NAME}_AUTHOR "Kieu Van Cuong <vkieu@labri.fr>")
set(${PROJECT_NAME}_VENDOR "labri")

set(${PROJECT_NAME}_MAJOR_VERSION 0)
set(${PROJECT_NAME}_MINOR_VERSION 0)
set(${PROJECT_NAME}_PATCH_VERSION 1)

set(${PROJECT_NAME}_DEB_DEPENDS "libopencv-dev, libxmu-dev, libxi-dev, freeglut3-dev")
#
SET(CMAKE_BUILD_TYPE "Release")

#SET(TARGET ThreeDDistortionModel)

SET(HEADERS
    ./src/ThreeDDistortionModel.hpp
    ./src/window.h 
    ./src/qtmain.h 
    ./src/glm.h
    ./src/Texture.h 
    ./src/stdafx.h
    ./src/glut.h
)

SET(SOURCES
    ./src/ThreeDDistortionModel.cpp
    ./src/window.cpp 
    ./src/qtmain.cpp 
    ./src/glm.cpp
    ./src/Texture.cpp 
    ./src/stdafx.cpp
)


SET(LIBS OpenCV GLUT OpenGL)
SET(${TARGET}_TARGET_DEPENDENCIES GLU)

include(doqubook_functions)
dqb_plugin_auto_conf()

set(QT_USE_QTOPENGL TRUE)

doqubook_plugin(
        ${TARGET}
        "${HEADERS}"
        "${HEADERS}"
        "${SOURCES}"
        "${LIBS}"
)
SET(TEST_HEADERS
  ./test/TestThreeDDistortionModel.hpp
)


SET(TEST_SOURCES
  ./test/TestThreeDDistortionModel.cpp
)
file(
    GLOB_RECURSE
    test_RCS
#   test/*.qrc
)
doqubook_pluginTest(${TARGET}
                     "${TEST_HEADERS}"
                     "${TEST_SOURCES}"
                    "${test_RCS}")
