D9299: Introduce INSTALL_PREFIX_SCRIPT to easily set up prefixes

Aleix Pol Gonzalez noreply at phabricator.kde.org
Wed Dec 13 12:35:55 UTC 2017


apol added a comment.


  > I agree. KDEInstallDirs.cmake seems to be wrong location for this functionality.
  > 
  > What I'm envisioning is a ecm-env.sh-like script which gets installed into `$PREFIX/bin` as soon as you install ECM.
  > 
  > Pseudo-cmake code:
  > 
  >   configure_file(${CMAKE_SOURCE_DIR}/ecm-env.sh ${CMAKE_BINARY_DIR}/ecm-env.sh)
  >   install(FILES ${CMAKE_BINARY_DIR}/ecm-env.sh DESTINATION ${BIN_INSTALL_DIR})
  
  We won't be necessarily using the same prefix as ECM, in fact it's quite unlikely.
  
  A motivation for me to work on this patch is to ease the ability to develop and deploy project builds into their own prefix rather than dumping it wherever the system is putting everything else. Setting up a separate prefix is easy at build-time (just pass `-DCMAKE_INSTALL_PREFIX=/opt/mambo`) but at runtime it is complex.
  
  Alternatively we have this documentation to set it up: https://community.kde.org/Guidelines_and_HOWTOs/Build_from_source#Set_up_the_runtime_environment

REPOSITORY
  R240 Extra CMake Modules

REVISION DETAIL
  https://phabricator.kde.org/D9299

To: apol, #frameworks, sitter
Cc: kfunk, bcooksley, ngraham, sitter, cgiboudeaux, #build_system
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-buildsystem/attachments/20171213/f79a0c20/attachment.html>


More information about the Kde-buildsystem mailing list