diff --git a/CMakeLists.txt b/CMakeLists.txt index f0b6f39..022b8a0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,12 +8,17 @@ include(projectheader) project_header(osdev_mqtt) add_subdirectory(src) -add_subdirectory(examples/connect) -add_subdirectory(examples/pub) -add_subdirectory(examples/sub) -add_subdirectory(examples/subunsub) -add_subdirectory(test) +if(ENABLE_EXAMPLES) + add_subdirectory(examples/connect) + add_subdirectory(examples/pub) + add_subdirectory(examples/sub) + add_subdirectory(examples/subunsub) +endif() + +if(ENABLE_TESTS) + add_subdirectory(test) +endif() include(packaging) package_component()