set(LSE2_TARGET smartereye2)
set(LSE2_LIB_NAME ${LSE2_TARGET})

find_package(Threads REQUIRED)

if (BUILD_SHARED_LIBS)
    add_definitions(-DBUILD_SHARED_LIBS)
endif()

macro(config_cxx_flags)
    include(CheckCXXCompilerFlag)
    CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
    CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
    if(COMPILER_SUPPORTS_CXX11)
        set(CMAKE_CXX_STANDARD 11)
        set(CMAKE_CUDA_STANDARD 11)
    elseif(COMPILER_SUPPORTS_CXX0X)
        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
        message(FATAL_ERROR "C++ compiler must support C++11 standard")
    endif()
endmacro()
