<div dir="ltr">I don&#39;t think it is correct.<br>Better, you should pass configuration which you want to install to cpack.<br>For your solution, I suppose you need more elaborate build process. While VS can do this job for you, on Unix you should (manually) explicitly build all of your configurations. That is: (this usually should be done with script of course)<br>
1) create build directory for every your configuration:<br>build-debug, build-release, etc.<br>2) configure and build your project in each directory.<br>3) Tell cpack to install from every build directory. That is you should explicitly write your cpack configuration file (which CPack.cmake usually does for you), which installs from different build trees. You can tune your CPackConfig.cmake (the generated default one), look how your project installed. Usually it is something like this:<br>
<pre>SET(CPACK_INSTALL_CMAKE_PROJECTS &quot;/home/andy/vtk/CMake-bin;CMake;ALL;/&quot;)<br></pre>You should write more quadruplets for each your configuration (look at <a href="http://www.cmake.org/cmake/help/cmake2.6docs.html">http://www.cmake.org/cmake/help/cmake2.6docs.html</a> for more information).<br>
And I looked at your CMakeLists.txt: you shouldn&#39;t use SET(CMAKE_BUILD_TYPE &quot;Release&quot;) in each directory. It is better to play with configuration-specific names (see DEBUG_POSTFIX and <a name="prop_tgt:OUTPUT_NAME"><b><code>OUTPUT_NAME target properties in link above).</code></b></a><br>
<br><div class="gmail_quote">On Wed, Oct 1, 2008 at 10:53 PM, Karl Wallner <span dir="ltr">&lt;<a href="mailto:list@weps.de">list@weps.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br>
<br>
I&#39;m using cmake in a project to build different configurations (debug-static, debug-shared, release-...) of a library out of the same sources. All these<br>
built libraries have to be in a single project as cpack is used to make<br>
binary packages for windows and linux.<br>
<br>
In case of the windows platform everything works fine, under linux the<br>
generated binaries are not installed and packed.<br>
<br>
For the test case is attached (for cmake 2.6.x):<br>
$ tar xfz debug-and-release.tar.gz<br>
$ mkdir BUILD<br>
$ cd BUILD<br>
$ cmake ../debug-and-release<br>
..<br>
$ make<br>
..<br>
$ make install<br>
[ 33%] Built target bin1<br>
[ 66%] Built target bin2<br>
[100%] Built target bin3<br>
Install the project...<br>
-- Install configuration: &quot;&quot;<br>
-- Installing: /tmp/bin/bin1<br>
<br>
Only on of the 3 executables is installed.<br>
<br>
If hacked cmake-2.6.2 to do the job as wished. This patch is not perfect:<br>
It would be favourable to make this change configurable.<br><font color="#888888">
<br>
-- Karl Wallner<br>
<br>
</font><br>_______________________________________________<br>
CMake mailing list<br>
<a href="mailto:CMake@cmake.org">CMake@cmake.org</a><br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br></blockquote></div><br></div>