Hello all,
I tried the minimal example for building a TorchVision application: vision/examples/cpp/hello_world at master · pytorch/vision · GitHub 2
The cmake goes through generation and configuration, but it fails at the “make” with the following error -
(base) user@visionlab:~/src/vision/examples/cpp/hello_world/build$ make
CMakeFiles/hello-world.dir/build.make:82: *** target pattern contains no '%'.  Stop.
CMakeFiles/Makefile2:75: recipe for target 'CMakeFiles/hello-world.dir/all' failed
make[1]: *** [CMakeFiles/hello-world.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

In the CMake, replacing line “target_link_libraries(${PROJECT_NAME} TorchVision::TorchVision)” with “target_link_libraries(${PROJECT_NAME} torchvision)” makes it work.
Any thoughts on how to make the default CMake with TorchVision::TorchVision work?
Thanks.