1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-04-21 00:12:06 +02:00

Fix tests for Qt5

This commit is contained in:
Dominik Schmidt 2013-05-25 16:18:33 +02:00
parent 0766f2a51a
commit 8e2eefd611
7 changed files with 17 additions and 17 deletions

View File

@ -312,12 +312,6 @@ ADD_SUBDIRECTORY( thirdparty )
ADD_SUBDIRECTORY( src )
ADD_SUBDIRECTORY( admin )
if( BUILD_TESTS )
enable_testing()
add_subdirectory( tests )
endif()
# Add all targets to the build-tree export set
set(CMAKE_INSTALL_CMAKEDIR "${CMAKE_INSTALL_LIBDIR}/cmake/Tomahawk" CACHE PATH "Installation directory for CMake files")
set(CMAKE_INSTALL_FULL_CMAKEDIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_CMAKEDIR}")

12
src/tests/CMakeLists.txt Normal file
View File

@ -0,0 +1,12 @@
if( BUILD_TESTS )
setup_qt()
enable_testing()
include_directories(${CMAKE_CURRENT_LIST_DIR}/../src/tomahawk ${CMAKE_CURRENT_LIST_DIR}/../src/libtomahawk)
include(tomahawk_add_test.cmake)
tomahawk_add_test(Result)
tomahawk_add_test(Query)
endif()

View File

@ -19,8 +19,6 @@
#ifndef TOMAHAWK_TESTQUERY_H
#define TOMAHAWK_TESTQUERY_H
#include <QtTest>
#include "libtomahawk/Query.h"
#include "libtomahawk/Source.h"

View File

@ -19,8 +19,6 @@
#ifndef TOMAHAWK_TESTRESULT_H
#define TOMAHAWK_TESTRESULT_H
#include <QtTest>
#include "libtomahawk/Result.h"
#include "libtomahawk/Source.h"

View File

@ -16,8 +16,8 @@
* along with Tomahawk. If not, see <http://www.gnu.org/licenses/>.
*/
#include <QtCore>
#include <QtTest>
#include <QtCore>
#include "Test@TOMAHAWK_TEST_CLASS@.h"
#include "moc_Test@TOMAHAWK_TEST_CLASS@.cpp"
@ -32,4 +32,4 @@ int main( int argc, char** argv)
TEST( Test@TOMAHAWK_TEST_CLASS@ );
return 0;
}
}

View File

@ -17,4 +17,7 @@ macro(tomahawk_add_test test_class)
)
add_test(NAME ${TOMAHAWK_TEST_TARGET} COMMAND ${TOMAHAWK_TEST_TARGET})
qt5_use_modules(${TOMAHAWK_TEST_TARGET} Core Network Widgets Sql Xml Test)
endmacro()

View File

@ -1,5 +0,0 @@
include_directories(${CMAKE_CURRENT_LIST_DIR}/../src ${CMAKE_CURRENT_LIST_DIR}/../src/libtomahawk)
include(tomahawk_add_test.cmake)
tomahawk_add_test(Result)
tomahawk_add_test(Query)