From 18888cd0dde3a08565e22fb20a839daca8a9ea49 Mon Sep 17 00:00:00 2001 From: Jon Shallow Date: Mon, 20 Dec 2021 12:24:00 +0000 Subject: [PATCH] cmake: Install example programs if examples enabled --- CMakeLists.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index dfb3fac8..b247c8c0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -699,3 +699,15 @@ install( COMPONENT dev FILES_MATCHING PATTERN "*.h") +if(ENABLE_EXAMPLES) + install( + TARGETS coap-server coap-client coap-rd + DESTINATION ${CMAKE_INSTALL_BINDIR} + COMPONENT dev) + if(NOT WIN32) + install( + TARGETS etsi_iot_01 tiny + DESTINATION ${CMAKE_INSTALL_BINDIR} + COMPONENT dev) + endif() +endif()