cmake_minimum_required(VERSION 3.0)
project (ComputerVisionSupervisions)

set (CMAKE_CXX_STANDARD 11)

IF (WIN32)
    # Windows path setup
	include_directories(opencv/build/include)
	link_directories(opencv/build/x64/vc15/lib)

	# copying dlls
	file(GLOB files "opencv/build/x64/vc15/bin/*.dll")
	foreach(file ${files})
		configure_file(${file} ${CMAKE_CURRENT_BINARY_DIR} COPYONLY)
	endforeach()

	add_executable(Supervision1 Supervision1.cpp)
	add_executable(Supervision2 Supervision2.cpp)

ELSE()
	# Linux setup
	find_package(OpenCV REQUIRED)
	include_directories(${OPENCV_INCLUDE_DIR})

	add_executable(Supervision1 Supervision1.cpp)
	add_executable(Supervision2 Supervision2.cpp)

	target_link_libraries(Supervision1 ${OpenCV_LIBS})
	target_link_libraries(Supervision2 ${OpenCV_LIBS})

ENDIF()



# copying images
file(GLOB files "images/*.png")
foreach(file ${files})
  get_filename_component(fileName ${file} NAME)
  configure_file(${file} ${CMAKE_CURRENT_BINARY_DIR}/images/${fileName} COPYONLY)
endforeach()
