From dbce4115533c5b999e6b83303f3f9af7e13e7033 Mon Sep 17 00:00:00 2001 From: Matt Williams Date: Wed, 21 Jul 2010 15:14:36 +0000 Subject: [PATCH] Make the tests only link against QtTest (i.e. not QtGui) so that they can be run outside of X11. --- tests/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 3ebcd11d..053448f7 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -6,7 +6,7 @@ MACRO(CREATE_TEST headerfile sourcefile executablename) UNSET(test_moc_SRCS) #clear out the MOCs from previous tests QT4_WRAP_CPP(test_moc_SRCS ${headerfile}) ADD_EXECUTABLE(${executablename} ${sourcefile} ${test_moc_SRCS}) - TARGET_LINK_LIBRARIES(${executablename} PolyVoxCore PolyVoxUtil ${QT_LIBRARIES}) + TARGET_LINK_LIBRARIES(${executablename} PolyVoxCore PolyVoxUtil ${QT_QTTEST_LIBRARY}) #HACK. This is needed since everything is built in the base dir in Windows. As of 2.8 we should change this. IF(WIN32) SET(LATEST_TEST ${EXECUTABLE_OUTPUT_PATH}/${executablename}) @@ -20,6 +20,7 @@ IF(NOT QT_QTTEST_FOUND) ENDIF() INCLUDE_DIRECTORIES(${PolyVox_SOURCE_DIR}/PolyVoxCore/include ${CMAKE_CURRENT_BINARY_DIR}) +REMOVE_DEFINITIONS(-DQT_GUI_LIB) #Make sure the tests don't link to the QtGui # Array tests CREATE_TEST(TestArray.h TestArray.cpp TestArray)