Set rpath when building Qt
-
Hello,
I followed the instructions for building Qt from source for QNX (https://doc.qt.io/qt-6/building-qt-for-qnx.html). Everything went well, except for the rpath string embedded in the library. In 5.x you could run the configure script with
-prefix
and-extprefix
for the target and host top-level directories, respectively.
What would be the equivalent when using cmake on 6.x code?Thanks,
--Elad -
When building Qt itself, the libraries it creates (e.g., libQt6Core.so.6) have their rpath set to the target installation directory.
Anyway, I believe that the answer is in the generic configuration section for cross-compiling, which is linked at the bottom of the QNX page: https://doc.qt.io/qt-6/configure-linux-device.html#configuring-qt
According to this document, the cmake equivalent for
-extprefix
isCMAKE_STAGING_PREFIX
, and for-prefix
it isCMAKE_INSTALL_PREFIX
.--Elad