[cmake] fix OBJECT library link deps

Follow up to #8801, OBJECT libraries need to link dependencies with
PUBLIC so that the library using the OBJECT libraries can link against
these too
This commit is contained in:
akallabeth 2023-03-16 09:14:11 +01:00 committed by Martin Fleisz
parent 3cc12d5886
commit e28760f91e

View File

@ -177,7 +177,7 @@ macro(add_channel_client_library _module_prefix _module_name _channel_name _dyna
set_property(TARGET ${_module_name} PROPERTY FOLDER "Channels/${CHANNEL_NAME}/Client")
if (${_module_prefix}_LIBS)
target_link_libraries(${_module_name} PRIVATE ${${_module_prefix}_LIBS})
target_link_libraries(${_module_name} PUBLIC ${${_module_prefix}_LIBS})
endif()
endmacro(add_channel_client_library)
@ -195,7 +195,7 @@ macro(add_channel_client_subsystem_library _module_prefix _module_name _channel_
set_property(TARGET ${_module_name} PROPERTY FOLDER "Channels/${_channel_name}/Client/Subsystem/${CHANNEL_SUBSYSTEM}")
if (${_module_prefix}_LIBS)
target_link_libraries(${_module_name} PRIVATE ${${_module_prefix}_LIBS})
target_link_libraries(${_module_name} PUBLIC ${${_module_prefix}_LIBS})
endif()
endmacro(add_channel_client_subsystem_library)
@ -214,7 +214,7 @@ macro(add_channel_server_library _module_prefix _module_name _channel_name _dyna
set_property(TARGET ${_module_name} PROPERTY FOLDER "Channels/${CHANNEL_NAME}/Server")
if (${_module_prefix}_LIBS)
target_link_libraries(${_module_name} PRIVATE ${${_module_prefix}_LIBS})
target_link_libraries(${_module_name} PUBLIC ${${_module_prefix}_LIBS})
endif()
endmacro(add_channel_server_library)