【发布时间】:2018-05-06 01:08:03
【问题描述】:
我查看了使用 cmake 的 add_custom_command 的响应,但无法让它在 android studio 中工作。运行时找不到目标。
add_custom_command( TARGET b.c.o
POST_BUILD
file(RENAME ${CMAKE_HOME_DIRECTORY}/newfolder/customer.txt ${CMAKE_HOME_DIRECTORY}/newfolder/used_customer.txt)
)
我得到以下信息:
CMake Error at CMakeLists.txt:73 (add_custom_command):
No TARGET ')' has been created in this directory.
-- Configuring incomplete, errors occurred!
See also "C:/Documents/Android_files/local_app/BApp/.externalNativeBuild/cmake/debug/x86_64/CMakeFiles/CMakeOutput.log".
FAILURE:构建失败并出现异常。
出了什么问题:
A problem occurred configuring project ':BApp'.
> executing external native build for cmake C:\Documents\Android_files\local_app\BApp\CMakeLists.txt
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
通过https://help.gradle.org获得更多帮助
32 秒后构建失败
每次运行时似乎都找不到目标文件。 你能就这件事提供一些帮助吗?
【问题讨论】:
标签: android cmake cmake-custom-command