Make list of supported internal module configurable per cmake option
Resolves #1159
This commit is contained in:
committed by
Peter Feerick
parent
eabb20a9ad
commit
b8335b994f
@@ -30,8 +30,10 @@ set_property(CACHE DEFAULT_INTERNAL_MODULE PROPERTY STRINGS ${INTERNAL_MODULES})
|
|||||||
|
|
||||||
# define variables for internal modules
|
# define variables for internal modules
|
||||||
foreach(module ${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")
|
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()
|
endforeach()
|
||||||
|
|
||||||
if(INTERNAL_MODULE_PXX1)
|
if(INTERNAL_MODULE_PXX1)
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ endif()
|
|||||||
add_definitions(-DPCBFRSKY)
|
add_definitions(-DPCBFRSKY)
|
||||||
|
|
||||||
# defines existing internal modules
|
# defines existing internal modules
|
||||||
set(INTERNAL_MODULES PXX1 PXX2 MULTI CRSF)
|
set(INTERNAL_MODULES PXX1;PXX2;MULTI;CRSF CACHE STRING "Internal modules")
|
||||||
|
|
||||||
# VCP CLI
|
# VCP CLI
|
||||||
set(ENABLE_SERIAL_PASSTHROUGH ON CACHE BOOL "Enable serial passthrough")
|
set(ENABLE_SERIAL_PASSTHROUGH ON CACHE BOOL "Enable serial passthrough")
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ add_definitions(-DBATTERY_CHARGE) # -DSOFTWARE_VOLUME
|
|||||||
add_definitions(-DINTERNAL_MODULE_AFHDS2A)
|
add_definitions(-DINTERNAL_MODULE_AFHDS2A)
|
||||||
|
|
||||||
# defines existing internal modules
|
# 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(DEFAULT_INTERNAL_MODULE FLYSKY CACHE STRING "Default internal module")
|
||||||
|
|
||||||
set(TARGET_SRC
|
set(TARGET_SRC
|
||||||
|
|||||||
@@ -357,10 +357,10 @@ if(INTERNAL_MODULE_SERIAL)
|
|||||||
|
|
||||||
if("${PCBREV}" STREQUAL 2019 OR "${PCBREV}" STREQUAL ACCESS)
|
if("${PCBREV}" STREQUAL 2019 OR "${PCBREV}" STREQUAL ACCESS)
|
||||||
# defines existing internal modules
|
# defines existing internal modules
|
||||||
set(INTERNAL_MODULES PXX2)
|
set(INTERNAL_MODULES PXX2 CACHE STRING "Internal modules")
|
||||||
else()
|
else()
|
||||||
# defines existing internal modules
|
# defines existing internal modules
|
||||||
set(INTERNAL_MODULES PXX1 PXX2 MULTI CRSF)
|
set(INTERNAL_MODULES PXX1;PXX2;MULTI;CRSF CACHE STRING "Internal modules")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_definitions(-DINTERNAL_MODULE_SERIAL)
|
add_definitions(-DINTERNAL_MODULE_SERIAL)
|
||||||
|
|||||||
Reference in New Issue
Block a user