Quantcast

How to deliver a source code package?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

How to deliver a source code package?

Dave Ohlsson
[Warning: I am a CMake beginner.]

Hi,

This must have been asked many times, but I can't find the answer...
(I did look at the CMake FAQ.)

If I use the autotools and I want to make a Linux source code
distribution to a user who doesn't have the autotools installed, I
ship him the source together with script configure. Then, he can run:
$ ./configure
$ make
$ make install

How is one supposed to deliver a source package to a user who doesn't
have cmake installed?

http://www.cmake.org/cmake/help/cmake_tutorial.html#s6 contains a
simple CMake example that uses CPack. I downloaded the source code
(from http://public.kitware.com/cgi-bin/viewcvs.cgi/Tests/Tutorial/Step6/?root=CMake).
The tutorial says:

    "To create a source distribution you would type
    cpack -C CPackSourceConfig.cmake"

but when I run this command, I get a package
(Tutorial-1.0.1-Linux.tar.gz) that contains these files:
* bin/libMathFunctions.a
* bin/Tutorial
* include/MathFunctions.h
* include/TutorialConfig.h

Hardly a source distribution to me.

I have Ubuntu, and cmake 2.8.0.

-- dave
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to deliver a source code package?

Eric Noulard
2011/6/22 Dave Ohlsson <[hidden email]>:

> [Warning: I am a CMake beginner.]
>
> Hi,
>
> This must have been asked many times, but I can't find the answer...
> (I did look at the CMake FAQ.)
>
> If I use the autotools and I want to make a Linux source code
> distribution to a user who doesn't have the autotools installed, I
> ship him the source together with script configure. Then, he can run:
> $ ./configure
> $ make
> $ make install
>
> How is one supposed to deliver a source package to a user who doesn't
> have cmake installed?

If you use CMake as your build system you NEED cmake to build from source.
autotools suppose you have some bourne shell installed (for running
the configure script)
[which is hardly the case on Windows].
CMake suppose you have CMake.

> http://www.cmake.org/cmake/help/cmake_tutorial.html#s6 contains a
> simple CMake example that uses CPack. I downloaded the source code
> (from http://public.kitware.com/cgi-bin/viewcvs.cgi/Tests/Tutorial/Step6/?root=CMake).
> The tutorial says:
>
>    "To create a source distribution you would type
>    cpack -C CPackSourceConfig.cmake"
>
> but when I run this command, I get a package
> (Tutorial-1.0.1-Linux.tar.gz) that contains these files:
> * bin/libMathFunctions.a
> * bin/Tutorial
> * include/MathFunctions.h
> * include/TutorialConfig.h
>
> Hardly a source distribution to me.

Send us your CMakeLists.txt, there is something odd here.

> I have Ubuntu, and cmake 2.8.0.

What happen if you do:

$ make package_source




--
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to deliver a source code package?

Dave Ohlsson
> CMake suppose you have CMake.

OK.

> Send us your CMakeLists.txt, there is something odd here.

I tried on another machine (Red Hat Linux) with a newer version of
CMake (2.8.4), but I get the same results.

This is what I did:

I downloaded Step6.tar.gz from
http://public.kitware.com/cgi-bin/viewcvs.cgi/Tests/Tutorial/Step6/?root=CMake

Then:

$ tar xzvf Step6.tar.gz
Step6/
Step6/CMakeLists.txt
Step6/License.txt
Step6/TutorialConfig.h.in
Step6/tutorial.cxx
Step6/MathFunctions/
Step6/MathFunctions/CMakeLists.txt
Step6/MathFunctions/MakeTable.cxx
Step6/MathFunctions/MathFunctions.h
Step6/MathFunctions/mysqrt.cxx
$ mkdir Step6.build
$ cd Step6.build
$ cmake ../Step6
$ cpack -C CPackSourceConfig.cmake
$ tar xzvf Tutorial-1.0.1-Linux.tar.gz
Tutorial-1.0.1-Linux/bin/Tutorial
Tutorial-1.0.1-Linux/bin/libMathFunctions.a
Tutorial-1.0.1-Linux/include/TutorialConfig.h
Tutorial-1.0.1-Linux/include/MathFunctions.h

> What happen if you do:
>
> $ make package_source

$ cd ..
$ rm -fr Step6
$ rm -fr Step6.build
$ tar xzvf Step6.tar.gz
Step6/
Step6/CMakeLists.txt
Step6/License.txt
Step6/TutorialConfig.h.in
Step6/tutorial.cxx
Step6/MathFunctions/
Step6/MathFunctions/CMakeLists.txt
Step6/MathFunctions/MakeTable.cxx
Step6/MathFunctions/MathFunctions.h
Step6/MathFunctions/mysqrt.cxx
$ mkdir Step6.build
$ cd Step6.build
$ cmake ../Step6
$ make package_source
$ tar xzvf Tutorial-1.0.1-Source.tar.gz
Tutorial-1.0.1-Source/CMakeLists.txt
Tutorial-1.0.1-Source/License.txt
Tutorial-1.0.1-Source/TutorialConfig.h.in
Tutorial-1.0.1-Source/tutorial.cxx
Tutorial-1.0.1-Source/MathFunctions/CMakeLists.txt
Tutorial-1.0.1-Source/MathFunctions/MakeTable.cxx
Tutorial-1.0.1-Source/MathFunctions/MathFunctions.h
Tutorial-1.0.1-Source/MathFunctions/mysqrt.cxx

This looks better.

Thanks!

-- dave
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake
Loading...