diff mbox series

kernel-shark: Use cmake imported targets instead of variables

Message ID 20220112153805.222437-1-tz.stoyanov@gmail.com (mailing list archive)
State Superseded
Headers show
Series kernel-shark: Use cmake imported targets instead of variables | expand

Commit Message

Tzvetomir Stoyanov (VMware) Jan. 12, 2022, 3:38 p.m. UTC
Using cmake imported targets instead of package variables is
recommended way to define package dependencies.

Signed-off-by: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>
---
 src/CMakeLists.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Yordan Karadzhov Jan. 13, 2022, 10:59 a.m. UTC | #1
On 12.01.22 г. 17:38 ч., Tzvetomir Stoyanov (VMware) wrote:
> Using cmake imported targets instead of package variables is
> recommended way to define package dependencies.
> 

Hi Ceco,

Please add to the commit message an explanation, clarifying that this patch actually fixes a build failure.
You may take as example the message of the patch sent by Michal
https://lore.kernel.org/all/20220113004559.1624414-1-michal.sojka@cvut.cz/

Michal and Ceco,
I will be happy to see this patch signed by both of you.

thanks,
Yordan

> Signed-off-by: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>
> ---
>   src/CMakeLists.txt | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
> index babb9c1..9e0b4ae 100644
> --- a/src/CMakeLists.txt
> +++ b/src/CMakeLists.txt
> @@ -59,8 +59,8 @@ if (OPENGL_FOUND)
>                                        KsPlugins.cpp)
>   
>       target_link_libraries(kshark-plot  kshark
> -                                       ${GLUT_LIBRARY}
> -                                       ${OPENGL_LIBRARIES})
> +                                       GLUT::GLUT
> +                                       OpenGL::GLU)
>   
>       set_target_properties(kshark-plot PROPERTIES  SUFFIX ".so.${KS_VERSION_STRING}")
>       install(TARGETS kshark-plot
>
diff mbox series

Patch

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index babb9c1..9e0b4ae 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -59,8 +59,8 @@  if (OPENGL_FOUND)
                                      KsPlugins.cpp)
 
     target_link_libraries(kshark-plot  kshark
-                                       ${GLUT_LIBRARY}
-                                       ${OPENGL_LIBRARIES})
+                                       GLUT::GLUT
+                                       OpenGL::GLU)
 
     set_target_properties(kshark-plot PROPERTIES  SUFFIX ".so.${KS_VERSION_STRING}")
     install(TARGETS kshark-plot