# CmakeLists.txt for BlinkenPlayer

ADD_DEFINITIONS(-D__OGGPLAYER)

FILE(GLOB BlinkenPlayer_source *.cpp ../SDL_gfx/*.cpp)
FILE(GLOB BlinkenPlayer_header *.h ../SDL_gfx/*.h)
INCLUDE_DIRECTORIES(. .. ../SDL_gfx/)
IF(APPLE)
    MESSAGE( STATUS "APPLE MACOSX found. Adding SDLMain.m/SDLMain.h to BlinkenPlayer")
    SET( BlinkenPlayer_source ${BlinkenPlayer_source} ../OSX/LostPixels/SDLMain.m )
    SET( BlinkenPlayer_header ${BlinkenPlayer_header} ../OSX/LostPixels/SDLMain.h )
    # Compile SDLMain.m with C Compiler (not C++ as Cmake does by default)
    SET_SOURCE_FILES_PROPERTIES(../OSX/LostPixels/SDLMain.m PROPERTIES LANGUAGE C)
ENDIF(APPLE)



ADD_EXECUTABLE(BlinkenPlayer ${BlinkenPlayer_source} ${BlinkenPlayer_header})
TARGET_LINK_LIBRARIES(BlinkenPlayer ${SDL_LIBRARY})
TARGET_LINK_LIBRARIES(BlinkenPlayer ${SDLIMAGE_LIBRARY})
TARGET_LINK_LIBRARIES(BlinkenPlayer ${SDLTTF_LIBRARY})
TARGET_LINK_LIBRARIES(BlinkenPlayer ${SDLMIXER_LIBRARY})

INSTALL(TARGETS BlinkenPlayer RUNTIME DESTINATION bin )
