cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
project(doorkeepertest CXX)

include(FindPkgConfig)
pkg_search_module(SDL2 REQUIRED sdl2)
pkg_search_module(SDL2IMAGE REQUIRED SDL2_image>=2.0.0)
configure_file(
	"${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}Config.h.in"
	"${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.h"
)

include_directories(
	.
	"${CMAKE_CURRENT_BINARY_DIR}"
	${SDL2_INCLUDE_DIR}
)

add_executable(${PROJECT_NAME}
	doorkeeper.cpp
	main.cpp
)

target_link_libraries(${PROJECT_NAME}
	doorkeeper
	${SDL2_LIBRARIES}
	${SDL2IMAGE_LIBRARIES}
)

configure_file(${gdb_scripts_path}/libdoorkeeper-gdb.py ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-gdb.py)
