Discussion:
overwriting do_install causes cmake install not executed
(too old to reply)
Tomasz Michalski
2018-12-06 16:00:42 UTC
Permalink
Hi
I have recipe componentX.bb which refer to some C++ repository. In C++
repository I have in main CMakeList.txt:

install(PROGRAMS ./script/start.sh DESTINATION
${CMAKE_INSTALL_COMPONENTXDIR}/init.d)
install(PROGRAMS ./script/functions.sh DESTINATION ${CMAKE_INSTALL_BINDIR})

When I add to componentX.bb my own implementation of do_install() then
start.sh and function.sh script is not installed from CMakeList.txt!
How to tell bitbake in do_install() body to installl this what is in
CMakeList.txt and moreover something more? Using do_install_append() is not
a solution for my case because do_install_append() cannot be overwritten in
another meta-layer, for example in componentX.bbappend. So this must be
do_install() function.

BR
Tomek
Burton, Ross
2018-12-06 16:06:22 UTC
Permalink
install(PROGRAMS ./script/start.sh DESTINATION ${CMAKE_INSTALL_COMPONENTXDIR}/init.d)
install(PROGRAMS ./script/functions.sh DESTINATION ${CMAKE_INSTALL_BINDIR})
When I add to componentX.bb my own implementation of do_install() then start.sh and function.sh script is not installed from CMakeList.txt!
How to tell bitbake in do_install() body to installl this what is in CMakeList.txt and moreover something more? Using do_install_append() is not a solution for my case because do_install_append() cannot be overwritten in another meta-layer, for example in componentX.bbappend. So this must be do_install() function.
By writing your own do_install you're replacing the cmake class's
do_install which is why it doesn't install those files.

From inside your own do_install() you can call the cmake class
do_install directly: it's called cmake_do_install.

Ross
--
Tomasz Michalski
2018-12-07 09:20:10 UTC
Permalink
Thank you for the clarification.
Post by Tomasz Michalski
Post by Tomasz Michalski
I have recipe componentX.bb which refer to some C++ repository. In C++
install(PROGRAMS ./script/start.sh DESTINATION
${CMAKE_INSTALL_COMPONENTXDIR}/init.d)
Post by Tomasz Michalski
install(PROGRAMS ./script/functions.sh DESTINATION
${CMAKE_INSTALL_BINDIR})
Post by Tomasz Michalski
When I add to componentX.bb my own implementation of do_install() then
start.sh and function.sh script is not installed from CMakeList.txt!
Post by Tomasz Michalski
How to tell bitbake in do_install() body to installl this what is in
CMakeList.txt and moreover something more? Using do_install_append() is not
a solution for my case because do_install_append() cannot be overwritten in
another meta-layer, for example in componentX.bbappend. So this must be
do_install() function.
By writing your own do_install you're replacing the cmake class's
do_install which is why it doesn't install those files.
From inside your own do_install() you can call the cmake class
do_install directly: it's called cmake_do_install.
Ross
Loading...