Mercurial > louis > kiibohd-controller
diff Lib/CMake/kll.cmake @ 359:b4f66a698f36
Adding preliminary MDErgo keymap
- Required updates to CMake in order to handle the multi-layer BaseMaps
author | Jacob Alexander <haata@kiibohd.com> |
---|---|
date | Thu, 06 Aug 2015 00:36:37 -0700 |
parents | 4bcea20b9cea |
children | 7c6ac7b88cda |
line wrap: on
line diff
--- a/Lib/CMake/kll.cmake Wed Aug 05 10:18:35 2015 -0700 +++ b/Lib/CMake/kll.cmake Thu Aug 06 00:36:37 2015 -0700 @@ -54,15 +54,21 @@ #| If set BaseMap cannot be found, use default map set ( pathname "${PROJECT_SOURCE_DIR}/${ScanModulePath}" ) -if ( NOT EXISTS ${pathname}/${BaseMap}.kll ) - set ( BaseMap_Args ${BaseMap_Args} ${pathname}/defaultMap.kll ) - set ( KLL_DEPENDS ${KLL_DEPENDS} ${pathname}/defaultMap.kll ) -elseif ( EXISTS "${pathname}/${BaseMap}.kll" ) - set ( BaseMap_Args ${BaseMap_Args} ${pathname}/${BaseMap}.kll ) - set ( KLL_DEPENDS ${KLL_DEPENDS} ${pathname}/${BaseMap}.kll ) -else () - message ( FATAL "Could not find '${BaseMap}.kll'" ) -endif () + +string ( REPLACE " " ";" MAP_LIST ${BaseMap} ) # Change spaces to semicolons +foreach ( MAP ${MAP_LIST} ) + # Only check the Scan Module for BaseMap .kll files, default to defaultMap.kll + message("THIS -> ${pathname} ${MAP}") + if ( NOT EXISTS ${pathname}/${MAP}.kll ) + set ( BaseMap_Args ${BaseMap_Args} ${pathname}/defaultMap.kll ) + set ( KLL_DEPENDS ${KLL_DEPENDS} ${pathname}/defaultMap.kll ) + elseif ( EXISTS "${pathname}/${MAP}.kll" ) + set ( BaseMap_Args ${BaseMap_Args} ${pathname}/${MAP}.kll ) + set ( KLL_DEPENDS ${KLL_DEPENDS} ${pathname}/${MAP}.kll ) + else () + message ( FATAL " Could not find '${MAP}.kll' BaseMap in Scan module directory" ) + endif () +endforeach () #| Configure DefaultMap if specified if ( NOT "${DefaultMap}" STREQUAL "" ) @@ -78,7 +84,7 @@ set ( DefaultMap_Args ${DefaultMap_Args} ${PROJECT_SOURCE_DIR}/kll/layouts/${MAP}.kll ) set ( KLL_DEPENDS ${KLL_DEPENDS} ${PROJECT_SOURCE_DIR}/kll/layouts/${MAP}.kll ) else () - message ( FATAL "Could not find '${MAP}.kll'" ) + message ( FATAL " Could not find '${MAP}.kll' DefaultMap" ) endif () endforeach () endif () @@ -100,7 +106,7 @@ set ( PartialMap_Args ${PartialMap_Args} ${PROJECT_SOURCE_DIR}/kll/layouts/${MAP_PART}.kll ) set ( KLL_DEPENDS ${KLL_DEPENDS} ${PROJECT_SOURCE_DIR}/kll/layouts/${MAP_PART}.kll ) else () - message ( FATAL "Could not find '${MAP_PART}.kll'" ) + message ( FATAL " Could not find '${MAP_PART}.kll' PartialMap" ) endif () endforeach () endforeach ()