I have an issue with installing my target to a specific directory by use of cmake managed build and bitbake (yocto).
At CMakeLists.txt, I want to use the install() section to deploy my target to the specific directory e.g. /my/specific/directory
.
At CMakeLists.txt this looks like:
install(TARGETS "${PROJECT_NAME}" RUNTIME DESTINATION my/specific/directory)
.
So, there would be no need at the bitbake recipe to implement an install section.
By default, the cmake uses a prefix
which derives from bitbake.conf and points to /usr
. Therefore my target is installed to /usr/my/specific/directory
.
At cmake documentation I have found to possibilities to modify the prefix:
- Set the environment variable
DESTDIR
to overwrite the prefix - use
cmake --install . --prefix /my/install/prefix
In both cases I have no idea, how I have to implement this at the bitbake recipe that this would have an effect, when the do_install
task is executed.
Has anyone of you a hint here?