From fdefabc26a167d14f6cb2649f0b2bf72b81e5f11 Mon Sep 17 00:00:00 2001 From: Joscha Schmiedt <joscha@schmiedt.dev> Date: Tue, 15 Oct 2024 20:11:46 +0200 Subject: [PATCH] Fix missing link libraries from test_package On Windows, the static library for the protobuf component has to be explicitly linked in the test_package. This addresse issue #103 --- test_package/CMakeLists.txt | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/test_package/CMakeLists.txt b/test_package/CMakeLists.txt index 371a0b9..a11332c 100644 --- a/test_package/CMakeLists.txt +++ b/test_package/CMakeLists.txt @@ -13,8 +13,9 @@ set(test_cases ################################################### -find_package(linkahead REQUIRED) -find_package(GTest REQUIRED) +find_package(linkahead CONFIG REQUIRED) +find_package(GTest CONFIG REQUIRED) +find_package(Protobuf CONFIG REQUIRED) # supress warnings during build of gtest cmake_policy(SET CMP0054 NEW) @@ -25,7 +26,10 @@ include(GoogleTest REQUIRED) # loop over all test cases and add them to the test runner add_executable(test_info test_info.cpp) -target_link_libraries(test_info PRIVATE GTest::gtest GTest::gtest_main linkahead::linkahead) +target_link_libraries(test_info PRIVATE + GTest::gtest GTest::gtest_main + linkahead::linkahead caosdb_grpc clinkahead + protobuf::protobuf) gtest_discover_tests(test_info) # foreach(test_case ${test_cases}) -- GitLab