[CMake] Howto install executables that aren't targets

J. Caleb Wherry calebwherry at gmail.com
Wed Mar 9 11:39:32 EST 2016


To Eric's point: your destination for these files should probably be "bin"
and not "/usr/bin". That way from CPack you can set the "
CPACK_INSTALL_PREFIX" to point to the actual place you want to install your
project.

But everything still comes down to this: if your above prefix is "/usr"
then someone needs write access to that directory. Typically on unix with
makefiles the install step is run with "sudo" so that it can write to that
location. If you are doing an actual install to the system, then you have
to run it with sudo (or give you current user elevated permissions).

-Caleb

On Wed, Mar 9, 2016 at 11:31 AM, Winfried <winkus4u at arcor.de> wrote:

> Hi J Decker,
>
> sorry I've missed your answer, while I wrote mine.
>
> Now I used install( PROGRAMS ...        instead of FILES
> but I can't see any difference in the output. The error message is exactly
> the same as in my last reply.
> To be sure that it is not a cache problem, I deleted the 'build' dir and
> made a completely new build by:
> cmake ..
> make
> make package
>
>
>
>
> --
> View this message in context:
> http://cmake.3232098.n2.nabble.com/Howto-install-executables-that-aren-t-targets-tp7592951p7592957.html
> Sent from the CMake mailing list archive at Nabble.com.
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake
>



-- 
J. Caleb Wherry
*Scientific Software Engineer*

<http://www.calebwherry.com>
http://www.calebwherry.com
+1 (615) 708-5651
calebwherry at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20160309/15c0e121/attachment-0001.html>


More information about the CMake mailing list