cmake: Change all usage of target_link_libraries to keyword signature
Compare changes
+ 3
− 3
@@ -51,7 +51,7 @@ function(add_ov_library OV_LIBRARY_NAME)
@@ -107,7 +107,7 @@ endfunction()
@@ -118,7 +118,7 @@ endfunction()
Der Projekt-Lifecycle auf git.rwth-aachen.de (Siehe: https://help.itc.rwth-aachen.de/service/ubrf9cmzd17m/article/1a0cfe327ffd46d7a62ab48df29c5b72/) wurde repariert und arbeitet derzeit ausstehende Projekte ab. Daher kommt es zu erhöhtem Mail-Aufkommen bei Projekten mit längerer Inaktivität.
--
The project lifecycle on git.rwth-aachen.de (see: https://help.itc.rwth-aachen.de/service/ubrf9cmzd17m/article/1a0cfe327ffd46d7a62ab48df29c5b72/) has been repaired and is currently processing pending projects. As a result, there is an increased volume of mail for projects with longer periods of inactivity.
This change allows to use target_link_libraries(<target> PRIVATE <lib>)
to specify (linker) library dependencies that are not propagated to
dependant build targets.
This is a breaking change! You MUST change all usages of target_link_libraries in your project's CMake scripts to use the keyword signature, since CMake only allows only one signature per project. I.e.
target_link_libraries(<target> <lib1> <lib2>)
must be changed to
target_link_librares(<target> PUBLIC <lib1> <lib2>)
You may consider using PRIVATE
instead of PUBLIC
to restrain the
linker (and compiler) flags of the libraries <lib1>
, <lib2>
to the build
of <target>
, instead of propageting it to other targets, depending
on <target>
. This is typically appropriate, until you use
definitions or symbols of <lib1>
, <lib2>
in <target>
's public header files.