<div dir="ltr">Hi,<div><br></div><div style>I am having a hard time understanding some commands in CMake which by the looks of it are vital for proper project deployment. One of the commands is INSTALL and the other is EXPORT.<br>
</div><div style><br></div><div style>I have read the following page many times: <a href="http://www.cmake.org/Wiki/CMake:Install_Commands">http://www.cmake.org/Wiki/CMake:Install_Commands</a>. The article states "<span style="color:rgb(0,0,0);font-family:sans-serif;font-size:12.727272033691406px;line-height:19.048295974731445px">CMake has an elaborate install process that simplifies installation of programs, libraries, and other files." but does not go into any further detail on how it simplifies the process.</span></div>
<div style><br></div><div style>But it seems like the article is meant for CMake veterans and not newcomers. It simply explains the usage of the command but not what it does, its end result and its usage. I have the following questions:</div>
<div style><br></div><div style>1) Why do I need to install my library/executable? When I build my libraries and they are put in their library output paths, what is the point of INSTALL?</div><div style>2) Once I do install targets and/or programs, are they available to other projects that are not in the same CMakeLists build?</div>
<div style>3) Suppose I have 2 completely separate projects (i.e. they have completely separate CMakeLists that are not 'talking' to each other) - Project A builds some libraries which Project B now needs to use. Does Project A 'install' the libraries and are now those libraries are available system wide? Or do I still have to give the path of Project A to Project B for linking? Perhaps I am not making any sense whatsoever. I apologize, but I have spent the past week trying to wrap my head around INSTALL and EXPORT but they make no sense to me because their end-usage is not described anywhere.</div>
<div style>4) Project A can build 32 bit and 64 bit libraries. How does INSTALL (or EXPORT? Like I said earlier, I am very confused here...) know which library it is 'installing'? And then how does Project B 32 bit know to link with Project A 32 bit libraries and same with 64-bit? </div>
<div style><br></div><div style>Thank you for any help,</div><div style>Saad</div></div>