summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2017-03-28 20:57:22 +0200
committerKonstantin Käfer <mail@kkaefer.com>2017-03-28 21:24:12 +0200
commita9896fa01b72f260940c3b5df4eec0c1b73dce26 (patch)
treed446118ec178a61f5be73e4f1662866c80c0c141 /CMakeLists.txt
parentc86b492bf7df62f8c09ec565b7ccfb4cd2bfcc79 (diff)
downloadqtlocation-mapboxgl-a9896fa01b72f260940c3b5df4eec0c1b73dce26.tar.gz
[build] generate .xcconfig files with configure_file
We previously used incremental `file(WRITE ...)` commands that gradually recreated the file on every CMake invocation. This sometimes lead to Xcode parsing a partially written file, which in turn breaks building dependend targets. Instead, we're now using a templated configuration file, which ensure that the file is created in one go and hopefully reduces the race condition between CMake and Xcode's automatic project updating.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt6
1 files changed, 6 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 480c186057..a6ed681bde 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -110,3 +110,9 @@ endif()
if(COMMAND mbgl_platform_node)
include(cmake/node.cmake)
endif()
+
+if(CMAKE_GENERATOR STREQUAL "Xcode")
+ write_xcconfig_target_properties(
+ mbgl-core
+ )
+endif()