###################### START_CMAKE #######################
cmake_minimum_required(VERSION 3.6.2)
project(FlippR-Driver-Tests VERSION 0.1.0 LANGUAGES CXX)

# Compile tests to output_path/tests
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/${OUTPUT_PATH}/tests)


file(GLOB_RECURSE SOURCES *.cpp)

add_executable(${PROJECT_NAME} ${SOURCES})

target_include_directories(${PROJECT_NAME} PRIVATE ${CMAKE_SOURCE_DIR}/tests)
target_include_directories(${PROJECT_NAME} PRIVATE ${CMAKE_SOURCE_DIR}/src)
target_include_directories(${PROJECT_NAME} PRIVATE ${CMAKE_SOURCE_DIR}/include)

#find_library(flippr-driver NAMES lib${CMAKE_PROJECT_NAME}.a HINTS ${CMAKE_SOURCE_DIR}/bin)
#if(NOT flippr-driver)
#  message(FATAL_ERROR "Could not find FlippR library")
#endif()

target_link_libraries(${PROJECT_NAME} PRIVATE FlippR-Driver)

enable_testing()

add_test(tests ${PROJECT_NAME})
