[CMake] CPack (RPM) and install()
Eric Noulard
eric.noulard at gmail.com
Wed Jun 23 13:13:29 EDT 2010
2010/6/23 Magnus Therning <magnus at therning.org>:
> On Wed, Jun 23, 2010 at 15:41, Eric Noulard <eric.noulard at gmail.com> wrote:
>> 2010/6/23 Magnus Therning <magnus at therning.org>:
> [...]
>>> - The variable CMAKE_INSTALL_PREFIX is not used at all during RPM
>>> building. CMAKE_INSTALL_PREFIX is /usr/local, but files get put into
>>> /usr in the RPM. Is this a bug?
>>
>> It should be using it.
My mistake.
You should define: CPACK_PACKAGING_INSTALL_PREFIX for defining your
"packaging" prefix.
This must be true for all CPack generator.
We "may" set CPACK_PACKAGING_INSTALL_PREFIX to "CMAKE_INSTALL_PREFIX"
but this would break backward compatibility...
CPack generators (including CPackRPM) were used to provided their
**own** default value
for "CPACK_PACKAGING_INSTALL_PREFIX".
For RPM it is "/usr".
>
> Here's an example of what I mean:
>
> bash-3.2# cmake ..
> -- Found OCAML: 3.11.0
> -- prefix: /usr/local
> -- Configuring done
> -- Generating done
> -- Build files have been written to: /myrepos/ocaml-libs.hg/_build
[...]
> bash-3.2# make package > /dev/null
> bash-3.2# rpm -ql -p ocaml-libs-0.0.0-Linux.rpm
> /usr
> /usr/lib
> /usr/lib/ocaml
> /usr/lib/ocaml/ocamltest
> /usr/lib/ocaml/ocamltest/META
> /usr/lib/ocaml/ocamltest/ocamltest.a
> /usr/lib/ocaml/ocamltest/ocamltest.cma
> /usr/lib/ocaml/ocamltest/ocamltest.cmi
> /usr/lib/ocaml/ocamltest/ocamltest.cmxa
> /usr/lib/ocaml/ocamltest/ocamltest.ml
> /usr/lib/ocaml/ocamltest/ocamltest.mli
> I'll take a look at this since I need to fix what's included in the source RPM
> next :-)
Patch are always welcome (but in this case It may not be acceptable
because it would break backward compatibility for a problem which
already have a solution)
If you do want to provide some patch please open a bug tracker entry
and attach your patch
to the tracker and/or provide some git repo containing your proposal
and indicate its url
in the tracker. I.e. always open tracker entry for a patch proposal.
--
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org
More information about the CMake
mailing list