I am trying to access images from a Basler camera interfaced with a Jetson TX1. I am using OpenCV-C++
along with Pylon
library to do so. I am trying to link the Pylon
using cmake
. I have the following CMakeLists.txt file:
cmake_minimum_required(VERSION 3.5.1)
project(basler_test)
set(CMAKE_CXX_STANDARD 14)
#set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl, -E")
find_package(OpenCV REQUIRED)
include_directories(/opt/pylon5/include)
link_directories(/opt/pylon5/lib64)
add_executable(basler_test basler_test.cpp)
target_link_libraries(basler_test ${OpenCV_LIBS} /opt/pylon5/include/pylon/PylonIncludes.h)
The camke .
command works fine but when I do make
, it gives:
fatal error: pylon/Platform.h: No such file or directory
compilation terminated
I believe it's because something has not been set properly in the CMakeLists.txt
. I don't have enough experience creating them to identify what's wrong. Kindly help.