> FIrst of all, there are a couple of discussions about using
> CPACK_SET_DESTDIR, install prefixes and co in this list which are about same
> problems: directory layout depends on generator used.

>From what I've read, CPACK_SET_DESTDIR and
CPACK_PACKAGING_INSTALL_PREFIX only deal with the install prefix.
I've read this: http://www.mail-archive.com/cmake@cmake.org/msg11163.html
I think changing the install prefix is not enough for allowing this:

** NSIS:
/myapp.exe
/internal_lib1.dll
/plugins/plugin1.dll
---> No install prefix

** DEB / RPM:
/usr/Bin/myapp
/usr/Lib/app/internal_lib1.so
/usr/Lib/app/plugins/plugin1.so
---> install prefix is /usr/bin and also /usr/lib/app for internal stuffs

> Next, cmake_install files (which contain install rules) are generated at
> cmake time and it may be possible to code some variables there, which then
> can be passed through cpack.

I've checked the cmake_install.cmake files and I'm a bit lost, is
there some examples/doc about how to modify them?


Also is it possible to know the list of files to be installed by CPack
and modify this list?
In this case it would be simple to a something like this:

foreach (filepath, CPACK_LIST_OF_FILES_TO_BE_INSTALLED)
   if (CPACK_GENERATOR == "DEB" OR "RPM")
      if (filepath CONTAINS "plugins")
         file(REPLACE filepath "plugins" "/usr/lib/app/plugins")
         list(APPEND new_list_of_files_to_be_installed filepath)
      endif()
   elseif()
      #do nothing, keep the list of files as it is
   endif()
endforeach()

set(CPACK_LIST_OF_FILES_TO_BE_INSTALLED new_list_of_files_to_be_installed)

-- 
Tanguy Krotoff <[EMAIL PROTECTED]>
+33 6 68 42 70 24
_______________________________________________
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to