Skip to content

Commit

Permalink
Adding .kll file existence checks to CMake
Browse files Browse the repository at this point in the history
  • Loading branch information
haata committed May 9, 2015
1 parent af4078a commit bea1fbd
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions Lib/CMake/kll.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 ()
Expand All @@ -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 ()
Expand Down

0 comments on commit bea1fbd

Please sign in to comment.