build: improve parallelism by removing core dependency on modules

This commit is contained in:
outfoxxed 2024-03-11 18:34:38 -07:00
parent c44041653c
commit 9f6ef37f61
Signed by untrusted user: outfoxxed
GPG key ID: 4C88A185FB89301E
7 changed files with 29 additions and 14 deletions

View file

@ -1,4 +1,4 @@
qt_add_executable(quickshell
qt_add_library(quickshell-core STATIC
main.cpp
plugin.cpp
shell.cpp
@ -19,10 +19,12 @@ qt_add_executable(quickshell
)
set_source_files_properties(main.cpp PROPERTIES COMPILE_DEFINITIONS GIT_REVISION="${GIT_REVISION}")
qt_add_qml_module(quickshell URI Quickshell VERSION 0.1)
qt_add_qml_module(quickshell-core URI Quickshell VERSION 0.1)
target_link_libraries(quickshell PRIVATE ${QT_DEPS})
qs_pch(quickshell)
target_link_libraries(quickshell-core PRIVATE ${QT_DEPS})
qs_pch(quickshell-core)
target_link_libraries(quickshell PRIVATE quickshell-coreplugin)
if (BUILD_TESTING)
add_subdirectory(test)

View file

@ -1,3 +1,5 @@
#include "main.hpp"
#include <iostream>
#include <qcommandlineoption.h>
@ -17,7 +19,7 @@
#include "plugin.hpp"
#include "rootwrapper.hpp"
int main(int argc, char** argv) {
int qs_main(int argc, char** argv) {
const auto app = QGuiApplication(argc, argv);
QGuiApplication::setApplicationName("quickshell");
QGuiApplication::setApplicationVersion("0.1.0 (" GIT_REVISION ")");

3
src/core/main.hpp Normal file
View file

@ -0,0 +1,3 @@
#pragma once
int qs_main(int argc, char** argv); // NOLINT