###################### # # Meganizer - Media Organzier is a media management software # Copyright (C) 2010 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # ###################### SET(QT_USE_QTTEST TRUE) SET(QT_USE_QTXML TRUE) SET(QT_USE_QTNETWORK TRUE) INCLUDE(${QT_USE_FILE}) INCLUDE_DIRECTORIES( ${QT_INCLUDES} ${LIBENGSAS_INCLUDE_DIR} ${LIBENGSAS_TESTING_INCLUDE_DIR} ${libmeganizer_SOURCE_DIR} ${libmeganizer_BINARY_DIR} ${libmeganizertest_SOURCE_DIR} ${libmeganizertest_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/../ ${CMAKE_CURRENT_SOURCE_DIR}/../ ) LINK_DIRECTORIES(${libmeganizer_SOURCE_DIR}) IF(!${BUILD_DEBUG}) ADD_DEFINITIONS(-DQT_NO_DEBUG) ENDIF() ################################### # # # Article tests # # # ################################### SET(test_CPP articletest.cpp ../article.cpp ../articleedit.cpp ../articlesmodel.cpp ../articlepagewidgets.cpp ../magazines.cpp ../magazinesdb.cpp ../magazinesmodel.cpp ../magazine.cpp ../magazineedit.cpp ../magazinesearchwidget.cpp ../magazineissuewidget.cpp ) QT4_AUTOMOC(${test_CPP}) ADD_EXECUTABLE(articletest ${test_CPP}) TARGET_LINK_LIBRARIES(articletest ${QT_LIBRARIES} ${LIBENGSAS_LIBRARIES} libmeganizer libmeganizertest ) ADD_TEST(ArticleTest ${EXECUTABLE_OUTPUT_PATH}/articletest) ################################### # # # MagazinesModel tests # # # ################################### SET(model_CPP magazinesmodeltest.cpp ../article.cpp ../articleedit.cpp ../articlesmodel.cpp ../articlepagewidgets.cpp ../magazines.cpp ../magazinesdb.cpp ../magazinesmodel.cpp ../magazine.cpp ../magazineedit.cpp ../magazinesearchwidget.cpp ../magazineissuewidget.cpp ) QT4_AUTOMOC(${model_CPP}) ADD_EXECUTABLE(magazinesmodeltest ${model_CPP}) TARGET_LINK_LIBRARIES(magazinesmodeltest ${QT_LIBRARIES} ${LIBENGSAS_LIBRARIES} ${LIBENGSAS_TESTING_LIBRARIES} libmeganizer libmeganizertest ) ADD_TEST(MagazinesModelTest ${EXECUTABLE_OUTPUT_PATH}/magazinesmodeltest) # ################################### # # # Magazine tests # # # ################################### SET(test_CPP magazinetest.cpp ../article.cpp ../articleedit.cpp ../articlesmodel.cpp ../articlepagewidgets.cpp ../magazines.cpp ../magazinesdb.cpp ../magazinesmodel.cpp ../magazine.cpp ../magazineedit.cpp ../magazinesearchwidget.cpp ../magazineissuewidget.cpp ) QT4_AUTOMOC(${test_CPP}) ADD_EXECUTABLE(magazinetest ${test_CPP}) TARGET_LINK_LIBRARIES(magazinetest ${QT_LIBRARIES} ${LIBENGSAS_LIBRARIES} libmeganizer libmeganizertest ) ADD_TEST(MagazineTest ${EXECUTABLE_OUTPUT_PATH}/magazinetest) ################################### # # # ArticlesModel tests # # # ################################### SET(model_CPP articlesmodeltest.cpp ../article.cpp ../articleedit.cpp ../articlesmodel.cpp ../articlepagewidgets.cpp ../magazines.cpp ../magazinesdb.cpp ../magazinesmodel.cpp ../magazine.cpp ../magazineedit.cpp ../magazinesearchwidget.cpp ../magazineissuewidget.cpp ) QT4_AUTOMOC(${model_CPP}) ADD_EXECUTABLE(articlesmodeltest ${model_CPP}) TARGET_LINK_LIBRARIES(articlesmodeltest ${QT_LIBRARIES} ${LIBENGSAS_LIBRARIES} ${LIBENGSAS_TESTING_LIBRARIES} libmeganizer libmeganizertest ) ADD_TEST(ArticlesModelTest ${EXECUTABLE_OUTPUT_PATH}/articlesmodeltest) # ################################### # # # Magazines Simple Edit tests # # # ################################### SET(test_CPP magazinessimpleeditwidgettests.cpp ../articlepagewidgets.cpp ../magazineissuewidget.cpp ) QT4_AUTOMOC(${test_CPP}) ADD_EXECUTABLE(magazinessimpleeditwidgettests ${test_CPP}) TARGET_LINK_LIBRARIES(magazinessimpleeditwidgettests ${QT_LIBRARIES} ${LIBENGSAS_LIBRARIES} libmeganizer libmeganizertest ) ADD_TEST(MagazinesSimpleEditWidgetTests ${EXECUTABLE_OUTPUT_PATH}/magazinessimpleeditwidgettests)