cmake: don't link bluelib modules to their dependencies

this fixes duplicate library warnings given by ld, but still ensures that the user lists all dependent bluelib modules in their CMakeFiles.txt
This commit is contained in:
2024-11-23 10:14:05 +00:00
parent 6f06f42953
commit 8219797cbb

View File

@@ -123,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")
@@ -135,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")
@@ -151,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()