Move things that are needed in every test case into a new library,
rather than requiring the Test::Main one (which is not going to be
linked to other test tooling which we'll introduce).
list(APPEND ARG_LIBRARIES
Qt5::Test
Quassel::Common
+ Quassel::Test::Global
Quassel::Test::Main
)
+add_subdirectory(global)
add_subdirectory(main)
--- /dev/null
+quassel_add_module(Test::Global EXPORT NOINSTALL)
+
+target_sources(${TARGET} PRIVATE
+ testglobal.h
+)
+
+target_link_libraries(${TARGET}
+ PUBLIC
+ GTest::GTest
+ Qt5::Core
+ Qt5::Test
+ Quassel::Common
+)
#pragma once
-#include "test-main-export.h"
+#include "test-global-export.h"
#include <gmock/gmock.h>
target_sources(${TARGET} PRIVATE
main.cpp
- testglobal.h
)
target_link_libraries(${TARGET}
PUBLIC
- GTest::GTest
Qt5::Core
- Quassel::Common
+ Quassel::Test::Global
)