From 1c83f818853cd260006def9e163d5b7627eb92b0 Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Fri, 9 Jun 2023 11:45:08 +0200 Subject: build: build examples and install their sources --- source/examples/CMakeLists.txt | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/source/examples/CMakeLists.txt b/source/examples/CMakeLists.txt index 5b6ddd8..45d1638 100644 --- a/source/examples/CMakeLists.txt +++ b/source/examples/CMakeLists.txt @@ -1,10 +1,12 @@ -if(BUILD_EXAMPLES) - function(add_example NAME) - add_executable("ex_${NAME}" "src/${NAME}.cpp") - target_link_libraries("ex_${NAME}" "${PROJECT_NAME}") - endfunction() +function(add_example NAME) + add_executable("ex_${NAME}" "src/${NAME}.cpp") + target_link_libraries("ex_${NAME}" "${PROJECT_NAME}") +endfunction() - add_example("basic_usage") - add_example("basic_usage_with_show") - add_example("basic_usage_with_read") -endif() +add_example("basic_usage") +add_example("basic_usage_with_show") +add_example("basic_usage_with_read") + +install(DIRECTORY "src/" + TYPE DOC +) -- cgit v1.2.3