Skip to content

Commit 275f7b0

Browse files
author
timlinux
committedMay 21, 2007
Simple test case working built by cmake
git-svn-id: http://svn.osgeo.org/qgis/trunk@6951 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 38953d5 commit 275f7b0

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed
 

‎CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ SET( QT_USE_QTXML TRUE )
106106
SET( QT_USE_QTNETWORK TRUE )
107107
SET( QT_USE_QTSVG TRUE )
108108
IF (ENABLE_TESTS)
109-
SET( QT_USE_QTTESTS TRUE )
109+
SET( QT_USE_QTTEST TRUE )
110110
ENABLE_TESTING()
111111
ENDIF (ENABLE_TESTS)
112112
# TODO: should not be needed, report it to CMake devs

‎tests/src/core/CMakeLists.txt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@
44
# application test
55

66
SET(applicationtest_SRCS testqgsapplication.cpp)
7-
QT4_GENERATE_MOC(${CMAKE_CURRENT_SOURCE_DIR}/testqgsapplication.cpp testqgsapplication.moc)
8-
#SET(applicationtest_MOC_CPPS testqgsapplication.cpp)
9-
#QT4_WRAP_CPP(applicationtest_MOC_SRCS ${applicationtest_MOC_CPPS})
10-
#ADD_CUSTOM_TARGET(applicationtestmoc ALL DEPENDS ${applicationtest_MOC_SRCS})
7+
#QT4_GENERATE_MOC(${CMAKE_CURRENT_SOURCE_DIR}/testqgsapplication.cpp testqgsapplication.moc)
8+
#SET_SOURCE_FILES_PROPERTIES(testqgsapplication.moc PROPERTIES GENERATED TRUE)
9+
SET(applicationtest_MOC_CPPS testqgsapplication.cpp)
10+
QT4_WRAP_CPP(applicationtest_MOC_SRCS ${applicationtest_MOC_CPPS})
11+
ADD_CUSTOM_TARGET(applicationtestmoc ALL DEPENDS ${applicationtest_MOC_SRCS})
1112
#QT4_GENERATE_MOC(${CMAKE_CURRENT_SOURCE_DIR}/testqgsapplication.cpp moc_testqgsapplication.cxx)
1213

1314
#####################################################
@@ -58,6 +59,7 @@ ENDIF (WIN32)
5859
ADD_EXECUTABLE(applicationtest
5960
${applicationtest_SRCS}
6061
)
62+
ADD_DEPENDENCIES(applicationtest applicationtestmoc)
6163
TARGET_LINK_LIBRARIES(applicationtest
6264
${QT_LIBRARIES}
6365
qgis_core

‎tests/src/core/testqgsapplication.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,5 @@ class TestQgsApplication: public QObject
145145
};
146146

147147
QTEST_MAIN(TestQgsApplication)
148-
#include "testqgsapplication.moc.cpp"
149-
150-
151-
148+
#include "moc_testqgsapplication.cxx"
152149

0 commit comments

Comments
 (0)
Please sign in to comment.