Skip to content

Commit

Permalink
CMake: Make building clients, broker and C++ library optional.
Browse files Browse the repository at this point in the history
Issue #1641.
  • Loading branch information
ralight committed Mar 27, 2020
1 parent 7624832 commit f0deb9a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
10 changes: 9 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 4 additions & 1 deletion lib/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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}
Expand Down

0 comments on commit f0deb9a

Please sign in to comment.