SPEC-6663 add file(READ files to tracking (#1416)

* adding property to track files read by file(READ

* code review comments

* adding newline
This commit is contained in:
Esteban Papp
2021-06-17 16:16:10 -07:00
committed by GitHub
parent 8fb0007201
commit 2fa6883455
11 changed files with 32 additions and 13 deletions
+3
View File
@@ -15,6 +15,8 @@ include_guard()
# Read the engine name from the project_json file
file(READ ${CMAKE_CURRENT_LIST_DIR}/project.json project_json)
set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${CMAKE_CURRENT_LIST_DIR}/project.json)
string(JSON LY_ENGINE_NAME_TO_USE ERROR_VARIABLE json_error GET ${project_json} engine)
if(json_error)
message(FATAL_ERROR "Unable to read key 'engine' from 'project.json', error: ${json_error}")
@@ -30,6 +32,7 @@ endif()
# Find a key that matches LY_ENGINE_NAME_TO_USE and use that as the engine path.
if(EXISTS ${manifest_path})
file(READ ${manifest_path} manifest_json)
set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${manifest_path})
string(JSON engines_path_count ERROR_VARIABLE json_error LENGTH ${manifest_json} engines_path)
if(json_error)