macro(example nm)
    add_allegro_executable(${nm} ${nm}.c)
endmacro(example nm)

if(WANT_OLD_EXAMPLES)
    example(ex3buf)
    example(ex3d)
    example(ex12bit)
    example(exaccel)
    example(exalpha)
    example(exbitmap)
    example(exblend)
    example(excamera)
    example(excolmap)
    example(exconfig)
    example(excustom)
    example(exdata)
    example(exdbuf)
    example(exexedat)
    example(exfixed)
    example(exflame)
    example(exflip)
    example(exfont)
    example(exgui)
    example(exhello)
    example(exjoy)
    example(exkeys)
    example(exlights)
    example(exmem)
    example(exmidi)
    example(exmouse)
    example(expackf)
    example(expal)
    example(expat)
    example(exquat)
    example(exrgbhsv)
    example(exsample)
    example(exscale)
    example(exscn3d)
    example(exscroll)
    example(exshade)
    example(exspline)
    example(exsprite)
    example(exstars)
    example(exstream)
    example(exswitch)
    example(exsyscur)
    example(extimer)
    example(extrans)
    example(extruec)
    example(exunicod)
    example(exupdate)
    example(exxfade)
    example(exzbuf)
endif(WANT_OLD_EXAMPLES)

example(exnewapi)
example(exnew_bitmap)
example(exnew_drawpixels)
example(exnew_fs_resize)
example(exnew_icon)
example(exnew_lockbitmap)
example(exnew_lockscreen)
example(exnew_mouse)
example(exnew_mouse_events)
example(exnew_multiwin)
example(exnew_resize)
example(exnew_scale)
example(exnew_timedwait)

if(WANT_FONT)
    include_directories(../addons/font)
    add_font_example(exnew_events exnew_events.c)
    add_font_example(exnew_membmp exnew_membmp.c)
    add_font_example(exnew_bitmap_target exnew_bitmap_target.c)
    add_font_example(exnew_blend exnew_blend.c)
    add_font_example(exnew_timer exnew_timer.c)
endif(WANT_FONT)

if(SUPPORT_D3D)
    macro(add_d3dx_example nm)
        add_executable(${nm} ${EXECUTABLE_TYPE} ${ARGN})
        set_target_properties(${nm} PROPERTIES
            COMPILE_FLAGS "${MAYBE_ALLEGRO_STATICLINK} ${WFLAGS}"
            LINK_FLAGS "${MAYBE_ALLEGRO_STATICLINK}"
            )
        target_link_libraries(${nm} ${LINK_WITH})
        target_link_libraries(${nm} d3dx9)
    endmacro(add_d3dx_example)

    if (USE_CXX)
        set_source_files_properties(exnew_d3d.cpp PROPERTIES LANGUAGE "CXX")
        add_d3dx_example(exnew_d3d exnew_d3d.cpp)
    endif(USE_CXX)
endif(SUPPORT_D3D)

if(SUPPORT_OPENGL)
    macro(add_ogl_example nm)
        add_executable(${nm} ${EXECUTABLE_TYPE} ${ARGN})
        set_target_properties(${nm} PROPERTIES
            COMPILE_FLAGS "${MAYBE_ALLEGRO_STATICLINK} ${WFLAGS}"
            LINK_FLAGS "${MAYBE_ALLEGRO_STATICLINK}"
            )
        target_link_libraries(${nm} ${LINK_WITH})
    endmacro(add_ogl_example)

    add_ogl_example(exnew_opengl exnew_opengl.c)
endif(SUPPORT_OPENGL)

#-----------------------------------------------------------------------------#
# vi: set ts=8 sts=4 sw=4 et:
