Archived
1
0

Adding .kll file existence checks to CMake

This commit is contained in:
Jacob Alexander 2015-05-09 20:36:37 +00:00
parent af4078ae9f
commit bea1fbd88a

View File

@ -57,9 +57,11 @@ set ( pathname "${PROJECT_SOURCE_DIR}/${ScanModulePath}" )
if ( NOT EXISTS ${pathname}/${BaseMap}.kll ) if ( NOT EXISTS ${pathname}/${BaseMap}.kll )
set ( BaseMap_Args ${BaseMap_Args} ${pathname}/defaultMap.kll ) set ( BaseMap_Args ${BaseMap_Args} ${pathname}/defaultMap.kll )
set ( KLL_DEPENDS ${KLL_DEPENDS} ${pathname}/defaultMap.kll ) set ( KLL_DEPENDS ${KLL_DEPENDS} ${pathname}/defaultMap.kll )
else () elseif ( EXISTS "${pathname}/${BaseMap}.kll" )
set ( BaseMap_Args ${BaseMap_Args} ${pathname}/${BaseMap}.kll ) set ( BaseMap_Args ${BaseMap_Args} ${pathname}/${BaseMap}.kll )
set ( KLL_DEPENDS ${KLL_DEPENDS} ${pathname}/${BaseMap}.kll ) set ( KLL_DEPENDS ${KLL_DEPENDS} ${pathname}/${BaseMap}.kll )
else ()
message ( FATAL "Could not find '${BaseMap}.kll'" )
endif () endif ()
#| Configure DefaultMap if specified #| Configure DefaultMap if specified
@ -72,9 +74,11 @@ if ( NOT "${DefaultMap}" STREQUAL "" )
if ( EXISTS "${PROJECT_BINARY_DIR}/${MAP}.kll" ) if ( EXISTS "${PROJECT_BINARY_DIR}/${MAP}.kll" )
set ( DefaultMap_Args ${DefaultMap_Args} ${MAP}.kll ) set ( DefaultMap_Args ${DefaultMap_Args} ${MAP}.kll )
set ( KLL_DEPENDS ${KLL_DEPENDS} ${PROJECT_BINARY_DIR}/${MAP}.kll ) set ( KLL_DEPENDS ${KLL_DEPENDS} ${PROJECT_BINARY_DIR}/${MAP}.kll )
else () elseif ( EXISTS "${PROJECT_SOURCE_DIR}/kll/layouts/${MAP}.kll" )
set ( DefaultMap_Args ${DefaultMap_Args} ${PROJECT_SOURCE_DIR}/kll/layouts/${MAP}.kll ) set ( DefaultMap_Args ${DefaultMap_Args} ${PROJECT_SOURCE_DIR}/kll/layouts/${MAP}.kll )
set ( KLL_DEPENDS ${KLL_DEPENDS} ${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'" )
endif () endif ()
endforeach () endforeach ()
endif () endif ()
@ -92,9 +96,11 @@ if ( NOT "${PartialMaps}" STREQUAL "" )
if ( EXISTS "${PROJECT_BINARY_DIR}/${MAP_PART}.kll" ) if ( EXISTS "${PROJECT_BINARY_DIR}/${MAP_PART}.kll" )
set ( PartialMap_Args ${PartialMap_Args} ${MAP_PART}.kll ) set ( PartialMap_Args ${PartialMap_Args} ${MAP_PART}.kll )
set ( KLL_DEPENDS ${KLL_DEPENDS} ${PROJECT_BINARY_DIR}/${MAP_PART}.kll ) set ( KLL_DEPENDS ${KLL_DEPENDS} ${PROJECT_BINARY_DIR}/${MAP_PART}.kll )
else () elseif ( EXISTS "${PROJECT_SOURCE_DIR}/kll/layouts/${MAP_PART}.kll" )
set ( PartialMap_Args ${PartialMap_Args} ${PROJECT_SOURCE_DIR}/kll/layouts/${MAP_PART}.kll ) 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 ) set ( KLL_DEPENDS ${KLL_DEPENDS} ${PROJECT_SOURCE_DIR}/kll/layouts/${MAP_PART}.kll )
else ()
message ( FATAL "Could not find '${MAP_PART}.kll'" )
endif () endif ()
endforeach () endforeach ()
endforeach () endforeach ()