How to make cmake use my newly installed Qt on the home folder?
My Qt was installed on /home/lz/Qt5.11.2/.
ls /home/lz/Qt5.11.2/5.11.2/gcc_64
bin doc include lib libexec mkspecs phrasebooks plugins qml qtvirtualkeyboard resources translations
I tried
export LD_LIBRARY_PATH="/home/lz/Qt5.11.2/5.11.2/gcc_64/lib"
And compiled doing make VERBOSE=1 just to see if this path was being used instead of the system ones, but it wasn't.
How do I make cmake use them?
ps: I also tried
lz@vm:~/orwell$ cmake -DCMAKE_CXX_FLAGS=-isystem /home/lz/Qt5.11.2/5.11.2/gcc_64/lib .
This way it will use the include path but not the lib path
I also added the path /home/lz/Qt5.11.2/5.11.2/gcc_64/lib to ldconfig but it seems it linked only a few libs, not all of them:
/home/lz/Qt5.11.2/5.11.2/gcc_64/lib:
libQt5QuickControls2.so.5 -> libQt5QuickControls2.so.5.11.2
libQt5OpenGL.so.5 -> libQt5OpenGL.so.5.11.2
libQt5Purchasing.so.5 -> libQt5Purchasing.so.5.11.2
libQt5Bluetooth.so.5 -> libQt5Bluetooth.so.5.11.2
/sbin/ldconfig.real: /lib/x86_64-linux-gnu/ld-2.26.so is the dynamic linker, ignoring
libQt5ScriptTools.so.5 -> libQt5ScriptTools.so.5.11.2
libQt5DBus.so.5 -> libQt5DBus.so.5.11.2
libQt5WebEngineWidgets.so.5 -> libQt5WebEngineWidgets.so.5.11.2
libQt5Widgets.so.5 -> libQt5Widgets.so.5.11.2
libQt5MultimediaGstTools.so.5 -> libQt5MultimediaGstTools.so.5.11.2
libQt5XmlPatterns.so.5 -> libQt5XmlPatterns.so.5.11.2
libQt5QuickTest.so.5 -> libQt5QuickTest.so.5.11.2
libQt5QuickWidgets.so.5 -> libQt5QuickWidgets.so.5.11.2
libQt5PositioningQuick.so.5 -> libQt5PositioningQuick.so.5.11.2
libQt5WebView.so.5 -> libQt5WebView.so.5.11.2
libQt5Network.so.5 -> libQt5Network.so.5.11.2
libQt5XcbQpa.so.5 -> libQt5XcbQpa.so.5.11.2
libQt5EglFsKmsSupport.so.5 -> libQt5EglFsKmsSupport.so.5.11.2
libQt5Designer.so.5 -> libQt5Designer.so.5.11.2
...
compiling qt paths cmake
|
show 1 more comment
My Qt was installed on /home/lz/Qt5.11.2/.
ls /home/lz/Qt5.11.2/5.11.2/gcc_64
bin doc include lib libexec mkspecs phrasebooks plugins qml qtvirtualkeyboard resources translations
I tried
export LD_LIBRARY_PATH="/home/lz/Qt5.11.2/5.11.2/gcc_64/lib"
And compiled doing make VERBOSE=1 just to see if this path was being used instead of the system ones, but it wasn't.
How do I make cmake use them?
ps: I also tried
lz@vm:~/orwell$ cmake -DCMAKE_CXX_FLAGS=-isystem /home/lz/Qt5.11.2/5.11.2/gcc_64/lib .
This way it will use the include path but not the lib path
I also added the path /home/lz/Qt5.11.2/5.11.2/gcc_64/lib to ldconfig but it seems it linked only a few libs, not all of them:
/home/lz/Qt5.11.2/5.11.2/gcc_64/lib:
libQt5QuickControls2.so.5 -> libQt5QuickControls2.so.5.11.2
libQt5OpenGL.so.5 -> libQt5OpenGL.so.5.11.2
libQt5Purchasing.so.5 -> libQt5Purchasing.so.5.11.2
libQt5Bluetooth.so.5 -> libQt5Bluetooth.so.5.11.2
/sbin/ldconfig.real: /lib/x86_64-linux-gnu/ld-2.26.so is the dynamic linker, ignoring
libQt5ScriptTools.so.5 -> libQt5ScriptTools.so.5.11.2
libQt5DBus.so.5 -> libQt5DBus.so.5.11.2
libQt5WebEngineWidgets.so.5 -> libQt5WebEngineWidgets.so.5.11.2
libQt5Widgets.so.5 -> libQt5Widgets.so.5.11.2
libQt5MultimediaGstTools.so.5 -> libQt5MultimediaGstTools.so.5.11.2
libQt5XmlPatterns.so.5 -> libQt5XmlPatterns.so.5.11.2
libQt5QuickTest.so.5 -> libQt5QuickTest.so.5.11.2
libQt5QuickWidgets.so.5 -> libQt5QuickWidgets.so.5.11.2
libQt5PositioningQuick.so.5 -> libQt5PositioningQuick.so.5.11.2
libQt5WebView.so.5 -> libQt5WebView.so.5.11.2
libQt5Network.so.5 -> libQt5Network.so.5.11.2
libQt5XcbQpa.so.5 -> libQt5XcbQpa.so.5.11.2
libQt5EglFsKmsSupport.so.5 -> libQt5EglFsKmsSupport.so.5.11.2
libQt5Designer.so.5 -> libQt5Designer.so.5.11.2
...
compiling qt paths cmake
something like-DQTROOT=/opt/Qt5.9.5/5.9/gcc_64/
– kenn
Feb 20 at 16:52
@kenn I did it and received the warning CMake Warning: Manually-specified variables were not used by the project: QTROOT and also it didn't compile
– Guerlando OCs
Feb 20 at 17:18
Have you tried following the Qt CMake Manual here
– gsxruk
Feb 20 at 18:58
1
There's some additional information here that might be useful, as well: CMake: Finding Qt 5 the “Right Way”
– steeldriver
Feb 20 at 19:28
@steeldriver I modified the CMakeFiles to be done in the right way. And then didcmake -DQt5_DIR=/home/lz/Qt5.11.2 .but the problem persists
– Guerlando OCs
Feb 20 at 19:58
|
show 1 more comment
My Qt was installed on /home/lz/Qt5.11.2/.
ls /home/lz/Qt5.11.2/5.11.2/gcc_64
bin doc include lib libexec mkspecs phrasebooks plugins qml qtvirtualkeyboard resources translations
I tried
export LD_LIBRARY_PATH="/home/lz/Qt5.11.2/5.11.2/gcc_64/lib"
And compiled doing make VERBOSE=1 just to see if this path was being used instead of the system ones, but it wasn't.
How do I make cmake use them?
ps: I also tried
lz@vm:~/orwell$ cmake -DCMAKE_CXX_FLAGS=-isystem /home/lz/Qt5.11.2/5.11.2/gcc_64/lib .
This way it will use the include path but not the lib path
I also added the path /home/lz/Qt5.11.2/5.11.2/gcc_64/lib to ldconfig but it seems it linked only a few libs, not all of them:
/home/lz/Qt5.11.2/5.11.2/gcc_64/lib:
libQt5QuickControls2.so.5 -> libQt5QuickControls2.so.5.11.2
libQt5OpenGL.so.5 -> libQt5OpenGL.so.5.11.2
libQt5Purchasing.so.5 -> libQt5Purchasing.so.5.11.2
libQt5Bluetooth.so.5 -> libQt5Bluetooth.so.5.11.2
/sbin/ldconfig.real: /lib/x86_64-linux-gnu/ld-2.26.so is the dynamic linker, ignoring
libQt5ScriptTools.so.5 -> libQt5ScriptTools.so.5.11.2
libQt5DBus.so.5 -> libQt5DBus.so.5.11.2
libQt5WebEngineWidgets.so.5 -> libQt5WebEngineWidgets.so.5.11.2
libQt5Widgets.so.5 -> libQt5Widgets.so.5.11.2
libQt5MultimediaGstTools.so.5 -> libQt5MultimediaGstTools.so.5.11.2
libQt5XmlPatterns.so.5 -> libQt5XmlPatterns.so.5.11.2
libQt5QuickTest.so.5 -> libQt5QuickTest.so.5.11.2
libQt5QuickWidgets.so.5 -> libQt5QuickWidgets.so.5.11.2
libQt5PositioningQuick.so.5 -> libQt5PositioningQuick.so.5.11.2
libQt5WebView.so.5 -> libQt5WebView.so.5.11.2
libQt5Network.so.5 -> libQt5Network.so.5.11.2
libQt5XcbQpa.so.5 -> libQt5XcbQpa.so.5.11.2
libQt5EglFsKmsSupport.so.5 -> libQt5EglFsKmsSupport.so.5.11.2
libQt5Designer.so.5 -> libQt5Designer.so.5.11.2
...
compiling qt paths cmake
My Qt was installed on /home/lz/Qt5.11.2/.
ls /home/lz/Qt5.11.2/5.11.2/gcc_64
bin doc include lib libexec mkspecs phrasebooks plugins qml qtvirtualkeyboard resources translations
I tried
export LD_LIBRARY_PATH="/home/lz/Qt5.11.2/5.11.2/gcc_64/lib"
And compiled doing make VERBOSE=1 just to see if this path was being used instead of the system ones, but it wasn't.
How do I make cmake use them?
ps: I also tried
lz@vm:~/orwell$ cmake -DCMAKE_CXX_FLAGS=-isystem /home/lz/Qt5.11.2/5.11.2/gcc_64/lib .
This way it will use the include path but not the lib path
I also added the path /home/lz/Qt5.11.2/5.11.2/gcc_64/lib to ldconfig but it seems it linked only a few libs, not all of them:
/home/lz/Qt5.11.2/5.11.2/gcc_64/lib:
libQt5QuickControls2.so.5 -> libQt5QuickControls2.so.5.11.2
libQt5OpenGL.so.5 -> libQt5OpenGL.so.5.11.2
libQt5Purchasing.so.5 -> libQt5Purchasing.so.5.11.2
libQt5Bluetooth.so.5 -> libQt5Bluetooth.so.5.11.2
/sbin/ldconfig.real: /lib/x86_64-linux-gnu/ld-2.26.so is the dynamic linker, ignoring
libQt5ScriptTools.so.5 -> libQt5ScriptTools.so.5.11.2
libQt5DBus.so.5 -> libQt5DBus.so.5.11.2
libQt5WebEngineWidgets.so.5 -> libQt5WebEngineWidgets.so.5.11.2
libQt5Widgets.so.5 -> libQt5Widgets.so.5.11.2
libQt5MultimediaGstTools.so.5 -> libQt5MultimediaGstTools.so.5.11.2
libQt5XmlPatterns.so.5 -> libQt5XmlPatterns.so.5.11.2
libQt5QuickTest.so.5 -> libQt5QuickTest.so.5.11.2
libQt5QuickWidgets.so.5 -> libQt5QuickWidgets.so.5.11.2
libQt5PositioningQuick.so.5 -> libQt5PositioningQuick.so.5.11.2
libQt5WebView.so.5 -> libQt5WebView.so.5.11.2
libQt5Network.so.5 -> libQt5Network.so.5.11.2
libQt5XcbQpa.so.5 -> libQt5XcbQpa.so.5.11.2
libQt5EglFsKmsSupport.so.5 -> libQt5EglFsKmsSupport.so.5.11.2
libQt5Designer.so.5 -> libQt5Designer.so.5.11.2
...
compiling qt paths cmake
compiling qt paths cmake
edited Feb 20 at 16:24
Guerlando OCs
asked Feb 20 at 15:24
Guerlando OCsGuerlando OCs
2911719
2911719
something like-DQTROOT=/opt/Qt5.9.5/5.9/gcc_64/
– kenn
Feb 20 at 16:52
@kenn I did it and received the warning CMake Warning: Manually-specified variables were not used by the project: QTROOT and also it didn't compile
– Guerlando OCs
Feb 20 at 17:18
Have you tried following the Qt CMake Manual here
– gsxruk
Feb 20 at 18:58
1
There's some additional information here that might be useful, as well: CMake: Finding Qt 5 the “Right Way”
– steeldriver
Feb 20 at 19:28
@steeldriver I modified the CMakeFiles to be done in the right way. And then didcmake -DQt5_DIR=/home/lz/Qt5.11.2 .but the problem persists
– Guerlando OCs
Feb 20 at 19:58
|
show 1 more comment
something like-DQTROOT=/opt/Qt5.9.5/5.9/gcc_64/
– kenn
Feb 20 at 16:52
@kenn I did it and received the warning CMake Warning: Manually-specified variables were not used by the project: QTROOT and also it didn't compile
– Guerlando OCs
Feb 20 at 17:18
Have you tried following the Qt CMake Manual here
– gsxruk
Feb 20 at 18:58
1
There's some additional information here that might be useful, as well: CMake: Finding Qt 5 the “Right Way”
– steeldriver
Feb 20 at 19:28
@steeldriver I modified the CMakeFiles to be done in the right way. And then didcmake -DQt5_DIR=/home/lz/Qt5.11.2 .but the problem persists
– Guerlando OCs
Feb 20 at 19:58
something like
-DQTROOT=/opt/Qt5.9.5/5.9/gcc_64/– kenn
Feb 20 at 16:52
something like
-DQTROOT=/opt/Qt5.9.5/5.9/gcc_64/– kenn
Feb 20 at 16:52
@kenn I did it and received the warning CMake Warning: Manually-specified variables were not used by the project: QTROOT and also it didn't compile
– Guerlando OCs
Feb 20 at 17:18
@kenn I did it and received the warning CMake Warning: Manually-specified variables were not used by the project: QTROOT and also it didn't compile
– Guerlando OCs
Feb 20 at 17:18
Have you tried following the Qt CMake Manual here
– gsxruk
Feb 20 at 18:58
Have you tried following the Qt CMake Manual here
– gsxruk
Feb 20 at 18:58
1
1
There's some additional information here that might be useful, as well: CMake: Finding Qt 5 the “Right Way”
– steeldriver
Feb 20 at 19:28
There's some additional information here that might be useful, as well: CMake: Finding Qt 5 the “Right Way”
– steeldriver
Feb 20 at 19:28
@steeldriver I modified the CMakeFiles to be done in the right way. And then did
cmake -DQt5_DIR=/home/lz/Qt5.11.2 . but the problem persists– Guerlando OCs
Feb 20 at 19:58
@steeldriver I modified the CMakeFiles to be done in the right way. And then did
cmake -DQt5_DIR=/home/lz/Qt5.11.2 . but the problem persists– Guerlando OCs
Feb 20 at 19:58
|
show 1 more comment
0
active
oldest
votes
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1119871%2fhow-to-make-cmake-use-my-newly-installed-qt-on-the-home-folder%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1119871%2fhow-to-make-cmake-use-my-newly-installed-qt-on-the-home-folder%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
something like
-DQTROOT=/opt/Qt5.9.5/5.9/gcc_64/– kenn
Feb 20 at 16:52
@kenn I did it and received the warning CMake Warning: Manually-specified variables were not used by the project: QTROOT and also it didn't compile
– Guerlando OCs
Feb 20 at 17:18
Have you tried following the Qt CMake Manual here
– gsxruk
Feb 20 at 18:58
1
There's some additional information here that might be useful, as well: CMake: Finding Qt 5 the “Right Way”
– steeldriver
Feb 20 at 19:28
@steeldriver I modified the CMakeFiles to be done in the right way. And then did
cmake -DQt5_DIR=/home/lz/Qt5.11.2 .but the problem persists– Guerlando OCs
Feb 20 at 19:58