#***************************************************************************
#*   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 SKGBASEGUITEST ::..")

PROJECT(SKBBASEMODELERTEST)

ADD_DEFINITIONS(-DQT_GUI_LIB)
LINK_DIRECTORIES (${LIBRARY_OUTPUT_PATH})

INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR}/tests/skgbasemodelertest )

#Make executables
ADD_EXECUTABLE(skgtestcombobox skgtestcombobox.cpp)
ADD_EXECUTABLE(skgtesttablewithgraph skgtesttablewithgraph.cpp)
ADD_EXECUTABLE(skgtestcolorbutton skgtestcolorbutton.cpp)
ADD_EXECUTABLE(skgtestcalculatoredit skgtestcalculatoredit.cpp)
ADD_EXECUTABLE(skgtestdateedit skgtestdateedit.cpp)
ADD_EXECUTABLE(skgtestperiodedit skgtestperiodedit.cpp)
ADD_EXECUTABLE(skgtestwidgetcollection skgtestwidgetcollection.cpp)

TARGET_LINK_LIBRARIES(skgtestcombobox  Qt5::Gui Qt5::Core Qt5::Test skgbasegui)
TARGET_LINK_LIBRARIES(skgtesttablewithgraph  Qt5::Gui Qt5::Core Qt5::Test skgbasegui skgbasemodeler)
TARGET_LINK_LIBRARIES(skgtestcolorbutton  Qt5::Gui Qt5::Core Qt5::Test skgbasegui)
TARGET_LINK_LIBRARIES(skgtestcalculatoredit  Qt5::Gui Qt5::Core Qt5::Test skgbasegui)
TARGET_LINK_LIBRARIES(skgtestdateedit  Qt5::Gui Qt5::Core Qt5::Test skgbasegui)
TARGET_LINK_LIBRARIES(skgtestperiodedit Qt5::Gui Qt5::Core Qt5::Test skgbasegui)
TARGET_LINK_LIBRARIES(skgtestwidgetcollection  Qt5::Gui Qt5::Core Qt5::Test skgbasemodeler skgbasegui skgbaseguidesigner)


#Add test
ENABLE_TESTING()
ADD_TEST(skgtestcombobox ${CMAKE_SOURCE_DIR}/tests/scripts/skgtestcombobox.sh)
ADD_TEST(skgtesttablewithgraph ${CMAKE_SOURCE_DIR}/tests/scripts/skgtesttablewithgraph.sh)
ADD_TEST(skgtestcolorbutton ${CMAKE_SOURCE_DIR}/tests/scripts/skgtestcolorbutton.sh)
ADD_TEST(skgtestcalculatoredit ${CMAKE_SOURCE_DIR}/tests/scripts/skgtestcalculatoredit.sh)
ADD_TEST(skgtestperiodedit ${CMAKE_SOURCE_DIR}/tests/scripts/skgtestperiodedit.sh)
ADD_TEST(skgtestdateedit ${CMAKE_SOURCE_DIR}/tests/scripts/skgtestdateedit.sh)
ADD_TEST(skgtestwidgetcollection ${CMAKE_SOURCE_DIR}/tests/scripts/skgtestwidgetcollection.sh)

INCLUDE(CTest)
