#***************************************************************************
#*   Copyright (C) 2008 by S. MANKOWSKI / G. DE BURE support@mankowski.fr  *
#*                                                                         *
#*   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 2 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 <http://www.gnu.org/licenses/>  *
#***************************************************************************
MESSAGE( STATUS "..:: CMAKE SKBBASEMODELERTEST ::..")

PROJECT(SKBBASEMODELERTEST)

LINK_DIRECTORIES (${LIBRARY_OUTPUT_PATH})

#Make executables
ADD_EXECUTABLE(skgtestbase skgtestbase.cpp)
ADD_EXECUTABLE(skgtestfile skgtestfile.cpp)
ADD_EXECUTABLE(skgtestmultidocument skgtestmultidocument.cpp)
ADD_EXECUTABLE(skgtestnodes skgtestnodes.cpp)
ADD_EXECUTABLE(skgtestpassword skgtestpassword.cpp)
ADD_EXECUTABLE(skgtestperfo skgtestperfo.cpp)
ADD_EXECUTABLE(skgtestreport skgtestreport.cpp)
ADD_EXECUTABLE(skgtesttransaction skgtesttransaction.cpp)


TARGET_LINK_LIBRARIES(skgtestbase Qt5::Core skgbasemodeler)
TARGET_LINK_LIBRARIES(skgtestfile Qt5::Core skgbasemodeler)
TARGET_LINK_LIBRARIES(skgtestmultidocument Qt5::Core skgbasemodeler)
TARGET_LINK_LIBRARIES(skgtestnodes Qt5::Core Qt5::Gui skgbasemodeler)
TARGET_LINK_LIBRARIES(skgtestpassword Qt5::Core skgbasemodeler)
TARGET_LINK_LIBRARIES(skgtestperfo Qt5::Core skgbasemodeler)
TARGET_LINK_LIBRARIES(skgtestreport Qt5::Core skgbasemodeler)
TARGET_LINK_LIBRARIES(skgtesttransaction Qt5::Core skgbankmodeler skgbasemodeler)

#Add test
ENABLE_TESTING()
ADD_TEST(skgtestbase ${CMAKE_SOURCE_DIR}/tests/scripts/skgtestbase.sh)
ADD_TEST(skgtestfile ${CMAKE_SOURCE_DIR}/tests/scripts/skgtestfile.sh)
ADD_TEST(skgtestmultidocument ${CMAKE_SOURCE_DIR}/tests/scripts/skgtestmultidocument.sh)
ADD_TEST(skgtestnodes ${CMAKE_SOURCE_DIR}/tests/scripts/skgtestnodes.sh)
ADD_TEST(skgtestpassword ${CMAKE_SOURCE_DIR}/tests/scripts/skgtestpassword.sh)
ADD_TEST(skgtestperfo ${CMAKE_SOURCE_DIR}/tests/scripts/skgtestperfo.sh)
ADD_TEST(skgtestreport ${CMAKE_SOURCE_DIR}/tests/scripts/skgtestreport.sh)
ADD_TEST(skgtesttransaction ${CMAKE_SOURCE_DIR}/tests/scripts/skgtesttransaction.sh)

INCLUDE(CTest)
