aboutsummaryrefslogtreecommitdiff
path: root/icd
diff options
context:
space:
mode:
authorMark Lobodzinski <mark@lunarg.com>2017-12-05 16:41:25 -0700
committerMark Lobodzinski <mark@lunarg.com>2017-12-06 08:38:30 -0700
commit7e46a5a0f95dc143b092ecf92e811b1d499b64d5 (patch)
treecbd47cc895b2039c2735d6e4388adf595664568d /icd
parent57fb625663db6fe1d11c6fa0f6047b29695aac78 (diff)
downloadusermoji-7e46a5a0f95dc143b092ecf92e811b1d499b64d5.tar.xz
cmake: Fix layers/icd cmake files for in-tree builds
See Github #2243. Change-Id: I40119c73a1518357df4360654c888b8306aa94d8
Diffstat (limited to 'icd')
-rw-r--r--icd/CMakeLists.txt8
1 files changed, 5 insertions, 3 deletions
diff --git a/icd/CMakeLists.txt b/icd/CMakeLists.txt
index a83d7027..8ff4e040 100644
--- a/icd/CMakeLists.txt
+++ b/icd/CMakeLists.txt
@@ -61,9 +61,11 @@ else()
endif()
endif()
# For ICD with a direct dependency on a project with the same name, use it.
-foreach (config_file ${ICD_JSON_FILES})
- add_dependencies(${config_file}-json ${config_file})
-endforeach(config_file)
+if (NOT (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR))
+ foreach (config_file ${ICD_JSON_FILES})
+ add_dependencies(${config_file}-json ${config_file})
+ endforeach(config_file)
+endif()
add_custom_target(generate_icd_files DEPENDS
mock_icd.h