From 9d34ab4bc43dbb59822a7fd5a47a1a2f00ad3c0a Mon Sep 17 00:00:00 2001 From: jan Iversen Date: Wed, 25 Dec 2019 16:00:54 +0100 Subject: buildsystem: update tests to include more libraries In order to test plannerShared (backend-shared) more libraries are needed. Signed-off-by: Jan Iversen --- tests/CMakeLists.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 51abb12ce..c5c611095 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -39,12 +39,23 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Windows") endif() endif() +# define libraries to use, due to the fact that some library names are different between mobile and desktop +# extra settings are needed +# even though the targets are test executable the overall target is the same +if (SUBSURFACE_TARGET_EXECUTABLE MATCHES "DesktopExecutable") + set(TEST_SPECIFIC_LIBRARIES subsurface_models_desktop) +else() + set(TEST_SPECIFIC_LIBRARIES subsurface_models_mobile ) +endif() + # Helper function TEST used to created rules to build, link, install and run tests function(TEST NAME FILE) get_filename_component(HDR "${FILE}" NAME_WE) add_executable(${NAME} ${FILE} ${HDR}.h) target_link_libraries( ${NAME} + subsurface_backend_shared + ${TEST_SPECIFIC_LIBRARIES} subsurface_corelib RESOURCE_LIBRARY ${QT_TEST_LIBRARIES} -- cgit v1.2.3-70-g09d2