[PATCH 2/3] Consistent library name used now

Vijay Kumar Banerjee vijay at rtems.org
Sat Apr 24 16:39:49 UTC 2021


On Sat, Apr 24, 2021 at 5:55 AM Robin Mueller <robin.mueller.m at gmail.com> wrote:
>
> Important fix for CMake build system

These are CMake related changes and it looks OK. You could squash this
into the giant CMake patch as well. These mostly name changes, so
it'll stay consistent in the original patch itself.

Thank you for working on this!


> ---
>  CMakeLists.txt                    | 10 +++++-----
>  lwip/src/api/CMakeLists.txt       |  2 +-
>  lwip/src/core/CMakeLists.txt      |  2 +-
>  lwip/src/core/ipv4/CMakeLists.txt |  2 +-
>  lwip/src/core/ipv6/CMakeLists.txt |  2 +-
>  lwip/src/netif/CMakeLists.txt     |  2 +-
>  6 files changed, 10 insertions(+), 10 deletions(-)
>
> diff --git a/CMakeLists.txt b/CMakeLists.txt
> index e1ef8f0..59cc7e9 100644
> --- a/CMakeLists.txt
> +++ b/CMakeLists.txt
> @@ -32,8 +32,8 @@ include("${LWIP_CMAKE_CONFIG_DIR}/PortSelect.cmake")
>
>  rtems_lwip_port_select(${RTEMS_BSP})
>
> -set(LWIP_LIB_NAME lwip)
> -add_library(${LWIP_LIB_NAME})
> +set(LIB_LWIP_NAME lwip)
> +add_library(${LIB_LWIP_NAME})
>
>  add_subdirectory(lwip)
>
> @@ -55,21 +55,21 @@ if(CMAKE_VERBOSE)
>         message(STATUS "lwIP configuration path: ${LWIP_CONFIG_PATH}")
>  endif()
>
> -target_include_directories(${LWIP_LIB_NAME} PRIVATE
> +target_include_directories(${LIB_LWIP_NAME} PRIVATE
>         ${LWIP_CONFIG_PATH_ABS}
>  )
>
>  # Remove unused sections
>  if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
>      if(LWIP_GENERATE_SECTIONS)
> -        target_compile_options(${LWIP_LIB_NAME} PRIVATE
> +        target_compile_options(${LIB_LWIP_NAME} PRIVATE
>              "-ffunction-sections"
>              "-fdata-sections"
>          )
>      endif()
>
>      if(LWIP_REMOVE_UNUSED_CODE)
> -        target_link_options(${LWIP_LIB_NAME} PRIVATE
> +        target_link_options(${LIB_LWIP_NAME} PRIVATE
>              "Wl,--gc-sections"
>          )
>      endif()
> diff --git a/lwip/src/api/CMakeLists.txt b/lwip/src/api/CMakeLists.txt
> index 9b2e34c..7150ade 100644
> --- a/lwip/src/api/CMakeLists.txt
> +++ b/lwip/src/api/CMakeLists.txt
> @@ -1,4 +1,4 @@
> -target_sources(${LWIP_LIB_NAME} PRIVATE
> +target_sources(${LIB_LWIP_NAME} PRIVATE
>         api_lib.c
>         api_msg.c
>         err.c
> diff --git a/lwip/src/core/CMakeLists.txt b/lwip/src/core/CMakeLists.txt
> index 4e879ea..f7f17a7 100644
> --- a/lwip/src/core/CMakeLists.txt
> +++ b/lwip/src/core/CMakeLists.txt
> @@ -1,4 +1,4 @@
> -target_sources(${LWIP_LIB_NAME} PRIVATE
> +target_sources(${LIB_LWIP_NAME} PRIVATE
>         altcp_alloc.c
>         altcp_tcp.c
>         altcp.c
> diff --git a/lwip/src/core/ipv4/CMakeLists.txt b/lwip/src/core/ipv4/CMakeLists.txt
> index e0f9e58..a47fa5d 100644
> --- a/lwip/src/core/ipv4/CMakeLists.txt
> +++ b/lwip/src/core/ipv4/CMakeLists.txt
> @@ -1,4 +1,4 @@
> -target_sources(${LWIP_LIB_NAME} PRIVATE
> +target_sources(${LIB_LWIP_NAME} PRIVATE
>         autoip.c
>         dhcp.c
>         etharp.c
> diff --git a/lwip/src/core/ipv6/CMakeLists.txt b/lwip/src/core/ipv6/CMakeLists.txt
> index fce0b11..391a05b 100644
> --- a/lwip/src/core/ipv6/CMakeLists.txt
> +++ b/lwip/src/core/ipv6/CMakeLists.txt
> @@ -1,4 +1,4 @@
> -target_sources(${LWIP_LIB_NAME} PRIVATE
> +target_sources(${LIB_LWIP_NAME} PRIVATE
>         ethip6.c
>         dhcp6.c
>         icmp6.c
> diff --git a/lwip/src/netif/CMakeLists.txt b/lwip/src/netif/CMakeLists.txt
> index 7c233ae..47f7242 100644
> --- a/lwip/src/netif/CMakeLists.txt
> +++ b/lwip/src/netif/CMakeLists.txt
> @@ -1,4 +1,4 @@
> -target_sources(${LWIP_LIB_NAME} PRIVATE
> +target_sources(${LIB_LWIP_NAME} PRIVATE
>         bridgeif_fdb.c
>         bridgeif.c
>         ethernet.c
> --
> 2.25.1
>
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel


More information about the devel mailing list