if (NOT pylon_FOUND)
    find_package(pylon 6.2 REQUIRED)
endif()

if(NOT WIN32 AND NOT DEFINED OpenCV_FOUND)
  find_package(OpenCV QUIET)
endif()

add_executable(DeviceRemovalHandling DeviceRemovalHandling.cpp)
target_link_libraries(DeviceRemovalHandling pylon::pylon)

if (NOT WIN32 AND OpenCV_FOUND)
	# the pylon image window is only available on Windows.
	# Therefore, use OpenCV for visualization on other platforms.
	target_link_libraries(DeviceRemovalHandling ${OpenCV_LIBS})
	target_compile_definitions(DeviceRemovalHandling PRIVATE WITH_OPENCV=1)
	target_include_directories(DeviceRemovalHandling PRIVATE ${OpenCV_INCLUDE_DIRS} )
endif()


