From 73746d52c782b2deab702567eeae933a90a6b2a7 Mon Sep 17 00:00:00 2001 From: scribam Date: Mon, 8 Jul 2024 21:25:04 +0200 Subject: [PATCH] cmake: create dist target if not exists --- CMakeLists.txt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 55fc44a13..7ff514737 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) - add_dependencies(dist lwipdocs) +if (NOT TARGET dist) + add_custom_target(dist COMMAND ${CMAKE_MAKE_PROGRAM} package_source) + if (TARGET lwipdocs) + add_dependencies(dist lwipdocs) + endif() endif()