From 220267638f916630c2b6ecb6db9f9962c4107bbc Mon Sep 17 00:00:00 2001 From: Marco Bubke Date: Tue, 21 Jun 2022 13:26:11 +0200 Subject: [PATCH] UnitTests: Use Sqlite library Because the unit tests are not self contained anymore we can use the Sqlite library from the creator build. Change-Id: I89dde09e6fcfb8dda002b6e2bf11528a0933cde7 Reviewed-by: Tim Jenssen --- tests/unit/unittest/CMakeLists.txt | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/tests/unit/unittest/CMakeLists.txt b/tests/unit/unittest/CMakeLists.txt index c0a7ca37a6b..d10c7513344 100644 --- a/tests/unit/unittest/CMakeLists.txt +++ b/tests/unit/unittest/CMakeLists.txt @@ -24,7 +24,7 @@ add_qtc_test(unittest GTEST DEPENDS Qt5::Core Qt5::Network Qt5::Widgets Qt5::Xml Qt5::Concurrent Qt5::Qml Qt5::Gui - Qt6Core5Compat QmlJS + Qt6Core5Compat QmlJS Sqlite Googletest CONDITION Qt5_VERSION VERSION_GREATER_EQUAL 6.2.0 DEFINES @@ -122,19 +122,6 @@ function(extend_qtc_test_with_target_sources target) ) endfunction() -if (NOT TARGET Sqlite) - add_subdirectory(../../../src/libs/sqlite ${CMAKE_CURRENT_BINARY_DIR}/sqlite) -endif() -extend_qtc_test_with_target_sources(Sqlite - DEFINES SQLITE_CUSTOM_INCLUDE=config.h SQLITE_STATIC_LIBRARY -) - -if (APPLE) - extend_qtc_test(unittest DEFINES _BSD_SOURCE) -elseif (UNIX) - extend_qtc_test(unittest DEFINES _POSIX_C_SOURCE=200809L _GNU_SOURCE _DEFAULT_SOURCE) -endif() - # Do not work on the source directory data add_custom_command(TARGET unittest POST_BUILD COMMAND "${CMAKE_COMMAND}" -E copy_directory