forked from quickshell/quickshell
all: optimize build
This commit is contained in:
parent
1168879d6d
commit
7ffce72b31
51 changed files with 1526 additions and 1277 deletions
20
cmake/util.cmake
Normal file
20
cmake/util.cmake
Normal file
|
@ -0,0 +1,20 @@
|
|||
function (qs_append_qmldir target text)
|
||||
get_property(qmldir_content TARGET ${target} PROPERTY _qt_internal_qmldir_content)
|
||||
|
||||
if ("${qmldir_content}" STREQUAL "")
|
||||
message(WARNING "qs_append_qmldir depends on private Qt cmake code, which has broken.")
|
||||
return()
|
||||
endif()
|
||||
|
||||
set_property(TARGET ${target} APPEND_STRING PROPERTY _qt_internal_qmldir_content ${text})
|
||||
endfunction()
|
||||
|
||||
# DEPENDENCIES introduces a cmake dependency which we don't need with static modules.
|
||||
# This greatly improves comp speed by not introducing those dependencies.
|
||||
function (qs_add_module_deps_light target)
|
||||
foreach (dep IN LISTS ARGN)
|
||||
string(APPEND qmldir_extra "depends ${dep}\n")
|
||||
endforeach()
|
||||
|
||||
qs_append_qmldir(${target} "${qmldir_extra}")
|
||||
endfunction()
|
Loading…
Add table
Add a link
Reference in a new issue