blob: 4695cd99a2aed531ec0f486046537dea5f8804bf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
# Copyright (C) 2025 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
cmake_minimum_required(VERSION 3.16)
if(NOT EXISTS "${qmllsIniPath}")
return()
endif()
file(READ "${qmllsIniPath}" qmllsIniContent)
string(REGEX REPLACE ".*buildDir=\"([^\"]*)\".*" "\\1" buildPaths "${qmllsIniContent}")
# replace unix path separator with CMake list separator
# note that the windows path separator is the CMake list separator already
if(NOT CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")
string(REPLACE ":" ";" buildPaths "${buildPaths}")
endif()
foreach(path "${buildPaths}")
file(GLOB_RECURSE qmllsIniFiles "${path}/*qmlls.ini.timestamp")
if (qmllsIniFiles)
file(REMOVE "${qmllsIniFiles}")
endif()
endforeach()
|