I'm trying to build kxstitch, which is designed for Linux, on OS X. I've gotten most of the way there by installing MacPorts, XCode, KDE, etc., but am getting this error at the final stage of building the project:

Linking CXX executable kxstitch.app/Contents/MacOS/kxstitch
Undefined symbols for architecture x86_64:
"QX11Info::display()", referenced from:
Editor::keyPressAlphabet(QKeyEvent*) in Editor.o


The key line in the build script is:

cmake -DCMAKE_INSTALL_PREFIX=kde4-config --prefix .. && make -j${THREADS}

Here is CMakeLists.txt.

The missing symbol seems to be part of Qt. As part of installing KDE through MacPorts, many Qt-related packages were installed, including qt4-mac, qt4-mac-devel, and qt4-x11. The output of cmake includes:

-- Looking for QT_MAC_USE_COCOA
-- Looking for QT_MAC_USE_COCOA - found
-- Found Qt-Version 4.8.2
-- -> QT_QMAKE_EXECUTABLE is /opt/local/bin/qmake
-- -> QT_INCLUDE_DIR is /opt/local/include
-- -> QT_QTCORE_INCLUDE_DIR is /opt/local/include/QtCore
-- -> QT_BINARY_DIR is /opt/local/bin
-- -> QT_LIBRARY_DIR is /opt/local/lib
-- -> QT_PLUGINS_DIR is /opt/local/share/qt4/plugins
-- -> QT_MKSPECS_DIR is /opt/local/share/qt4/mkspecs
I'd be grateful for any advice on how to proceed.