|
|
|
@ -30,27 +30,27 @@ endif()
|
|
|
|
if(EXISTS ${manifest_path})
|
|
|
|
if(EXISTS ${manifest_path})
|
|
|
|
file(READ ${manifest_path} manifest_json)
|
|
|
|
file(READ ${manifest_path} manifest_json)
|
|
|
|
|
|
|
|
|
|
|
|
string(JSON engine_paths_count ERROR_VARIABLE json_error LENGTH ${manifest_json} engine_paths)
|
|
|
|
string(JSON engines_path_count ERROR_VARIABLE json_error LENGTH ${manifest_json} engines_path)
|
|
|
|
if(json_error)
|
|
|
|
if(json_error)
|
|
|
|
message(FATAL_ERROR "Unable to read key 'engine_paths' from '${manifest_path}', error: ${json_error}")
|
|
|
|
message(FATAL_ERROR "Unable to read key 'engines_path' from '${manifest_path}', error: ${json_error}")
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
|
|
string(JSON engine_paths_type ERROR_VARIABLE json_error TYPE ${manifest_json} engine_paths)
|
|
|
|
string(JSON engines_path_type ERROR_VARIABLE json_error TYPE ${manifest_json} engines_path)
|
|
|
|
if(json_error OR NOT ${engine_paths_type} STREQUAL "OBJECT")
|
|
|
|
if(json_error OR NOT ${engines_path_type} STREQUAL "OBJECT")
|
|
|
|
message(FATAL_ERROR "Type of 'engine_paths' in '${manifest_path}' is not a JSON Object, error: ${json_error}")
|
|
|
|
message(FATAL_ERROR "Type of 'engines_path' in '${manifest_path}' is not a JSON Object, error: ${json_error}")
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
|
|
math(EXPR engine_paths_count "${engine_paths_count}-1")
|
|
|
|
math(EXPR engines_path_count "${engines_path_count}-1")
|
|
|
|
foreach(engine_path_index RANGE ${engine_paths_count})
|
|
|
|
foreach(engine_path_index RANGE ${engines_path_count})
|
|
|
|
string(JSON engine_name ERROR_VARIABLE json_error MEMBER ${manifest_json} engine_paths ${engine_path_index})
|
|
|
|
string(JSON engine_name ERROR_VARIABLE json_error MEMBER ${manifest_json} engines_path ${engine_path_index})
|
|
|
|
if(json_error)
|
|
|
|
if(json_error)
|
|
|
|
message(FATAL_ERROR "Unable to read 'engine_paths/${engine_path_index}' from '${manifest_path}', error: ${json_error}")
|
|
|
|
message(FATAL_ERROR "Unable to read 'engines_path/${engine_path_index}' from '${manifest_path}', error: ${json_error}")
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
|
|
if(LY_ENGINE_NAME_TO_USE STREQUAL engine_name)
|
|
|
|
if(LY_ENGINE_NAME_TO_USE STREQUAL engine_name)
|
|
|
|
string(JSON engine_path ERROR_VARIABLE json_error GET ${manifest_json} engine_paths ${engine_name})
|
|
|
|
string(JSON engine_path ERROR_VARIABLE json_error GET ${manifest_json} engines_path ${engine_name})
|
|
|
|
if(json_error)
|
|
|
|
if(json_error)
|
|
|
|
message(FATAL_ERROR "Unable to read value from 'engine_paths/${engine_name}', error: ${json_error}")
|
|
|
|
message(FATAL_ERROR "Unable to read value from 'engines_path/${engine_name}', error: ${json_error}")
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
|
|
if(engine_path)
|
|
|
|
if(engine_path)
|
|
|
|
|