mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-25 18:14:53 +00:00
Cleanups in CMake build files
This commit is contained in:
parent
b60df2df20
commit
4355a23ad2
@ -38,7 +38,7 @@ PROJECT_NAME = "lwIP"
|
|||||||
# could be handy for archiving the generated documentation or if some version
|
# could be handy for archiving the generated documentation or if some version
|
||||||
# control system is used.
|
# control system is used.
|
||||||
|
|
||||||
PROJECT_NUMBER = "${LWIP_VERSION_STRING_SHORT}"
|
PROJECT_NUMBER = "${LWIP_VERSION_STRING}"
|
||||||
|
|
||||||
# Using the PROJECT_BRIEF tag one can provide an optional one line description
|
# Using the PROJECT_BRIEF tag one can provide an optional one line description
|
||||||
# for a project that appears at the top of each page and should give viewer a
|
# for a project that appears at the top of each page and should give viewer a
|
||||||
|
@ -5,15 +5,9 @@ set(LWIP_VERSION_REVISION "3")
|
|||||||
# LWIP_VERSION_RC is set to LWIP_RC_DEVELOPMENT for Git versions */
|
# LWIP_VERSION_RC is set to LWIP_RC_DEVELOPMENT for Git versions */
|
||||||
set(LWIP_VERSION_RC "LWIP_RC_DEVELOPMENT")
|
set(LWIP_VERSION_RC "LWIP_RC_DEVELOPMENT")
|
||||||
|
|
||||||
set(LWIP_VERSION_STRING_SHORT
|
set(LWIP_VERSION_STRING
|
||||||
"${LWIP_VERSION_MAJOR}.${LWIP_VERSION_MINOR}.${LWIP_VERSION_REVISION}"
|
"${LWIP_VERSION_MAJOR}.${LWIP_VERSION_MINOR}.${LWIP_VERSION_REVISION}"
|
||||||
)
|
)
|
||||||
set(LWIP_VERSION_STRING
|
|
||||||
"${LWIP_VERSION_MAJOR}.${LWIP_VERSION_MINOR}.${LWIP_VERSION_REVISION}.${LWIP_VERSION_RC}"
|
|
||||||
)
|
|
||||||
|
|
||||||
configure_file(include/lwip/init.h.cmake.in
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/include/lwip/init.h)
|
|
||||||
|
|
||||||
# The minimum set of files needed for lwIP.
|
# The minimum set of files needed for lwIP.
|
||||||
set(lwipcore_SRCS
|
set(lwipcore_SRCS
|
||||||
@ -233,11 +227,10 @@ option(BUILD_DOCUMENTATION "Build documentation" OFF)
|
|||||||
if(BUILD_DOCUMENTATION)
|
if(BUILD_DOCUMENTATION)
|
||||||
find_package(Doxygen)
|
find_package(Doxygen)
|
||||||
if (DOXYGEN_FOUND)
|
if (DOXYGEN_FOUND)
|
||||||
# set input and output files
|
|
||||||
set(DOXYGEN_IN ../doc/doxygen/lwip.Doxyfile.cmake.in)
|
set(DOXYGEN_IN ../doc/doxygen/lwip.Doxyfile.cmake.in)
|
||||||
set(DOXYGEN_OUT ${CMAKE_CURRENT_SOURCE_DIR}/../doc/doxygen/lwip.Doxyfile)
|
set(DOXYGEN_OUT ${CMAKE_CURRENT_SOURCE_DIR}/../doc/doxygen/lwip.Doxyfile)
|
||||||
|
|
||||||
# request to configure the file
|
# configure the file (version info)
|
||||||
configure_file(${DOXYGEN_IN} ${DOXYGEN_OUT})
|
configure_file(${DOXYGEN_IN} ${DOXYGEN_OUT})
|
||||||
message("Doxygen build started")
|
message("Doxygen build started")
|
||||||
|
|
||||||
@ -250,35 +243,58 @@ if(BUILD_DOCUMENTATION)
|
|||||||
else (DOXYGEN_FOUND)
|
else (DOXYGEN_FOUND)
|
||||||
message("Doxygen need to be installed to generate the doxygen documentation")
|
message("Doxygen need to be installed to generate the doxygen documentation")
|
||||||
endif (DOXYGEN_FOUND)
|
endif (DOXYGEN_FOUND)
|
||||||
endif()
|
endif(BUILD_DOCUMENTATION)
|
||||||
|
|
||||||
# Generate Filelists.mk via cmake
|
option(CONFIGURE_FILES "Generate files configured by CMAKE (usually done by lwIP developers)" OFF)
|
||||||
function(lwip_gen_filelist_entries var_name filelist_var_name)
|
if(CONFIGURE_FILES)
|
||||||
foreach(srcfile ${${filelist_var_name}})
|
# Generate Filelists.mk via cmake
|
||||||
set(tmp "${tmp}$(LWIPDIR)/${srcfile} ")
|
function(lwip_gen_filelist_entries var_name filelist_var_name)
|
||||||
endforeach()
|
foreach(srcfile ${${filelist_var_name}})
|
||||||
set(${var_name} "${tmp}" PARENT_SCOPE)
|
set(tmp "${tmp}$(LWIPDIR)/${srcfile} ")
|
||||||
endfunction(lwip_gen_filelist_entries)
|
endforeach()
|
||||||
|
set(${var_name} "${tmp}" PARENT_SCOPE)
|
||||||
|
endfunction(lwip_gen_filelist_entries)
|
||||||
|
|
||||||
|
lwip_gen_filelist_entries("filelist_mk_COREFILES" "lwipcore_SRCS")
|
||||||
|
lwip_gen_filelist_entries("filelist_mk_CORE4FILES" "lwipcore4_SRCS")
|
||||||
|
lwip_gen_filelist_entries("filelist_mk_CORE6FILES" "lwipcore6_SRCS")
|
||||||
|
lwip_gen_filelist_entries("filelist_mk_APIFILES" "lwipapi_SRCS")
|
||||||
|
lwip_gen_filelist_entries("filelist_mk_NETIFFILES" "lwipnetif_SRCS")
|
||||||
|
lwip_gen_filelist_entries("filelist_mk_SIXLOWPANFILES" "lwipsixlowpan_SRCS")
|
||||||
|
lwip_gen_filelist_entries("filelist_mk_PPPFILES" "lwipppp_SRCS")
|
||||||
|
|
||||||
|
lwip_gen_filelist_entries("filelist_mk_SNMPFILES" "lwipsnmp_SRCS")
|
||||||
|
lwip_gen_filelist_entries("filelist_mk_HTTPFILES" "lwiphttp_SRCS")
|
||||||
|
lwip_gen_filelist_entries("filelist_mk_MKFSDATAFILES" "lwipmakefsdata_SRCS")
|
||||||
|
lwip_gen_filelist_entries("filelist_mk_IPERFFILES" "lwipiperf_SRCS")
|
||||||
|
lwip_gen_filelist_entries("filelist_mk_SMTPFILES" "lwipsmtp_SRCS")
|
||||||
|
lwip_gen_filelist_entries("filelist_mk_SNTPFILES" "lwipsntp_SRCS")
|
||||||
|
lwip_gen_filelist_entries("filelist_mk_MDNSFILES" "lwipmdns_SRCS")
|
||||||
|
lwip_gen_filelist_entries("filelist_mk_NETBIOSFILES" "lwipnetbios_SRCS")
|
||||||
|
lwip_gen_filelist_entries("filelist_mk_TFTPFILES" "lwiptftp_SRCS")
|
||||||
|
lwip_gen_filelist_entries("filelist_mk_MQTTFILES" "lwipmqtt_SRCS")
|
||||||
|
lwip_gen_filelist_entries("filelist_mk_MBEDTLSFILES" "lwipmbedtls_SRCS")
|
||||||
|
|
||||||
|
configure_file(Filelists.mk.cmake.in
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/Filelists.mk)
|
||||||
|
|
||||||
|
# Generate lwip/init.h (version info)
|
||||||
|
configure_file(include/lwip/init.h.cmake.in
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/include/lwip/init.h)
|
||||||
|
endif(CONFIGURE_FILES)
|
||||||
|
|
||||||
lwip_gen_filelist_entries("filelist_mk_COREFILES" "lwipcore_SRCS")
|
#add_library(lwip ${lwipnoapps_SRCS} ${lwipallapps_SRCS})
|
||||||
lwip_gen_filelist_entries("filelist_mk_CORE4FILES" "lwipcore4_SRCS")
|
#target_include_directories(lwip PUBLIC
|
||||||
lwip_gen_filelist_entries("filelist_mk_CORE6FILES" "lwipcore6_SRCS")
|
# "include/"
|
||||||
lwip_gen_filelist_entries("filelist_mk_APIFILES" "lwipapi_SRCS")
|
# "${CMAKE_CURRENT_SOURCE_DIR}/../../lwip-contrib"
|
||||||
lwip_gen_filelist_entries("filelist_mk_NETIFFILES" "lwipnetif_SRCS")
|
# "${CMAKE_CURRENT_SOURCE_DIR}/../../lwip-contrib/ports/unix/port/include"
|
||||||
lwip_gen_filelist_entries("filelist_mk_SIXLOWPANFILES" "lwipsixlowpan_SRCS")
|
# "${CMAKE_CURRENT_SOURCE_DIR}/../../lwip-contrib/ports/unix/unixsim"
|
||||||
lwip_gen_filelist_entries("filelist_mk_PPPFILES" "lwipppp_SRCS")
|
#)
|
||||||
|
|
||||||
lwip_gen_filelist_entries("filelist_mk_SNMPFILES" "lwipsnmp_SRCS")
|
#add_executable(makefsdata ${lwipmakefsdata_SRCS})
|
||||||
lwip_gen_filelist_entries("filelist_mk_HTTPFILES" "lwiphttp_SRCS")
|
#target_include_directories(makefsdata PUBLIC
|
||||||
lwip_gen_filelist_entries("filelist_mk_MKFSDATAFILES" "lwipmakefsdata_SRCS")
|
# "include/"
|
||||||
lwip_gen_filelist_entries("filelist_mk_IPERFFILES" "lwipiperf_SRCS")
|
# "${CMAKE_CURRENT_SOURCE_DIR}/../../lwip-contrib"
|
||||||
lwip_gen_filelist_entries("filelist_mk_SMTPFILES" "lwipsmtp_SRCS")
|
# "${CMAKE_CURRENT_SOURCE_DIR}/../../lwip-contrib/ports/unix/port/include"
|
||||||
lwip_gen_filelist_entries("filelist_mk_SNTPFILES" "lwipsntp_SRCS")
|
# "${CMAKE_CURRENT_SOURCE_DIR}/../../lwip-contrib/ports/unix/unixsim"
|
||||||
lwip_gen_filelist_entries("filelist_mk_MDNSFILES" "lwipmdns_SRCS")
|
#)
|
||||||
lwip_gen_filelist_entries("filelist_mk_NETBIOSFILES" "lwipnetbios_SRCS")
|
|
||||||
lwip_gen_filelist_entries("filelist_mk_TFTPFILES" "lwiptftp_SRCS")
|
|
||||||
lwip_gen_filelist_entries("filelist_mk_MQTTFILES" "lwipmqtt_SRCS")
|
|
||||||
lwip_gen_filelist_entries("filelist_mk_MBEDTLSFILES" "lwipmbedtls_SRCS")
|
|
||||||
|
|
||||||
configure_file(Filelists.mk.cmake.in
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/Filelists.mk)
|
|
||||||
|
Loading…
Reference in New Issue
Block a user