cmake: add compress module to FindBluelib

This commit is contained in:
2025-07-28 22:29:13 +01:00
parent 3e41f51ccf
commit 56d300f2cf

View File

@@ -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()