Qt4 was still required for gtests

This commit is contained in:
Bertrand Songis
2016-03-27 10:18:31 +02:00
parent 8d5e5b2d01
commit 7ec0dd8a40
3 changed files with 5 additions and 7 deletions
+2 -4
View File
@@ -4,9 +4,6 @@ set(GTEST_SRCDIR /usr/src/gtest)
if(EXISTS "${GTEST_SRCDIR}/src/gtest-all.cc")
add_library(gtests-lib STATIC EXCLUDE_FROM_ALL ${GTEST_SRCDIR}/src/gtest-all.cc )
target_include_directories(gtests-lib PUBLIC ${GTEST_INCDIR} PUBLIC ${GTEST_SRCDIR})
find_package(Qt4 4.8.1 REQUIRED)
include(${QT_USE_FILE})
add_definitions(-DSIMU)
set(TESTS_PATH ${RADIO_SRC_DIRECTORY})
configure_file(${RADIO_SRC_DIRECTORY}/tests/location.h.in ${CMAKE_CURRENT_BINARY_DIR}/location.h @ONLY)
@@ -19,8 +16,9 @@ if(EXISTS "${GTEST_SRCDIR}/src/gtest-all.cc")
file(GLOB TEST_SRC_FILES ${RADIO_SRC_DIRECTORY}/tests/*.cpp)
add_executable(gtests EXCLUDE_FROM_ALL ${TEST_SRC_FILES} ${CMAKE_CURRENT_SOURCE_DIR}/location.h ${RADIO_SRC} ../targets/simu/simpgmspace.cpp)
qt5_use_modules(gtests Core Widgets)
add_dependencies(gtests ${FIRMWARE_DEPENDENCIES} gtests-lib)
target_link_libraries(gtests gtests-lib ${QT_LIBRARIES} pthread)
target_link_libraries(gtests gtests-lib pthread)
message("Added optional gtests target")
else()
message("WARNING: can't find gtests source, gtest target will not be available!")
+1 -1
View File
@@ -18,7 +18,7 @@
* GNU General Public License for more details.
*/
#include <QtGui/QApplication>
#include <QApplication>
#include "gtests.h"
int32_t lastAct = 0;
+2 -2
View File
@@ -20,8 +20,8 @@
#include <QtCore/QDir>
#include <QtCore/QDebug>
#include <QtGui/QApplication>
#include <QtGui/QPainter>
#include <QApplication>
#include <QPainter>
#include <math.h>
#include <gtest/gtest.h>