cmake: Rework add_cxx_sample()

* Add mandatory FILE_NAME option
* Add COMPONENT_NAME option
This commit is contained in:
Corentin Le Molgat
2024-01-16 11:27:01 +01:00
parent 6011852ee9
commit 835d93025f
9 changed files with 118 additions and 84 deletions

View File

@@ -18,7 +18,7 @@ endif()
if(BUILD_CXX_SAMPLES)
file(GLOB CXX_SRCS "*.cc")
foreach(SAMPLE IN LISTS CXX_SRCS)
add_cxx_sample(${SAMPLE})
add_cxx_sample(FILE_NAME ${SAMPLE})
endforeach()
endif()