cmake_minimum_required(VERSION 2.6)
project(spmod_ipl_sdl)

set(spmod_ipl_sdl_SRCS
	mod_ipl_sdl.cpp
)

FIND_PACKAGE( OpenCV REQUIRED )
INCLUDE_DIRECTORIES (${OpenCV_INCLUDE_DIR})
INCLUDE_DIRECTORIES (..)

set (SDL_BUILDING_LIBRARY ON)
find_package ( SDL REQUIRED )
find_package ( SDL_gfx REQUIRED )
include_directories (${SDL_INCLUDE_DIR})
include_directories (${SDLGFX_INCLUDE_DIR})

add_library (spmod_ipl_sdl MODULE ${spmod_ipl_sdl_SRCS})

#
# Cannot link against other modules
#
#target_link_libraries(spmod_ipl_sdl spmod_camera)
#target_link_libraries(spmod_ipl_sdl spmod_sdl)

target_link_libraries(spmod_ipl_sdl spcore)
target_link_libraries(spmod_ipl_sdl ${SDL_LIBRARY})
target_link_libraries(spmod_ipl_sdl ${SDLGFX_LIBRARY})
target_link_libraries(spmod_ipl_sdl creavision)

INSTALL (TARGETS spmod_ipl_sdl RUNTIME DESTINATION ${LIBRUNTIMEDIR} LIBRARY DESTINATION ${PLUGINDIR})