linking nvxio / ovxio libraries into own cmake project


i am trying to get into VisionWorks, and wanted to do the Tutorials in the documentation.
Unfortunateley, it is incomplete when it comes to the nvxio and ovxio libraries.

For use of VisionWorks with CMake it says:
"To use VisionWorks in your application, add 3 lines to your CMakeLists.txt:

find_package(VisionWorks) to set the variables used next with paths to library files.
include_directories("${VisionWorks_INCLUDE_DIRS}") to provide the paths to VisionWorks include files to the compiler
target_link_libraries(vstab_demo ${VisionWorks_LIBRARIES}) to link the VisionWorks library with your application

After that, you can use VisionWorks capabilities in your application.

Similarly, we include NVXIO. This library contains utility and I/O functions. For example, the macro NVXIO_SAFE_CALL is used to handle error codes returned by VisionWorks functions."

But “find_package(NVXIO)” results in an error.
I found this solution for CMake:

But the given file is also not working.

Could you help me with that Problem?

Thank you!

Sorry, maybe i should add the error messages to make things clearer;
with the CMakeLists.txt from the given Post i get:

CMakeFiles/visionworks_test.dir/main.cpp.o: In function `main':
main.cpp:(.text+0x28): undefined reference to `nvxio::Application::get()'
main.cpp:(.text+0xc0): undefined reference to `ovxio::loadImageFromFile(_vx_context*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int)'
collect2: error: ld returned 1 exit status
CMakeFiles/visionworks_test.dir/build.make:121: recipe for target 'visionworks_test' failed
make[2]: *** [visionworks_test] Error 1


We can reproduce this issue in our environment and is checking now.
Will update more information with you once we have further finding.


Any progress so far?


Does anybody have news about this topic ?

Thank you.


Thanks for your patience.
We are checking this internally. Will update more information later.



Sorry to keep you waiting. We have fixed issue now.

It’s required to build NVXIO library and install a dependency before using cmake.
We can successfully compile VisionWorks with following steps:

1. Install dependency

sudo apt install libglfw3-dev

2. Build NVXIO

$ cd /usr/share/visionworks/sources/
$ sudo make

3. CMakeLists.txt

cmake_minimum_required (VERSION 2.8)

find_package(VisionWorks REQUIRED)

add_executable(app topic_1064190.cpp)

target_include_directories(app PRIVATE /usr/share/visionworks/sources/nvxio/include)
target_link_libraries(app -L/usr/share/visionworks/sources/libs/aarch64/linux/release -lnvx -lovx -lglfw -lgstreamer-1.0 -lgobject-2.0 -lglib-2.0 ${VisionWorks_LIBRARIES})