From bea1fbd88aab3644597101d45d0d6b18065347ee Mon Sep 17 00:00:00 2001 From: Jacob Alexander Date: Sat, 9 May 2015 20:36:37 +0000 Subject: [PATCH] Adding .kll file existence checks to CMake --- Lib/CMake/kll.cmake | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Lib/CMake/kll.cmake b/Lib/CMake/kll.cmake index 0de02bf..80d44c1 100644 --- a/Lib/CMake/kll.cmake +++ b/Lib/CMake/kll.cmake @@ -57,9 +57,11 @@ 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 ) -else () +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 () #| Configure DefaultMap if specified @@ -72,9 +74,11 @@ if ( NOT "${DefaultMap}" STREQUAL "" ) if ( EXISTS "${PROJECT_BINARY_DIR}/${MAP}.kll" ) set ( DefaultMap_Args ${DefaultMap_Args} ${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 ( KLL_DEPENDS ${KLL_DEPENDS} ${PROJECT_SOURCE_DIR}/kll/layouts/${MAP}.kll ) + else () + message ( FATAL "Could not find '${MAP}.kll'" ) endif () endforeach () endif () @@ -92,9 +96,11 @@ if ( NOT "${PartialMaps}" STREQUAL "" ) if ( EXISTS "${PROJECT_BINARY_DIR}/${MAP_PART}.kll" ) set ( PartialMap_Args ${PartialMap_Args} ${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 ( KLL_DEPENDS ${KLL_DEPENDS} ${PROJECT_SOURCE_DIR}/kll/layouts/${MAP_PART}.kll ) + else () + message ( FATAL "Could not find '${MAP_PART}.kll'" ) endif () endforeach () endforeach ()