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

Fix tests for Qt5

Conflicts:
	tests/CMakeLists.txt
This commit is contained in:
Dominik Schmidt 2013-05-25 16:18:33 +02:00 committed by Uwe L. Korn
parent 0558b2396f
commit fc0fec1fdc
8 changed files with 18 additions and 18 deletions

@ -354,12 +354,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}")

13
src/tests/CMakeLists.txt Normal file

@ -0,0 +1,13 @@
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)
tomahawk_add_test(Database)
endif()

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

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

@ -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;
}
}

@ -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()

@ -1,6 +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)
tomahawk_add_test(Database)