Remote Generic Linux device
-
Hello everyone,
When I created a project with CMake on QtCreator and clicked Run, I encountered errorsWarning: You need to add an Install Statement to Your CMAKELISTS.txt File for deployment to work.
Source code results are not deployed on Remote serverMy question?
What configuration do I need to add in cmakelist.txt to do this?information:
QtCreator Version 4.14
Qt version: 1.75
Remote: Ubuntu 18.04
My OS: Archlinux -
@AXZS If you're asking how to extend your CMake script to also install the binaries then start here: https://cmake.org/cmake/help/latest/command/install.html
-
@jsulm
Since ,I am naive to Qt , this link I couldn't understand fully.
Like-
"install TARGET mylib"
so where is this mylib? who created it ? why only this target -
To deploy simple hello world program on targetboard , how cmakefile.txt to be modified with install statement? what to install? libraries/runtime/object/archive/fileset?
-
-
@AXZS This is not a Qt topic, but CMake one.
If you take a look at the whole example:add_library(mylib STATIC ...) set_target_properties(mylib PROPERTIES PUBLIC_HEADER mylib.h) include(GNUInstallDirs) install(TARGETS mylib PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/myproj )
You will see what mylib is: it's a target building a static library. So, for each of your targets you want to install you need an install() directive.
-
-
@AXZS said in Remote Generic Linux device:
But I am still not clear where is this target mylib?
In the example I posted:
add_library(mylib STATIC ...)
Please read https://cmake.org/cmake/help/latest/command/add_library.html
You should really learn CMake if you want to use it."And do We need all targets to be modified in file?" - I don't understand this question. What do you want to modify.
"lets say for hello world program.. what are targets for it?" - the target for your executable: https://cmake.org/cmake/help/latest/command/add_executable.html