Details
-
Suggestion
-
Resolution: Done
-
Not Evaluated
-
None
-
c81baf1a9cc938a283f6c52c8fd10bab84183391 (qt-creator/qt-creator/4.14)
Description
As of 4.14.0, the CMake build system of Qt Creator hardcodes all the installation paths for binaries/libraries/etc in cmake/QtCreatorAPIInternal.cmake.
This suboptimal, as some of these paths must be tweaked when building on Linux and other Unix (e.g. *BSD) distributions, according to the distro policies: e.g. the multiarch library path for Debian-based systems, the multilib library path for RPM distros, and so on.
CMake already provides a way to set these paths according to the GNU coding standards:
https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html
This module also works non non-Linux Unix systems like *BSDs, and it also allows people building to change the paths.
I can understand this is not needed on Windows and macOS, so IMHO it could be OK to use it like:
if (APPLE) elseif (WIN32) else () include(GNUInstallDirs) # use it endif ()
Note: sinceĀ QtCreatorAPI (which include()s ) is include()d before project(), then this breaks some of the bits that GNUInstallDirs sets (like ${CMAKE_LIBRARY_ARCHITECTURE}). Hence, that include() ought to be moved after project().