diff mbox series

shared library: Link against zlib

Message ID 20210426214456.14669-1-code@reto-schneider.ch
State Changes Requested
Headers show
Series shared library: Link against zlib | expand

Commit Message

Reto Schneider April 26, 2021, 9:44 p.m. UTC
From: Reto Schneider <reto.schneider@husqvarnagroup.com>

Library is using crc32(), therefore needs to link against zlib.

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
---
 src/CMakeLists.txt | 1 +
 1 file changed, 1 insertion(+)

Comments

Stefano Babic April 27, 2021, 9:28 a.m. UTC | #1
Hi Reto,

On 26.04.21 23:44, Reto Schneider wrote:
> From: Reto Schneider <reto.schneider@husqvarnagroup.com>
> 
> Library is using crc32(), therefore needs to link against zlib.
> 
> Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
> ---
>   src/CMakeLists.txt | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
> index a04dd11..bd38366 100644
> --- a/src/CMakeLists.txt
> +++ b/src/CMakeLists.txt
> @@ -19,6 +19,7 @@ ADD_LIBRARY(ubootenv_static STATIC ${libubootenv_SOURCES} ${include_HEADERS})
>   SET_TARGET_PROPERTIES(ubootenv_static PROPERTIES OUTPUT_NAME ubootenv)
>   add_executable(fw_printenv fw_printenv.c)
>   add_executable(fw_setenv fw_setenv.c)
> +target_link_libraries(ubootenv z)
>   target_link_libraries(fw_printenv ubootenv z)

If we force zlib to libubootenv, shouln't we remove it from fw_printenv 
/ fw_setenv ?

>   target_link_libraries(fw_setenv ubootenv z)
>   
> 

Best regards,
Stefano Babic
diff mbox series

Patch

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index a04dd11..bd38366 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -19,6 +19,7 @@  ADD_LIBRARY(ubootenv_static STATIC ${libubootenv_SOURCES} ${include_HEADERS})
 SET_TARGET_PROPERTIES(ubootenv_static PROPERTIES OUTPUT_NAME ubootenv)
 add_executable(fw_printenv fw_printenv.c)
 add_executable(fw_setenv fw_setenv.c)
+target_link_libraries(ubootenv z)
 target_link_libraries(fw_printenv ubootenv z)
 target_link_libraries(fw_setenv ubootenv z)