I have a CMakeLists.txt
file, with the following:
target_link_libraries(${PROJECT_NAME} OpenNI2)
When I run cmake
, I receive no errors. But when I run make
, I receive the following error:
/usr/bin/ld: cannot find -lOpenNI2
However, I have a file called libOpenNI2.so
in my build directory. So why can ld
not find this? I thought that the build directory was on the search path for target_link_libraries
?
Thanks!