Browse Source

Add CMakeLists.txt to generate source distribution file

STABLE-2_1_x
Dirk Ziegelmeier 8 years ago
parent
commit
88ef663334
  1. 1
      .gitignore
  2. 19
      CMakeLists.txt
  3. 2
      doc/doxygen/lwip.Doxyfile.cmake.in
  4. 4
      src/Filelists.cmake

1
.gitignore vendored

@ -16,3 +16,4 @@
/test/fuzz/output /test/fuzz/output
/test/fuzz/lwip_fuzz /test/fuzz/lwip_fuzz
/test/fuzz/.depend /test/fuzz/.depend
/build

19
CMakeLists.txt

@ -0,0 +1,19 @@
cmake_minimum_required(VERSION 3.7)
project(lwIP)
set(LWIP_DIR ${CMAKE_CURRENT_SOURCE_DIR})
include(src/Filelists.cmake)
# Package generation
set(CPACK_SOURCE_GENERATOR "ZIP")
set(CPACK_SOURCE_PACKAGE_DESCRIPTION_SUMMARY "lwIP lightweight IP stack")
set(CPACK_PACKAGE_VERSION_MAJOR "${LWIP_VERSION_MAJOR}")
set(CPACK_PACKAGE_VERSION_MINOR "${LWIP_VERSION_MINOR}")
set(CPACK_PACKAGE_VERSION_PATCH "${LWIP_VERSION_REVISION}")
set(CPACK_SOURCE_IGNORE_FILES "/build/;${CPACK_SOURCE_IGNORE_FILES};.git")
include(CPack)
# Target for package generation
add_custom_target(dist COMMAND ${CMAKE_MAKE_PROGRAM} package_source)
add_dependencies(dist lwipdocs)

2
doc/doxygen/lwip.Doxyfile.cmake.in

@ -58,7 +58,7 @@ PROJECT_LOGO =
# entered, it will be relative to the location where doxygen was started. If # entered, it will be relative to the location where doxygen was started. If
# left blank the current directory will be used. # left blank the current directory will be used.
OUTPUT_DIRECTORY = output OUTPUT_DIRECTORY = "${DOXYGEN_OUTPUT_DIR}"
# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- # If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
# directories (in 2 levels) under the output directory of each output format and # directories (in 2 levels) under the output directory of each output format and

4
src/Filelists.cmake

@ -236,6 +236,8 @@ set(lwipallapps_SRCS
configure_file(${LWIP_DIR}/src/include/lwip/init.h.cmake.in ${LWIP_DIR}/src/include/lwip/init.h) configure_file(${LWIP_DIR}/src/include/lwip/init.h.cmake.in ${LWIP_DIR}/src/include/lwip/init.h)
# Documentation # Documentation
set(DOXYGEN_DIR ${LWIP_DIR}/doc/doxygen)
set(DOXYGEN_OUTPUT_DIR output)
set(DOXYGEN_IN ${LWIP_DIR}/doc/doxygen/lwip.Doxyfile.cmake.in) set(DOXYGEN_IN ${LWIP_DIR}/doc/doxygen/lwip.Doxyfile.cmake.in)
set(DOXYGEN_OUT ${LWIP_DIR}/doc/doxygen/lwip.Doxyfile) set(DOXYGEN_OUT ${LWIP_DIR}/doc/doxygen/lwip.Doxyfile)
configure_file(${DOXYGEN_IN} ${DOXYGEN_OUT}) configure_file(${DOXYGEN_IN} ${DOXYGEN_OUT})
@ -246,7 +248,7 @@ if (DOXYGEN_FOUND)
# note the option ALL which allows to build the docs together with the application # note the option ALL which allows to build the docs together with the application
add_custom_target(lwipdocs EXCLUDE_FROM_ALL add_custom_target(lwipdocs EXCLUDE_FROM_ALL
COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_OUT} COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_OUT}
WORKING_DIRECTORY ${LWIP_DIR}/doc/doxygen WORKING_DIRECTORY ${DOXYGEN_DIR}
COMMENT "Generating API documentation with Doxygen" COMMENT "Generating API documentation with Doxygen"
VERBATIM) VERBATIM)
else (DOXYGEN_FOUND) else (DOXYGEN_FOUND)

Loading…
Cancel
Save