Hi @Mikele,
I tried your sollution, but I got “no such file or directory” when I tried to include <torch/torch.h>. Any ideas to what the issue could be?
I’ve pasted my CMake code below:
cmake_minimum_required(VERSION 3.0 FATAL_ERROR)
project(example-app)


set(CMAKE_PREFIX_PATH /home/magnus/pytorch/torch)
find_package(Torch REQUIRED)
set(TORCH_INCLUDE_DIRS
    ${TORCH_INSTALL_PREFIX}/include
    ${TORCH_INSTALL_PREFIX}/include/torch/csrc/api/include)
add_executable(example-app example-app.cpp)

##target_link_libraries(example-app "/home/magnus/pytorch/build_libtorch/build/lib/libtorch.so")
set_property(TARGET example-app PROPERTY CXX_STANDARD 11)