Make list of supported internal module configurable per cmake option

Resolves #1159
This commit is contained in:
Raphael Coeffic
2021-11-29 09:00:59 +10:00
committed by Peter Feerick
parent eabb20a9ad
commit b8335b994f
4 changed files with 7 additions and 5 deletions
+3 -1
View File
@@ -30,8 +30,10 @@ set_property(CACHE DEFAULT_INTERNAL_MODULE PROPERTY STRINGS ${INTERNAL_MODULES})
# define variables for internal modules
foreach(module ${INTERNAL_MODULES})
message("-- Adding support for ${module} as internal module")
set(INTERNAL_MODULE_${module} ON CACHE BOOL "Support for ${module} internal module")
if (INTERNAL_MODULE_${module})
message("-- Adding support for ${module} as internal module")
endif()
endforeach()
if(INTERNAL_MODULE_PXX1)
+1 -1
View File
@@ -49,7 +49,7 @@ endif()
add_definitions(-DPCBFRSKY)
# defines existing internal modules
set(INTERNAL_MODULES PXX1 PXX2 MULTI CRSF)
set(INTERNAL_MODULES PXX1;PXX2;MULTI;CRSF CACHE STRING "Internal modules")
# VCP CLI
set(ENABLE_SERIAL_PASSTHROUGH ON CACHE BOOL "Enable serial passthrough")
+1 -1
View File
@@ -50,7 +50,7 @@ add_definitions(-DBATTERY_CHARGE) # -DSOFTWARE_VOLUME
add_definitions(-DINTERNAL_MODULE_AFHDS2A)
# defines existing internal modules
set(INTERNAL_MODULES AFHDS2A)
set(INTERNAL_MODULES AFHDS2A CACHE STRING "Internal modules")
set(DEFAULT_INTERNAL_MODULE FLYSKY CACHE STRING "Default internal module")
set(TARGET_SRC
+2 -2
View File
@@ -357,10 +357,10 @@ if(INTERNAL_MODULE_SERIAL)
if("${PCBREV}" STREQUAL 2019 OR "${PCBREV}" STREQUAL ACCESS)
# defines existing internal modules
set(INTERNAL_MODULES PXX2)
set(INTERNAL_MODULES PXX2 CACHE STRING "Internal modules")
else()
# defines existing internal modules
set(INTERNAL_MODULES PXX1 PXX2 MULTI CRSF)
set(INTERNAL_MODULES PXX1;PXX2;MULTI;CRSF CACHE STRING "Internal modules")
endif()
add_definitions(-DINTERNAL_MODULE_SERIAL)