forked from quickshell/quickshell
build: improve parallelism by removing core dependency on modules
This commit is contained in:
parent
c44041653c
commit
9f6ef37f61
|
@ -87,11 +87,4 @@ function (qs_pch target)
|
||||||
target_link_libraries(${target} PRIVATE ${QT_DEPS}) # required for gcc to accept the pch on plugin targets
|
target_link_libraries(${target} PRIVATE ${QT_DEPS}) # required for gcc to accept the pch on plugin targets
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
add_subdirectory(src/core)
|
add_subdirectory(src)
|
||||||
add_subdirectory(src/io)
|
|
||||||
|
|
||||||
if (WAYLAND)
|
|
||||||
add_subdirectory(src/wayland)
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
install(TARGETS quickshell RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
|
||||||
|
|
2
Justfile
2
Justfile
|
@ -26,7 +26,7 @@ clean:
|
||||||
rm -rf {{builddir}}
|
rm -rf {{builddir}}
|
||||||
|
|
||||||
run *ARGS='': build
|
run *ARGS='': build
|
||||||
{{builddir}}/src/core/quickshell {{ARGS}}
|
{{builddir}}/src/quickshell {{ARGS}}
|
||||||
|
|
||||||
test *ARGS='': build
|
test *ARGS='': build
|
||||||
ctest --test-dir {{builddir}} --output-on-failure {{ARGS}}
|
ctest --test-dir {{builddir}} --output-on-failure {{ARGS}}
|
||||||
|
|
10
src/CMakeLists.txt
Normal file
10
src/CMakeLists.txt
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
qt_add_executable(quickshell main.cpp)
|
||||||
|
|
||||||
|
install(TARGETS quickshell RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||||
|
|
||||||
|
add_subdirectory(core)
|
||||||
|
add_subdirectory(io)
|
||||||
|
|
||||||
|
if (WAYLAND)
|
||||||
|
add_subdirectory(wayland)
|
||||||
|
endif ()
|
|
@ -1,4 +1,4 @@
|
||||||
qt_add_executable(quickshell
|
qt_add_library(quickshell-core STATIC
|
||||||
main.cpp
|
main.cpp
|
||||||
plugin.cpp
|
plugin.cpp
|
||||||
shell.cpp
|
shell.cpp
|
||||||
|
@ -19,10 +19,12 @@ qt_add_executable(quickshell
|
||||||
)
|
)
|
||||||
|
|
||||||
set_source_files_properties(main.cpp PROPERTIES COMPILE_DEFINITIONS GIT_REVISION="${GIT_REVISION}")
|
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})
|
target_link_libraries(quickshell-core PRIVATE ${QT_DEPS})
|
||||||
qs_pch(quickshell)
|
qs_pch(quickshell-core)
|
||||||
|
|
||||||
|
target_link_libraries(quickshell PRIVATE quickshell-coreplugin)
|
||||||
|
|
||||||
if (BUILD_TESTING)
|
if (BUILD_TESTING)
|
||||||
add_subdirectory(test)
|
add_subdirectory(test)
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#include "main.hpp"
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
#include <qcommandlineoption.h>
|
#include <qcommandlineoption.h>
|
||||||
|
@ -17,7 +19,7 @@
|
||||||
#include "plugin.hpp"
|
#include "plugin.hpp"
|
||||||
#include "rootwrapper.hpp"
|
#include "rootwrapper.hpp"
|
||||||
|
|
||||||
int main(int argc, char** argv) {
|
int qs_main(int argc, char** argv) {
|
||||||
const auto app = QGuiApplication(argc, argv);
|
const auto app = QGuiApplication(argc, argv);
|
||||||
QGuiApplication::setApplicationName("quickshell");
|
QGuiApplication::setApplicationName("quickshell");
|
||||||
QGuiApplication::setApplicationVersion("0.1.0 (" GIT_REVISION ")");
|
QGuiApplication::setApplicationVersion("0.1.0 (" GIT_REVISION ")");
|
||||||
|
|
3
src/core/main.hpp
Normal file
3
src/core/main.hpp
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
int qs_main(int argc, char** argv); // NOLINT
|
5
src/main.cpp
Normal file
5
src/main.cpp
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
#include "core/main.hpp"
|
||||||
|
|
||||||
|
int main(int argc, char** argv) {
|
||||||
|
return qs_main(argc, argv);
|
||||||
|
}
|
Loading…
Reference in a new issue