2

I'm trying to build the latest sources of keepassX on OS X which I have found here: http://gitorious.org/keepassx .

I'm getting this error message complaining about a missing Qt4 library:

ernst@cnap-b13-01 ~/Temp/keepassx/build
[264] : cmake [-DCMAKE_INSTALL_PREFIX=/usr/local] [-DCMAKE_VERBOSE_MAKEFILE=ON] [-DWITH_GUI_TESTS=ON] ..
CMake Error at /Applications/CMake 2.8-7.app/Contents/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:91 (MESSAGE):
  Could NOT find Qt4 (missing: QT_QMAKE_EXECUTABLE QT_MOC_EXECUTABLE
  QT_RCC_EXECUTABLE QT_INCLUDE_DIR QT_LIBRARY_DIR QT_QTCORE_INCLUDE_DIR
  QT_QTCORE_LIBRARY QT_QTGUI_INCLUDE_DIR QT_QTGUI_LIBRARY
  QT_QTTEST_INCLUDE_DIR QT_QTTEST_LIBRARY QT_UIC_EXECUTABLE) (Required is at
  least version "4.6.0")
Call Stack (most recent call first):
  /Applications/CMake 2.8-7.app/Contents/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:252 (_FPHSA_FAILURE_MESSAGE)
  /Applications/CMake 2.8-7.app/Contents/share/cmake-2.8/Modules/FindQt4.cmake:1171 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  CMakeLists.txt:68 (find_package)


-- Configuring incomplete, errors occurred!

Any ideas on how to get this compiling?

BetaRide
  • 16,207
  • 29
  • 99
  • 177

3 Answers3

2

I was able to solve this by installing the Qt SDK using the Mac OS X online installer and passing -DQT_QMAKE_EXECUTABLE=~/QtSDK/Desktop/Qt/4.8.1/gcc/bin/qmake to cmake.

Note that as the /Developer directory is no longer there with XCode 4.3 I also had to do sudo ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer /Developer in order for keepassx to find some header files and compile successfully.

Community
  • 1
  • 1
sschuberth
  • 28,386
  • 6
  • 101
  • 146
0

If Qt4 is installed in your system set QT_QMAKE_EXECUTABLE to the path for the qmake binary. You can do that in cmake-gui or ccmake. Or even with the -D parameter to cmake.

drescherjm
  • 10,365
  • 5
  • 44
  • 64
-1

Use the option -no-framework when configuring qt:

./configure -no-framework -static -prefix ~/Libraries/qt-installed
Garrett Hyde
  • 5,409
  • 8
  • 49
  • 55