set(HEADERS
    App.h
    Buttons.h
    Dialogs.h
    DragDrop.h
    Fonts.h
    Graphs.h
    Icons.h
    Images.h
    Layouts.h
    Lists.h
    MDI.h
    MainWindow.h
    Offscreen.h
    Popups.h
    Sliders.h
    Splitters.h
    SysLog.h)

set(SOURCE
    App.cpp
    Buttons.cpp
    Dialogs.cpp
    DragDrop.cpp
    Fonts.cpp
    Graphs.cpp
    Icons.cpp
    Images.cpp
    Layouts.cpp
    Lists.cpp
    MDI.cpp
    MainWindow.cpp
    Offscreen.cpp
    Popups.cpp
    Sliders.cpp
    Splitters.cpp
    SysLog.cpp
    main.cpp)

add_executable(widgets ${HEADERS} ${SOURCE})

target_include_directories(widgets PRIVATE ${PROJECT_SOURCE_DIR}/lib ${ftk_GLAD_DIR})

target_link_libraries(widgets ftkUI)

set_target_properties(widgets PROPERTIES FOLDER examples)

# The example opens a window, so it cannot run where there is no
# OpenGL. It is still built, which is the compile check.
if(NOT ftk_TESTS_NO_GL)
    add_test(NAME widgets COMMAND widgets -exit -log)
endif()
