Updating setup.cmake files to use Module hierarchy implicitly

- Added AddModule CMake function which simplifies specifying module requirements
This commit is contained in:
Jacob Alexander 2015-01-25 17:53:48 -08:00
parent c9b1769608
commit 1e9f55a0bf
16 changed files with 125 additions and 349 deletions

View file

@ -1,6 +1,6 @@
###| CMake Kiibohd Controller Scan Module |###
#
# Written by Jacob Alexander in 2013-2014 for the Kiibohd Controller
# Written by Jacob Alexander in 2013-2015 for the Kiibohd Controller
#
# Released into the Public Domain
#
@ -10,21 +10,15 @@
###
# Module C files
#
set( SCAN_SRCS
set ( Module_SRCS
scan_loop.c
)
###
# Module Specific Options
#
###
# Compiler Family Compatibility
#
set( ScanModuleCompatibility
set ( ModuleCompatibility
avr
)

View file

@ -8,27 +8,25 @@
###
# Module C files
# Required Submodules
#
set( SCAN_SRCS
scan_loop.c
../MatrixARM/matrix_scan.c
)
AddModule ( Scan MatrixARM )
###
# Module Specific Options
# Module C files
#
add_definitions(
-I${HEAD_DIR}/Scan/MatrixARM
set ( Module_SRCS
scan_loop.c
)
###
# Compiler Family Compatibility
#
set( ScanModuleCompatibility
set ( ModuleCompatibility
arm
)

View file

@ -1,36 +1,30 @@
###| CMake Kiibohd Controller Scan Module |###
#
# Written by Jacob Alexander in 2014 for the Kiibohd Controller
# Written by Jacob Alexander in 2014-2015 for the Kiibohd Controller
#
# Released into the Public Domain
#
###
###
# Warning, that this module is not meant to be built stand-alone
# Sub-module flag, cannot be included stand-alone
#
message( FATAL_ERROR
"The 'MatrixARM' module is not a stand-alone module, and requires further setup."
)
set ( SubModule 1 )
###
# Module C files
#
set( SCAN_SRCS
set ( Module_SRCS
matrix_scan.c
)
###
# Module Specific Options
#
###
# Compiler Family Compatibility
#
set( ScanModuleCompatibility
set ( ModuleCompatibility
arm
)