D22676: Provide a more sensible CMAKE_INSTALL_PREFIX default

Christophe Giboudeaux noreply at phabricator.kde.org
Tue Jul 23 10:52:37 BST 2019


cgiboudeaux added inline comments.

INLINE COMMENTS

> KDEInstallDirs.cmake:429
>  
> -
> +if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
> +    get_filename_component(_ecm_prefix "${ECM_DIR}/../../../" ABSOLUTE)

Might be worth adding that this only works with CMake >= 3.7

> KDEInstallDirs.cmake:430
> +if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
> +    get_filename_component(_ecm_prefix "${ECM_DIR}/../../../" ABSOLUTE)
> +    set(CMAKE_INSTALL_PREFIX "${_ecm_prefix}" CACHE PATH "Install path prefix" FORCE)

I'm not fond of having this hardcoded.

What about adding a new variable in ECMConfig.cmake with the ${PACKAGE_PREFIX_DIR} value instead?

REPOSITORY
  R240 Extra CMake Modules

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

To: apol
Cc: cgiboudeaux, kde-frameworks-devel, kde-buildsystem, LeGast00n, sbergeron, bencreasy, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-buildsystem/attachments/20190723/3ff75c95/attachment-0001.html>


More information about the Kde-buildsystem mailing list