From a4b2317950e76af316a87b972ccc5ccdb6cfd84e Mon Sep 17 00:00:00 2001 From: Max Wash Date: Wed, 18 Dec 2024 20:50:54 +0000 Subject: [PATCH] cmake: update FindBluelib --- cmake/FindBluelib.cmake | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/cmake/FindBluelib.cmake b/cmake/FindBluelib.cmake index 95fe532..9994092 100644 --- a/cmake/FindBluelib.cmake +++ b/cmake/FindBluelib.cmake @@ -106,6 +106,10 @@ if (Bluelib_FOUND) INTERFACE_INCLUDE_DIRECTORIES "${Bluelib_${component}_INCLUDE_DIR}") target_compile_definitions(Bluelib::${component} INTERFACE _CRT_SECURE_NO_WARNINGS=1) + if (Bluelib_STATIC) + target_compile_definitions(Bluelib::${component} INTERFACE BLUELIB_STATIC=1) + endif () + set_target_properties(Bluelib::${component} PROPERTIES IMPORTED_LINK_INTERFACE_LANGUAGES "C" IMPORTED_LOCATION "${Bluelib_${component}_LIBRARY}") @@ -119,7 +123,7 @@ if (Bluelib_FOUND) message(FATAL_ERROR "Bluelib: Module 'Object' depends on 'Core', which was not specified in find_package()") endif () - target_link_libraries(Bluelib::Object INTERFACE Bluelib::Core) + #target_link_libraries(Bluelib::Object INTERFACE Bluelib::Core) endif () if ("${component}" STREQUAL "Term") @@ -131,7 +135,7 @@ if (Bluelib_FOUND) message(FATAL_ERROR "Bluelib: Module 'Term' depends on 'Object', which was not specified in find_package()") endif () - target_link_libraries(Bluelib::Term INTERFACE Bluelib::Core Bluelib::Object) + #target_link_libraries(Bluelib::Term INTERFACE Bluelib::Core Bluelib::Object) endif () if ("${component}" STREQUAL "Cmd") @@ -147,7 +151,7 @@ if (Bluelib_FOUND) message(FATAL_ERROR "Bluelib: Module 'Cmd' depends on 'Term', which was not specified in find_package()") endif () - target_link_libraries(Bluelib::Cmd INTERFACE Bluelib::Core Bluelib::Object Bluelib::Term) + #target_link_libraries(Bluelib::Cmd INTERFACE Bluelib::Core Bluelib::Object Bluelib::Term) endif () endforeach (component) endif()