# Very important for proper management of import/export symbols in Windows DLL
# This is absolutely required to make sure that the test applications
# are _importing_ symbols defined in the above source code directory (where 
# a definition is added in the CMakeLists.txt so that the symbols are _exported_ during build)
remove_definitions(-DCOMPILE_CAMITK_API)

camitk_application(
        APPLICATION_NAME cpphotplug
        INTERNAL_TEST_APPLICATION
        QTEST
        TEST_RUN_SERIAL  # make sure to run all test one by one as they are very time and resources consuming
        NO_GUI
        SOURCES TestCppHotPlug.cpp
        QRC_SOURCES resources/cpphotplug.qrc
        DESCRIPTION "Provides unit and integration tests for the CppHotPlugActionExtension class"
)

camitk_application(
        APPLICATION_NAME transformationmanager
        INTERNAL_TEST_APPLICATION
        QTEST
        NO_GUI
        SOURCES TestTransformationManager.cpp TestTransformationManager.h
        DESCRIPTION "Provides a command line unit and test tool for TransformationManager"
)

camitk_application(
        APPLICATION_NAME persistence
        INTERNAL_TEST_APPLICATION
        QTEST
        NO_GUI
        SOURCES TestPersistence.cpp TestPersistence.h
        DESCRIPTION "Provides a command line unit and test tool for Persistence"
)

if(PYTHON_BINDING)
    camitk_application(APPLICATION_NAME pythonhotplug
        INTERNAL_TEST_APPLICATION
        QTEST
        TEST_RUN_SERIAL  # make sure to run all test one by one as they are very time and resources consuming
        NO_GUI
        SOURCES TestPythonHotPlug.cpp
        QRC_SOURCES resources/pythonhotplug.qrc
        EXTERNAL_LIBRARIES Python::Python pybind11::pybind11
        DESCRIPTION "Provides unit and integration tests for the PythonHotPlugActionExtension class"
    )

    camitk_application(APPLICATION_NAME pythonscript
        INTERNAL_TEST_APPLICATION
        QTEST
        TEST_RUN_SERIAL  # make sure to run all test one by one as they are very time and resources consuming
        NO_GUI
        SOURCES TestPythonScript.cpp
        QRC_SOURCES resources/pythonscript.qrc
        EXTERNAL_LIBRARIES Python::Python pybind11::pybind11
        DESCRIPTION "Provides unit and integration tests for the PythonManager class using python scripts not extensions"
    )
endif()
