Linux – QT_DIR Not found


I am trying to compile Qt 4.5.2 with ITK. I get the error QT_DIR not
found. I compiled QT 4.5.2 from Source. ccmake tells that the directory
containing QTConfig.cmake file is the QT_DIR. I am not able to find the
file anywhere. Am I missing something?

This is the error i'm getting in CMake:

CMake Warning at CMakeLists.txt:11 (FIND_PACKAGE):
Could not find module FindQT.cmake or a configuration file for package QT.

Adjust CMAKE_MODULE_PATH to find FindQT.cmake or set QT_DIR to the
directory containing a CMake configuration file for QT. The file will have
one of the following names:


i've set the PATH to CMAKE_MODULES_PATH to find FindQT.cmake… but i'm not find QTConfig.cmake to set PATH for QT_DIR…

Please help me out to solve this problem..

Thanking You.

Best Solution

The obvious answer: set your QTDIR environment variable (I'm sure it's not QT_DIR) to your Qt 4 install path.

Related Question