option(BUILD_THUMBNAILER "Build generator of thumbnails" OFF)

if(BUILD_THUMBNAILER)
    if(WIN32)
        add_library(tenmonthumbnailer SHARED
            Dll.cpp
            loadimage.cpp
            TenmonThumbnailProvider.cpp
            ../src/rawimage.h
            ../src/rawimage.cpp
            ../src/rawimage_sse.cpp)
        set_target_properties(tenmonthumbnailer PROPERTIES PREFIX "")

        target_compile_definitions(tenmonthumbnailer PRIVATE NO_QT)
        target_include_directories(tenmonthumbnailer PRIVATE ../libXISF)
        target_link_libraries(tenmonthumbnailer PRIVATE shlwapi ${FITS_LIB} XISF)
        target_link_options(tenmonthumbnailer PRIVATE "-static")
    else(WIN32)
        qt_add_executable(tenmonthumbnailer
            main.cpp
            loadimage.cpp
            ../src/rawimage.cpp
            ../src/rawimage_sse.cpp)

        target_link_libraries(tenmonthumbnailer PRIVATE ${FITS_LIB} XISF)

        target_include_directories(tenmonthumbnailer PRIVATE ../libXISF)
        target_compile_definitions(tenmonthumbnailer PRIVATE NO_QT)
    endif(WIN32)
endif(BUILD_THUMBNAILER)

