Setting up CommonQt on OSX
CommonQt can be tricky to setup due to its dependencies from C++ land. Tricky enough to warrant writing down the steps I went through to get it running on Mac OS 10.7:
If you don't already have Xcode, install it because you'll need
g++
.Grab and install the Qt Libraries (not the Qt SDK). I used version 4.7.4.
Install
CMake
. (I usedbrew install cmake
.)Download, compile and install the SMOKE library:
$ git clone git://anongit.kde.org/smokegen $ cd smokegen $ cmake . $ make install $ cd .. $ git clone git://anongit.kde.org/smokeqt $ cd smokeqt $ cmake -DSmoke_DIR="$PWD/../smokegen/cmake" . $ make install
At this point,
smokephonon
failed to build so I had to manually install the two modules I actually needed:$ make -C qtcore install $ make -C qtgui install
CommonQt needed a couple of tweaks for OSX and recent changes in SMOKE. While said changes aren't reviewed and integrated into the main repository, you can fetch them as follows:
$ cd ~/quicklisp/local-projects $ git clone git://gitorious.org/~luismbo/commonqt/commonqt-luis.git $ cd commonqt-luis $ git checkout modular-smoke-and-osx-fixes
- Start SBCL and
(ql:quickload :qt)
.
Hopefully that went well. Next we'll try and run an application.
- Enable the
swank-listener-hooks
contrib by adding(slime-require 'swank-listener-hooks)
to your SLIME configuration. (asdf:load-system :qt-tutorial)
(asdf:load-system :qt-repl)
(qt-repl:start-gui-thread)
- And finally,
(qt-tutorial-14::test)
!
If not running under SLIME, (asdf:load-system :qt-tutorial)
followed by (qt-tutorial-14:main)
would be sufficient.
If you want to try and skip the C++ compilation steps, grab this tarball with libcommonqt.dylib
and libsmoke*.dylib
. You should place libcommonqt.dylib
in CommonQt's source directory. The SMOKE libs go into /usr/local/lib
or similar.