<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p><font face="Arial" size="2">Ok - not what I get on ubuntu LTS
10.4. Perhaps I need the latest version?<br>
( I ran the original files with just the missing line (?)
"install(CPack)" added).<br>
</font></p>
<p><font face="Arial" size="2">$ cmake -version</font>
<br>
<font face="Arial" size="2">cmake version 2.8.0</font>
<br>
<font face="Arial" size="2">$ ls</font>
<br>
<font face="Arial" size="2">$ cmake ..</font>
<br>
<font face="Arial" size="2">-- The C compiler identification is
GNU</font>
<br>
<font face="Arial" size="2">-- The CXX compiler identification is
GNU</font>
<br>
<font face="Arial" size="2">-- Check for working C compiler:
/usr/bin/gcc</font>
<br>
<font face="Arial" size="2">-- Check for working C compiler:
/usr/bin/gcc -- works</font>
<br>
<font face="Arial" size="2">-- Detecting C compiler ABI info</font>
<br>
<font face="Arial" size="2">-- Detecting C compiler ABI info -
done</font>
<br>
<font face="Arial" size="2">-- Check for working CXX compiler:
/usr/bin/c++</font>
<br>
<font face="Arial" size="2">-- Check for working CXX compiler:
/usr/bin/c++ -- works</font>
<br>
<font face="Arial" size="2">-- Detecting CXX compiler ABI info</font>
<br>
<font face="Arial" size="2">-- Detecting CXX compiler ABI info -
done</font>
<br>
<font face="Arial" size="2">-- Configuring done</font>
<br>
<font face="Arial" size="2">-- Generating done</font>
<br>
<font face="Arial" size="2">-- Build files have been written to:
/home/DEVELOPER/ucdm7/Dev/shadowmintorig/build</font>
<br>
<font face="Arial" size="2">$ cpack -G DEB</font>
<br>
<font face="Arial" size="2">CPack: Create package using DEB</font>
<br>
<font face="Arial" size="2">CPack: Install projects</font>
<br>
<font face="Arial" size="2">CPack: - Run preinstall target for:
CPACK_MULTI</font>
<br>
<font face="Arial" size="2">CPack: - Install project: CPACK_MULTI</font>
<br>
<font face="Arial" size="2">CPack: Compress package</font>
<br>
<font face="Arial" size="2">CPack: Finalize package</font>
<br>
<font face="Arial" size="2">CPack: Package
/home/DEVELOPER/ucdm7/Dev/shadowmintorig/build/Demo3-0.1.1-Linux.deb
generated.</font>
<br>
<font face="Arial" size="2">$ ls</font>
<br>
<font face="Arial" size="2">CMakeCache.txt cmake_install.cmake
_CPack_Packages demo1 Demo3-0.1.1-Linux.deb Makefile</font>
<br>
<font face="Arial" size="2">CMakeFiles CPackConfig.cmake
CPackSourceConfig.cmake demo2 install_manifest.txt</font>
<br>
<font face="Arial" size="2">$</font>
</p>
<br>
<br>
On 9/08/2012 12:01 PM, Doug wrote:
<blockquote
cite="mid:CADbLNrF47xeRgsF9=ZfokR_BEDFU6UuQBaK4m2DaGxVtHw-oKA@mail.gmail.com"
type="cite">
<pre wrap="">Hm, I would expect this to work:
mkdir build
cd build
cmake ..
cpack -G DEB
...but you'll find that cpack only supports one set of properties per
package, not per COMPONENT, which means you cannot have different
dependencies, descriptions, etc.
Also, woops; didn't mean to take that off list, I'll respond there
too; maybe one of those guys has some better ideas...
...and yeah, this was just a super quick sample for a stack overflow question.
Should probably go back and clean it up~
Checked; works for me:
doug@shadowmint:~/junk/cmake-multi-install$ clear
doug@shadowmint:~/junk/cmake-multi-install$ cd build/
doug@shadowmint:~/junk/cmake-multi-install/build$ ls
doug@shadowmint:~/junk/cmake-multi-install/build$ cmake ..
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/doug/junk/cmake-multi-install/build
doug@shadowmint:~/junk/cmake-multi-install/build$ cpack -G DEB
CPack: Create package using DEB
CPack: Install projects
CPack: - Run preinstall target for: CPACK_MULTI
CPack: - Install project: CPACK_MULTI
CPack: - Install component: DEMO1
CPack: - Install component: DEMO2
CPack: Create package
CPack: - package:
/home/doug/junk/cmake-multi-install/build/Demo3-0.1.1-Linux-DEMO1.deb
generated.
CPack: - package:
/home/doug/junk/cmake-multi-install/build/Demo3-0.1.1-Linux-DEMO2.deb
generated.
doug@shadowmint:~/junk/cmake-multi-install/build$ ls
CMakeCache.txt CPackSourceConfig.cmake Makefile
demo1 install_manifest_DEMO2.txt
CMakeFiles Demo3-0.1.1-Linux-DEMO1.deb _CPack_Packages demo2
CPackConfig.cmake Demo3-0.1.1-Linux-DEMO2.deb cmake_install.cmake
install_manifest_DEMO1.txt
doug@shadowmint:~/junk/cmake-multi-install/build$ dpkg --info
Demo3-0.1.1-Linux-DEMO1.deb
new debian package, version 2.0.
size 1870 bytes: control archive= 369 bytes.
174 bytes, 9 lines control
153 bytes, 3 lines md5sums
Package: demo3-demo1
Version: 0.1.1
Section: devel
Priority: optional
Architecture: amd64
Installed-Size: 4
Maintainer: <a class="moz-txt-link-abbreviated" href="mailto:linderd@staff.iinet.net.au">linderd@staff.iinet.net.au</a>
Description: Demo package
doug@shadowmint:~/junk/cmake-multi-install/build$
~
Doug.
On Thu, Aug 9, 2012 at 9:44 AM, Bruce Cartland <a class="moz-txt-link-rfc2396E" href="mailto:bruce.cartland@pobox.com"><bruce.cartland@pobox.com></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Thanks for the sample - makes it a lot easier to experiment.
I've been playing around with it but can't get it to do what I want (or is
claimed). It always generates just one package 'Demo3-0.1.1-Linux.deb'.
Perhaps I'm not using the command lines correctly?
The command lines I've used are:
cmake .
cmake --build . --target install
cmake --build . --target package # this generates the Demo3 package.
There are only two CPACK files generated: CPackConfig.cmake and
CPackSourceConfig.cmake.
cpack -C DEMO2 # this also generates the Demo3 package which is identical to
the above.
(also played around with cmake . -DCOMPONENT=DEMO2 and other such
constructions - to no avail).
I did the following mods to clarify things:
CMakeLists.txt
- added set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}") # near the top - for
easier testing
- added set(CPACK_GENERATOR "DEB") # before include(CPack) - for easier
testing
Demo1/CMakeLists.txt
- added include(CPack) # at the bottom - assume this is a typo (tried with
and without anyway)
Demo2/CMakeLists.txt
- made the DESTINATION "tmp2/"
- changed the description to say "Demo 2 package"
(so I end up, in the package, with "usr/tmp/Window.h" and
"usr/tmp2/Window.h", etc)
Now, in the CPackConfig.cmake file (of which there is only one - at the
root), attributes like ..DESCRIPTION_SUMMARY appear once with Demo3's
description. Clearly then, there needs to be a CPackConfig.cmake file for
each (?).
Demo3-0.1.1-Linux.deb always contains usr/tmp and usr/tmp2.
I think I'll have to resort to the technique another user outlined in 2008
<a class="moz-txt-link-freetext" href="http://www.cmake.org/pipermail/cmake/2008-April/020967.html">http://www.cmake.org/pipermail/cmake/2008-April/020967.html</a>.
Perhaps I must be missing something fundamental - for which I'll feel stupid
later.
thanks
On 9/08/2012 12:01 AM, Doug wrote:
I put an example up here when i was messing around with it:
<a class="moz-txt-link-freetext" href="https://github.com/shadowmint/cmake-multi-install">https://github.com/shadowmint/cmake-multi-install</a>
~
Doug.
On Aug 8, 2012 3:07 PM, "Bruce" <a class="moz-txt-link-rfc2396E" href="mailto:bruce.cartland@pobox.com"><bruce.cartland@pobox.com></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">
Hi
Got my shiny new cmake build system going for my project on windows,
Ubuntu, and Mac.
Despite a fair bit of research I'm still not sure how to generate 2
separate debian packages from the same cmake files - say myapp.deb and
myapp-dev.deb.
I think what I want is somehow for it to write out another file in the
same manner it writes out both CPackConfig.cmake and
CPackSourceConfig.cmake. A CPackDevConfig.cmake?
Appreciate it if someone can point me in the right direction.
Ta
--
Sent from my Android phone with K-9 Mail. Please excuse my brevity.
--
Powered by <a class="moz-txt-link-abbreviated" href="http://www.kitware.com">www.kitware.com</a>
Visit other Kitware open-source projects at
<a class="moz-txt-link-freetext" href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a>
Please keep messages on-topic and check the CMake FAQ at:
<a class="moz-txt-link-freetext" href="http://www.cmake.org/Wiki/CMake_FAQ">http://www.cmake.org/Wiki/CMake_FAQ</a>
Follow this link to subscribe/unsubscribe:
<a class="moz-txt-link-freetext" href="http://www.cmake.org/mailman/listinfo/cmake">http://www.cmake.org/mailman/listinfo/cmake</a>
</pre>
</blockquote>
</blockquote>
<pre wrap="">
</pre>
</blockquote>
</body>
</html>