INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})

SET(FILES_UI
${CMAKE_CURRENT_SOURCE_DIR}/HdrWizard.ui
${CMAKE_CURRENT_SOURCE_DIR}/EditingTools.ui)

SET(FILES_H
${CMAKE_CURRENT_SOURCE_DIR}/AutoAntighosting.h)

SET(FILES_CPP
${CMAKE_CURRENT_SOURCE_DIR}/AutoAntighosting.cpp)

SET(FILES_H_QT
${CMAKE_CURRENT_SOURCE_DIR}/HdrWizard.h
${CMAKE_CURRENT_SOURCE_DIR}/EditingTools.h
${CMAKE_CURRENT_SOURCE_DIR}/PreviewWidget.h)

SET(FILES_CPP_QT
${CMAKE_CURRENT_SOURCE_DIR}/HdrWizard.cpp
${CMAKE_CURRENT_SOURCE_DIR}/EditingTools.cpp
${CMAKE_CURRENT_SOURCE_DIR}/PreviewWidget.cpp)

INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})

QT5_WRAP_UI(FILES_UI_H ${FILES_UI})
QT5_WRAP_CPP(FILES_MOC ${FILES_H_QT})

ADD_LIBRARY(hdrwizard ${FILES_H} ${FILES_H_QT} ${FILES_CPP} ${FILES_CPP_QT} ${FILES_MOC} ${FILES_UI_H})
qt5_use_modules(hdrwizard Core Concurrent Gui Widgets Sql)

SET(FILES_CLI_H
${CMAKE_CURRENT_SOURCE_DIR}/HdrCreationItem.h
${CMAKE_CURRENT_SOURCE_DIR}/AutoAntighosting.h
${CMAKE_CURRENT_SOURCE_DIR}/WhiteBalance.h)

SET(FILES_CLI_H_QT
# ${CMAKE_CURRENT_SOURCE_DIR}/HdrInputLoader.h
${CMAKE_CURRENT_SOURCE_DIR}/HdrCreationManager.h)

SET(FILES_CLI_CPP
${CMAKE_CURRENT_SOURCE_DIR}/HdrCreationItem.cpp
${CMAKE_CURRENT_SOURCE_DIR}/AutoAntighosting.cpp
${CMAKE_CURRENT_SOURCE_DIR}/WhiteBalance.cpp)

SET(FILES_CLI_CPP_QT
# ${CMAKE_CURRENT_SOURCE_DIR}/HdrInputLoader.cpp
${CMAKE_CURRENT_SOURCE_DIR}/HdrCreationManager.cpp)

QT5_WRAP_CPP(FILES_CLI_MOC ${FILES_CLI_H_QT})
ADD_LIBRARY(hdrwizard-cli ${FILES_CLI_H} ${FILES_CLI_H_QT} ${FILES_CLI_CPP} ${FILES_CLI_CPP_QT} ${FILES_CLI_MOC})
qt5_use_modules(hdrwizard-cli Core Concurrent Gui Widgets Sql)

SET(FILES_TO_TRANSLATE ${FILES_TO_TRANSLATE}
    ${FILES_CPP_QT} ${FILES_H_QT}
    ${FILES_CLI_CPP_QT} ${FILES_CLI_H_QT}
    ${FILES_UI}
    PARENT_SCOPE)
SET(LUMINANCE_MODULES_GUI ${LUMINANCE_MODULES_GUI} hdrwizard-cli hdrwizard align PARENT_SCOPE)
SET(LUMINANCE_MODULES_CLI ${LUMINANCE_MODULES_CLI} hdrwizard-cli align PARENT_SCOPE)
