<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">2016-03-09 20:27 GMT+01:00 Eric Noulard <span dir="ltr"><<a href="mailto:eric.noulard@gmail.com" target="_blank">eric.noulard@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span class="">2016-03-09 19:50 GMT+01:00 Winfried <span dir="ltr"><<a href="mailto:winkus4u@arcor.de" target="_blank">winkus4u@arcor.de</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Yes, when using 'bin' instead of '/usr/bin' ( with PROGRAMS and without<br>
RUNTIME) it works.<br>
<br>
But nevertheless it's a bit sad because I used the absolute paths with<br>
consideration for two reasons:<br>
<br>
1. As I mentioned it's a Qt/KDE program (still version 3 at the moment).<br>
Depending on the target distro the application shall be stored at the usual<br>
place for that distribution (SuSE: /opt/kde3, Debian/Ubuntu: /usr/local,<br>
...) But those compilers and their shell scripts have nothing to do with<br>
Qt/KDE stuff and should normally be installed at /usr/bin regardless where<br>
the other binaries go to.<br></blockquote><div><br></div></span><div>I do not get your point? If you build an installer (using CPack) which has<br></div><div>relative path in it (./bin) or is relocatable (.rpm  or .deb) then you may perfectly<br></div><div>chose the prefix **at install time** be it /opt/kde3 or /usr or /opt ....<br></div></div></div></div></blockquote><div><br><br></div><div>Sorry rereading your message I think now I get it.<br></div><div>You want 2 prefixes for your applications /opt/kde3 or /usr/local for you KDE app<br></div><div>and /usr/ for binaries and shell scripts.<br><br></div><div>For doing that with CPack I suggest you build a multi-component package<br></div><div>and configure your CPack generator (RPM, STGZ, etc...) to build 1 package file<br></div><div>per component:<br><br>see:<br> <a href="https://cmake.org/Wiki/CMake:Component_Install_With_CPack#CPack_Generator_specific_behavior">https://cmake.org/Wiki/CMake:Component_Install_With_CPack#CPack_Generator_specific_behavior</a><br></div><div>and/or:<br><a href="https://cmake.org/cmake/help/v3.4/module/CPackComponent.html">https://cmake.org/cmake/help/v3.4/module/CPackComponent.html</a><br><br><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><br></div><span class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
2. I planned to make possible a second LOCAL install for development<br>
purposes parallel to the system installation. For such a local installation<br>
the installer shall be able to flexibly decide where to install the<br>
application data by setting an environment variable.<br></blockquote><div><br></div></span><div>Precisely, you need a relocatable installer.<br></div><div>Building an installer using relative install path makes it easier to build<br></div><div>a relocatable installer.<br><br></div><div>E.g. CPack RPM may perfectly handle absolute install path like files<br></div><div>put in /etc/ but then the whole package will be relocatable but the absolutely installed file.<br><br></div><div>For RPM see rpm --prefix or --relocate <br></div><span class=""><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Im not sure if this is possible if absolute paths are not usable.<br></blockquote><div><br></div></span><div>This is possible indeed, you should build relocatable package with CPack.<br></div><span class=""><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Missing documentation:<br>
The variant 'install( PROGRAMS ...)' is not yet documented at<br>
'<a href="https://cmake.org/cmake/help/v3.4/command/install.html" rel="noreferrer" target="_blank">https://cmake.org/cmake/help/v3.4/command/install.html</a>'.<br>
 Could someone from Kitware please add it?<br></blockquote><div><br></div></span><div>The documentation for install(PROGRAMS is documented in the same paragraph<br></div><div>as install(FILES...<br></div><div>see:<br><a href="https://cmake.org/cmake/help/v3.4/command/install.html#installing-files" target="_blank">https://cmake.org/cmake/help/v3.4/command/install.html#installing-files</a><br><br>"The <code><span>PROGRAMS</span></code> form is identical to the <code><span>FILES</span></code> form except that the
default permissions for the installed file also include <code><span>OWNER</span></code> ...."<br><br><br></div><div><div class="h5"><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Btw, please also add a sentence like "Following C-tradition the first<br>
position in a string is '0' " to the documentation of 'FIND'.<br>
<br>
J. Caleb Wherry wrote<br>
<span>> To Eric's point: your destination for these files should probably be "bin"<br>
> and not "/usr/bin". That way from CPack you can set the "<br>
> CPACK_INSTALL_PREFIX" to point to the actual place you want to install<br>
> your<br>
> project.<br>
><br>
> But everything still comes down to this: if your above prefix is "/usr"<br>
> then someone needs write access to that directory. Typically on unix with<br>
> makefiles the install step is run with "sudo" so that it can write to that<br>
> location. If you are doing an actual install to the system, then you have<br>
> to run it with sudo (or give you current user elevated permissions).<br>
><br>
> -Caleb<br>
><br>
</span>> On Wed, Mar 9, 2016 at 11:31 AM, Winfried &lt;<br>
<br>
> winkus4u@<br>
<div><div><br>
> &gt; wrote:<br>
><br>
>> Hi J Decker,<br>
>><br>
>> sorry I've missed your answer, while I wrote mine.<br>
>><br>
>> Now I used install( PROGRAMS ...        instead of FILES<br>
>> but I can't see any difference in the output. The error message is<br>
>> exactly<br>
>> the same as in my last reply.<br>
>> To be sure that it is not a cache problem, I deleted the 'build' dir and<br>
>> made a completely new build by:<br>
>> cmake ..<br>
>> make<br>
>> make package<br>
>><br>
>><br>
>><br>
>><br>
>> --<br>
>> View this message in context:<br>
>> <a href="http://cmake.3232098.n2.nabble.com/Howto-install-executables-that-aren-t-targets-tp7592951p7592957.html" rel="noreferrer" target="_blank">http://cmake.3232098.n2.nabble.com/Howto-install-executables-that-aren-t-targets-tp7592951p7592957.html</a><br>
>> Sent from the CMake mailing list archive at Nabble.com.<br>
>> --<br>
>><br>
>> Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
>><br>
>> Please keep messages on-topic and check the CMake FAQ at:<br>
>> <a href="http://www.cmake.org/Wiki/CMake_FAQ" rel="noreferrer" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
>><br>
>> Kitware offers various services to support the CMake community. For more<br>
>> information on each offering, please visit:<br>
>><br>
>> CMake Support: <a href="http://cmake.org/cmake/help/support.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/support.html</a><br>
>> CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/consulting.html</a><br>
>> CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/training.html</a><br>
>><br>
>> Visit other Kitware open-source projects at<br>
>> <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
>><br>
>> Follow this link to subscribe/unsubscribe:<br>
>> <a href="http://public.kitware.com/mailman/listinfo/cmake" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/cmake</a><br>
>><br>
><br>
><br>
><br>
> --<br>
> J. Caleb Wherry<br>
</div></div>> *Scientific Software Engineer*<br>
><br>
> &lt;<a href="http://www.calebwherry.com" rel="noreferrer" target="_blank">http://www.calebwherry.com</a>&gt;<br>
<span>> <a href="http://www.calebwherry.com" rel="noreferrer" target="_blank">http://www.calebwherry.com</a><br>
> <a href="tel:%2B1%20%28615%29%20708-5651" value="+16157085651" target="_blank">+1 (615) 708-5651</a><br>
<br>
> calebwherry@<br>
<br>
><br>
</span><span>> --<br>
><br>
> Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
><br>
> Please keep messages on-topic and check the CMake FAQ at:<br>
> <a href="http://www.cmake.org/Wiki/CMake_FAQ" rel="noreferrer" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
><br>
> Kitware offers various services to support the CMake community. For more<br>
> information on each offering, please visit:<br>
><br>
> CMake Support: <a href="http://cmake.org/cmake/help/support.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/support.html</a><br>
> CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/consulting.html</a><br>
> CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/training.html</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://public.kitware.com/mailman/listinfo/cmake" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/cmake</a><br>
<br>
<br>
<br>
<br>
<br>
--<br>
</span>View this message in context: <a href="http://cmake.3232098.n2.nabble.com/Howto-install-executables-that-aren-t-targets-tp7592951p7592959.html" rel="noreferrer" target="_blank">http://cmake.3232098.n2.nabble.com/Howto-install-executables-that-aren-t-targets-tp7592951p7592959.html</a><br>
<div><div>Sent from the CMake mailing list archive at Nabble.com.<br>
--<br>
<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" rel="noreferrer" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Kitware offers various services to support the CMake community. For more information on each offering, please visit:<br>
<br>
CMake Support: <a href="http://cmake.org/cmake/help/support.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/support.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/consulting.html</a><br>
CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/training.html</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/cmake" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/cmake</a><br>
</div></div></blockquote></div></div></div><span class=""><font color="#888888"><br><br clear="all"><br>-- <br><div><div dir="ltr"><div><div dir="ltr"><div>Eric<br></div></div></div></div></div>
</font></span></div></div>
</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Eric<br></div></div></div></div></div>
</div></div>