[CMake] Howto install executables that aren't targets

Winfried winkus4u at arcor.de
Wed Mar 9 10:58:58 EST 2016


Hi Caleb,

yes, I also suppose that it's some kind of permission issue, but I don't
know how to handle it:

All other install commands work exept those that should also copy to
/usr/bin.
I also tried to install those with another order, here is that code form
subdirectory 'tools':
install( FILES  nqc
		nbc
		tuxm_aar-04_make.sh
		tuxm_asuro_make.sh
		tuxm_nxt_make.sh
		tuxm_nxtsim_make.sh
		tuxm_rcx_make.sh
		RUNTIME DESTINATION /usr/bin)

'cmake ..' runs normal without an error, but when I call CPack by executing
'make package' the error always appears when it tries to pack the first of
the above files. Here's the complete error message of the CPack part (before
it is only i18n stuff output):
Run CPack packaging tool...
/usr/bin/cpack --config ./CPackConfig.cmake
CPack: Create package using STGZ
CPack: Install projects
CPack: - Run preinstall target for: TuxMinds
CPack: - Install project: TuxMinds
CMake Error at
/opt/build/tuxminds_3.96_20141203_cmake/build/tools/cmake_install.cmake:44
(file):
  file INSTALL cannot copy file

  "/opt/build/tuxminds_3.96_20141203_cmake/tools/nqc" to "/usr/bin/nqc".
Call Stack (most recent call first):
  /opt/build/tuxminds_3.96_20141203_cmake/build/cmake_install.cmake:41
(include)
  
CPack Error: Error when generating package: TuxMinds
make: *** [package] Fehler 1

When I exclude subdirectory 'tools' the package is successfully built by
'make package'.

Here's the output of 'ls -la' for that directory:
insgesamt 3512
drwxr-xr-x 1 me users     300  9. Mär 16:26 .
drwxr-xr-x 1 me users    1924  9. Mär 16:26 ..
-rw-r--r-- 1 me users     389  9. Mär 16:26 CMakeLists.txt
-rw-r--r-- 1 me users     419  9. Mär 16:26 CMakeLists.txt~
drwxr-xr-x 1 me users      42 18. Dez 2013  .deps
-rw-r--r-- 1 me users     105 29. Mär 2014  Makefile.am
-rw-r--r-- 1 me users   13732  3. Dez 2014  Makefile.in
-rwxr-xr-x 1 me users 3123348 15. Mär 2011  nbc
-rwxr-xr-x 1 me users  420440 15. Jan 2012  nqc
-rwxr-xr-x 1 me users     968 17. Nov 2014  tuxm_aar-04_make.sh
-rwxr-xr-x 1 me users    1249  4. Dez 2013  tuxm_asuro_make.sh
-rwxr-xr-x 1 me users    1544  4. Dez 2013  tuxm_nxt_make.sh
-rwxr-xr-x 1 me users     834  5. Dez 2013  tuxm_nxtsim_make.sh
-rwxr-xr-x 1 me users    1056  4. Dez 2013  tuxm_rcx_make.sh

nothing unusual as I think.

If you need some more information, please let me know...




--
View this message in context: http://cmake.3232098.n2.nabble.com/Howto-install-executables-that-aren-t-targets-tp7592951p7592955.html
Sent from the CMake mailing list archive at Nabble.com.


More information about the CMake mailing list