How to point cmake to use external libraries ?


Stradian

Member
Joined
Dec 6, 2010
Messages
303
Hello, I am using lvanovic's tool chain. My question is how do I stop cmake from including the qt4 libraries in lvanovic's tool chain, and point it to a different version outside of the tool chain?
 
Last edited by a moderator:
This depends on how cmake detects the qt libs. What you always can do is to later on manually specify the libs to be used after a cmake run. The basic steps for this are:


1) Do a normal cmake run.


2) Call "ccmake ." or "cmake-gui .".


3) Edit the variables pointing to the qt4 libs.


Another option would be looking up those options in advance and possibly define some different search path for qt libs. You could also try to manually define the dirs to the QT stuff by setting -DQT_INCLUDE_DIR=/path/, -DQT_BINARY_DIR=/path2/ and -DQT_LIBRARY_DIR=/path3/, but I don't know for sure if those variables are already used during package checking.


For more information about available variables that you can override have a look at the output of "cmake --help-module FindQt4"
 
Back
Top