I reviewed the response for using the add_custom_command for cmake and was not able to get it to work in android studio. I am having trouble finding the target when run.
add_custom_command( TARGET b.c.o
POST_BUILD
file(RENAME ${CMAKE_HOME_DIRECTORY}/newfolder/customer.txt ${CMAKE_HOME_DIRECTORY}/newfolder/used_customer.txt)
)
I get the following:
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: Build failed with an exception.
What went wrong:
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.
Get more help at https://help.gradle.org
BUILD FAILED in 32s
It appears to not be able to find the target file each time I run it. Can you provide some help with this matter?