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

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

add_executable(GrabDepthMap GrabDepthMap.cpp)

set (GrabDepthMap_Dependencies 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.
	list(APPEND GrabDepthMap_Dependencies ${OpenCV_LIBS})
	target_compile_definitions(GrabDepthMap PRIVATE WITH_OPENCV=1)
	target_include_directories(GrabDepthMap PRIVATE ${OpenCV_INCLUDE_DIRS} )
endif()

target_link_libraries(GrabDepthMap ${GrabDepthMap_Dependencies})
