find_package(xgoogletest CONFIG REQUIRED) add_executable(xrabbitmqclient_test test_rabbitmq_client.cpp ) target_link_libraries(xrabbitmqclient_test PRIVATE xrabbitmqclient xgoogletest::xgoogletest ) # Important for MSVC encoding issues if(MSVC) target_compile_options(xrabbitmqclient_test PRIVATE /utf-8) endif() # Register with CTest include(GoogleTest) gtest_discover_tests(xrabbitmqclient_test)