cmake: create dist target if not exists

This commit is contained in:
scribam 2024-07-08 21:25:04 +02:00
parent 73fcf72792
commit 73746d52c7

View File

@ -29,7 +29,9 @@ include(CPack)
# Generate docs before creating source package
include(src/Filelists.cmake)
add_custom_target(dist COMMAND ${CMAKE_MAKE_PROGRAM} package_source)
if (TARGET lwipdocs)
if (NOT TARGET dist)
add_custom_target(dist COMMAND ${CMAKE_MAKE_PROGRAM} package_source)
if (TARGET lwipdocs)
add_dependencies(dist lwipdocs)
endif()
endif()