summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnu Aliyas <anu.aliyas@qt.io>2023-07-28 09:07:27 +0200
committerAnu Aliyas <anu.aliyas@qt.io>2023-08-02 10:17:41 +0000
commit4d386e067c536f95872eb063a323e16a55b2a4f0 (patch)
treefae1c74e791d0a06d8817063a8f22464e4375712
parent2200dada4cb9d8802c111a4c8d91d7b191e113de (diff)
Use a different file name for v8 context snapshot in debug mode
- Use a different file name for v8 context snapshot in debug mode so that release and debug snapshots can live side-by-side. Fixes: QTBUG-115369 Change-Id: Ibe90e7abd45b9cd8b8471d3167b74876b6c4b4b2 Reviewed-by: Michal Klocek <michal.klocek@qt.io> Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io> (cherry picked from commit b42d3c1968ba91f9e1c376f94befdb94aec0fa3d)
-rw-r--r--src/core/api/CMakeLists.txt20
1 files changed, 15 insertions, 5 deletions
diff --git a/src/core/api/CMakeLists.txt b/src/core/api/CMakeLists.txt
index b3a132746..d5c81ea4e 100644
--- a/src/core/api/CMakeLists.txt
+++ b/src/core/api/CMakeLists.txt
@@ -126,15 +126,25 @@ set(resourceList qtwebengine_resources.pak
set(stamps ${buildDir}/${config}/${arch}/QtWebEngineCore.stamp)
-if(QT_FEATURE_webengine_v8_context_snapshot AND NOT MACOS)
- list(APPEND resourceList v8_context_snapshot.bin)
-elseif(QT_FEATURE_webengine_v8_context_snapshot)
+if(QT_FEATURE_webengine_v8_context_snapshot)
foreach(arch ${archs})
foreach(config ${configs})
- get_filename_component(resSourcePath ${buildDir}/${config}/${arch}/v8_context_snapshot.${arch}.bin REALPATH)
+ if(MACOS)
+ set(ext_arch ".${arch}")
+ else()
+ unset(ext_arch)
+ endif()
+ if("${config}" STREQUAL "Debug")
+ set(ext_debug ".debug")
+ else()
+ unset(ext_debug)
+ endif()
+ get_filename_component(resSourcePath ${buildDir}/${config}/${arch}/v8_context_snapshot${ext_arch}${ext_debug}.bin REALPATH)
list(APPEND resourceFiles ${resSourcePath})
endforeach()
- set(stamps ${stamps} ${buildDir}/${config}/${arch}/obj/tools/v8_context_snapshot/v8_context_snapshot.stamp)
+ if(MACOS)
+ set(stamps ${stamps} ${buildDir}/${config}/${arch}/obj/tools/v8_context_snapshot/v8_context_snapshot.stamp)
+ endif()
endforeach()
endif()