C++ 没有制定目标的规则';安装&x27;[cmake]

C++ 没有制定目标的规则';安装&x27;[cmake],c++,linux,tensorflow,cmake,yocto,C++,Linux,Tensorflow,Cmake,Yocto,在Yocto平台上使用cmake编译TensorFlow Lite的示例时,我们遇到如下错误: Log data follows: | DEBUG: Executing shell function do_install | NOTE: make -j 4 DESTDIR=/home/student/fsl-release-bsp/build-analytics-tflite/tmp/work/cortexa9hf-neon-poky-linux-gnueabi/minimal/1.0-r0/i

在Yocto平台上使用cmake编译TensorFlow Lite的示例时,我们遇到如下错误:

Log data follows:
| DEBUG: Executing shell function do_install
| NOTE: make -j 4 DESTDIR=/home/student/fsl-release-bsp/build-analytics-tflite/tmp/work/cortexa9hf-neon-poky-linux-gnueabi/minimal/1.0-r0/image install
| ERROR: oe_runmake failed
| make: *** No rule to make target 'install'.  Stop.
| ERROR: Function failed: do_install (log file is located at /home/student/fsl-release-bsp/build-analytics-tflite/tmp/work/cortexa9hf-neon-poky-linux-gnueabi/minimal/1.0-r0/temp/log.do_install.2654)
ERROR: Task (/home/student/fsl-release-bsp/sources/meta-analytics-tflite/recipes-hello/patch/minimal.bb:do_install) failed with exit code '1'
NOTE: Tasks Summary: Attempted 1787 tasks of which 1786 didn't need to be rerun and 1 failed.
在CMakeLists.txt文件的安装行中,我们对“目标”的概念并不清楚。如果你能让我们开朗起来,那就太完美了

  • CMakeLists.txt文件如下所示:
您的指导和澄清对我们很重要


提前谢谢你

install(TARGETS)
意味着要安装目标,但在
CMakeLists.txt
中没有定义
补丁
目标。您只定义了
minimal
目标(通过
add_executable
)。您是对的,这是我们的错,.cpp和.txt文件存储和克隆的github repo的名称是“patch”。但是,当我们尝试安装(目标是最小目标git)时,仍然会出现与上面相同的错误。
cmake_minimum_required(VERSION 3.6)

project(patch)

add_executable(minimal minimal.cc)

target_include_directories(minimal PUBLIC /home/student/fsl-release-bsp/build-analytics-tflite/tmp/sysroots/analytics/usr/include/tensorflow/contrib/lite/tools/make/downloads/flatbuffers/include)

target_link_libraries(minimal tensorflow-lite pthread ${CMAKE_DL_LIBS})

install(TARGETS patch DESTINATION git)