2022-05-31 21:26:41 +00:00
|
|
|
# Base library. Expect most of the module libraries to depend on it
|
|
|
|
#
|
|
|
|
cmake_minimum_required(VERSION 3.21)
|
|
|
|
|
|
|
|
project(TestHelpers
|
|
|
|
VERSION 0.1.0
|
|
|
|
LANGUAGES CXX)
|
|
|
|
|
|
|
|
set(QT_NO_CREATE_VERSIONLESS_FUNCTIONS true)
|
|
|
|
|
|
|
|
find_package(GTest REQUIRED)
|
|
|
|
|
|
|
|
find_package(Qt6 ${STATUS_QT_VERSION} COMPONENTS Quick Qml REQUIRED)
|
|
|
|
qt6_standard_project_setup()
|
|
|
|
|
2022-07-27 08:47:13 +00:00
|
|
|
qt6_add_qml_module(TestHelpers
|
|
|
|
URI Status.TestHelpers
|
2022-05-31 21:26:41 +00:00
|
|
|
VERSION 1.0
|
2022-07-27 08:47:13 +00:00
|
|
|
|
|
|
|
OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Status/TestHelpers
|
2022-05-31 21:26:41 +00:00
|
|
|
)
|
2022-07-27 08:47:13 +00:00
|
|
|
add_library(Status::TestHelpers ALIAS TestHelpers)
|
2022-05-31 21:26:41 +00:00
|
|
|
|
2022-07-27 08:47:13 +00:00
|
|
|
target_include_directories(TestHelpers
|
2022-05-31 21:26:41 +00:00
|
|
|
PUBLIC
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}
|
|
|
|
)
|
|
|
|
|
2022-07-27 08:47:13 +00:00
|
|
|
target_sources(TestHelpers
|
2022-05-31 21:26:41 +00:00
|
|
|
PUBLIC
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/MonitorQtOutput.h
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/IOTestHelpers.h
|
|
|
|
|
|
|
|
PRIVATE
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/MonitorQtOutput.cpp
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/IOTestHelpers.cpp
|
|
|
|
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
|
|
|
)
|
|
|
|
|
2022-07-27 08:47:13 +00:00
|
|
|
target_link_libraries(TestHelpers
|
2022-05-31 21:26:41 +00:00
|
|
|
PUBLIC
|
|
|
|
Qt6::Quick
|
|
|
|
Qt6::Qml
|
|
|
|
|
|
|
|
PRIVATE
|
|
|
|
GTest::gtest_main
|
|
|
|
)
|