install target on visual studio generated by cmake: what is it and how I can use it?
<p>I am using cmake to generate solutions for visual studio and it worked very well.</p>
<p>I noted that as part of build, it also generate a target called install on visual studio, supposedly to install the build files (such as libraries or include files), but how can I use it on visual studio?</p>
<p>I select this target and try to build or run it without any success or any result (no file copied to anywhere else and so on).</p>
<p>Can you please help me how I can use install target in visual studio to install the generated files (in my case it is a library).</p>
<p>I am suing cmake gui, but I can use cmake command line if it needs.</p>
<h1>Update 1:</h1>
<p>I know that it is generated for install target on my cmake file, but my question is how I can run it?</p>
<p>when I build install on VS solution, I am getting this error:</p>
<pre><code>Error   3   error MSB3073: The command &quot;setlocal
&quot;C:\Program Files (x86)\CMake\bin\cmake.exe&quot; -DBUILD_TYPE=Debug -P cmake_install.cmake
if %errorlevel% neq 0 goto :cmEnd
:cmEnd
endlocal &amp; call :cmErrorLevel %errorlevel% &amp; goto :cmDone
:cmErrorLevel
exit /b %1
:cmDone
if %errorlevel% neq 0 goto :VCEnd
:VCEnd&quot; exited with code 1. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets  132 5   INSTALL
</code></pre>
<p>so I am not able to use it inside VS.</p>
<p>How can I use it inside VS (if it is possible at all!)</p>
<p>How can I use it with cmake GUI?</p>
<p>How can I configure t to install the product at a specific place? (I define the install directory which I don't want to be inside <code>c:\program files</code></p>