Skip to content

Commit

Permalink
chore: Enable building only plugins without external dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
pbosetti committed Jun 21, 2024
1 parent 3588d54 commit c8258e6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/cmake-multi-platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ jobs:
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-DMADS_NO_DEPS_ONLY=ON
-S ${{ github.workspace }}
- name: Build
Expand Down
7 changes: 6 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ cmake_minimum_required(VERSION 3.20)
project(plugin VERSION 0.1.0 LANGUAGES CXX)
set(CMAKE_BUILD_TYPE Debug CACHE STRING "Choose the type of build." FORCE)

option(MADS_NO_DEPS_ONLY "Build only plugins without external dependencies" OFF)

# PROJECT SETTINGS #############################################################
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
Expand Down Expand Up @@ -118,10 +120,13 @@ add_plugin(echoj)
add_plugin(clock)
add_plugin(to_console)
add_plugin(random)
add_plugin(mqtt LIBS mosquittopp)
add_plugin(serial_reader SRCS ${SRC_DIR}/serialport.cpp)
add_plugin(running_avg)

if(NOT MADS_NO_DEPS_ONLY)
add_plugin(mqtt LIBS mosquittopp)
endif()

if (APPLE)
add_plugin(restway LIBS restclient-cpp)
endif()
Expand Down

0 comments on commit c8258e6

Please sign in to comment.