From 3a482d539c99227db766a86bc2d2809aaa679109 Mon Sep 17 00:00:00 2001 From: Max Wash Date: Wed, 6 Aug 2025 22:14:54 +0100 Subject: [PATCH] cmake: update FindBluelib to support compress module --- cmake/FindBluelib.cmake | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/cmake/FindBluelib.cmake b/cmake/FindBluelib.cmake index 7e7e3f5..27c75ee 100644 --- a/cmake/FindBluelib.cmake +++ b/cmake/FindBluelib.cmake @@ -49,7 +49,7 @@ if (Bluelib_STATIC) set(_lib_suffix "-s") endif () -set(supported_components Core Object Term Cmd Io Serial) +set(supported_components Core Object Term Cmd Io Serial Compress) set(components ${Bluelib_FIND_COMPONENTS}) string(REPLACE ";" ", " supported_components_string_list "${supported_components}") @@ -177,5 +177,13 @@ if (Bluelib_FOUND) target_link_libraries(Bluelib::Io INTERFACE Bluelib::Core Bluelib::Object) endif () + + if ("${component}" STREQUAL "Compress") + if (NOT TARGET Bluelib::Core) + message(FATAL_ERROR "Bluelib: Module 'Compress' depends on 'Core', which was not specified in find_package()") + endif () + + target_link_libraries(Bluelib::Compress INTERFACE Bluelib::Core Bluelib::Object) + endif () endforeach (component) endif()