NPP functions - how to add npp library ?


I try to use a Sobel function nppiFilterSobelHoriz_8u16s_C1R (pSrc, SrcStride, pDst, DstStride, oSizeROI, NPP_MASK_SIZE_3_X_3 );

The compiler fails on the following error (doesn’t find a reference to function):

CMakeFiles/PD.dir/MEHL/mehl.cpp.o: In function mehl::MagnaEmbeddedHelper::sobel(unsigned char*, unsigned short*, int, int, unsigned int, unsigned int)': /home/magna/NVIDIA/PD/src/PD/MEHL/mehl.cpp:505: undefined reference to nppiFilterSobelHoriz_8u16s_C1R’
CMakeFiles/PD.dir/MEHL/mehl.cpp.o:(.debug_addr+0x6b0): undefined reference to `nppiFilterSobelHoriz_8u16s_C1R’
collect2: error: ld returned 1 exit status
src/PD/CMakeFiles/PD.dir/build.make:464: recipe for target ‘src/PD/PD’ failed
make[2]: *** [src/PD/PD] Error 1
CMakeFiles/Makefile2:442: recipe for target ‘src/PD/CMakeFiles/PD.dir/all’ failed
make[1]: *** [src/PD/CMakeFiles/PD.dir/all] Error 2
make: *** [all] Error 2
Makefile:127: recipe for target ‘all’ failed

Seems like I should add it in CMakeLists.txt file.
I have the following code related to libraries in my CMakeLists.txt file:


Driveworks SDK

find_package(Driveworks REQUIRED)

list(APPEND Driveworks_LIBRARIES

list(APPEND Driveworks_LIBRARIES)
list(APPEND Driveworks_LIBRARIES {vibrante_LIBRARIES} {vibrante_Xlibs_LIBRARIES} nvmedia ${EGL_LIBRARIES})

How to add NPP library ? Could you please help me ?

Thank you

Dear yaroslav.taran,

Could you please refer to the link for this topic? Thanks.