diff --git a/CMakeLists.txt b/CMakeLists.txt index 49a7e8a9..749e2d28 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -100,9 +100,17 @@ endif (WITH_DLT) # Include projects # ======================================== +option(WITH_CLIENTS "Build clients?" ON) +option(WITH_BROKER "Build broker?" ON) + add_subdirectory(lib) -add_subdirectory(client) +if (WITH_CLIENTS) + add_subdirectory(client) +endif (WITH_CLIENTS) +if (WITH_BROKER) add_subdirectory(src) +endif (WITH_BROKER) + if (DOCUMENTATION) add_subdirectory(man) endif (DOCUMENTATION) diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index f81dce7c..e0ce56b3 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -1,4 +1,7 @@ -add_subdirectory(cpp) +option(WITH_LIB_CPP "Build C++ library?" ON) +if (WITH_LIB_CPP) + add_subdirectory(cpp) +endif (WITH_LIB_CPP) include_directories(${mosquitto_SOURCE_DIR} ${mosquitto_SOURCE_DIR}/lib ${STDBOOL_H_PATH} ${STDINT_H_PATH}