Skip to content

Commit f68fb78

Browse files
committed
feat: use pch to speed up builds
1 parent 850d9fc commit f68fb78

1 file changed

Lines changed: 16 additions & 1 deletion

File tree

plugin/src/Caelestia/CMakeLists.txt

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,24 @@ function(qml_module arg_TARGET)
3838
install(FILES "${module_qmldir}" DESTINATION "${module_dir}")
3939
install(FILES "${module_typeinfo}" DESTINATION "${module_dir}")
4040

41-
target_link_libraries(${arg_TARGET} PRIVATE Qt::Core Qt::Qml ${arg_LIBRARIES})
41+
target_link_libraries(${arg_TARGET} PRIVATE caelestia-pch Qt::Core Qt::Qml ${arg_LIBRARIES})
4242
endfunction()
4343

44+
add_library(caelestia-pch INTERFACE)
45+
target_precompile_headers(caelestia-pch INTERFACE
46+
<qobject.h>
47+
<qqmlintegration.h>
48+
<qstring.h>
49+
<qqmlengine.h>
50+
<qloggingcategory.h>
51+
<qvariant.h>
52+
<qtimer.h>
53+
<qdir.h>
54+
<qlist.h>
55+
<qstringlist.h>
56+
<qpointer.h>
57+
)
58+
4459
qml_module(caelestia
4560
URI Caelestia
4661
SOURCES

0 commit comments

Comments
 (0)