Add dev mode flag to cmake and adjust spacing
This commit is contained in:
@@ -3,6 +3,14 @@ project(SOM LANGUAGES CXX)
|
||||
|
||||
find_package(Qt6 6.5 REQUIRED COMPONENTS Core Widgets)
|
||||
|
||||
option(DEV_BUILD "Enable developer-mode build" OFF)
|
||||
|
||||
if(DEV_BUILD)
|
||||
add_compile_definitions(DEV_BUILD=1)
|
||||
else()
|
||||
add_compile_definitions(DEV_BUILD=0)
|
||||
endif()
|
||||
|
||||
qt_standard_project_setup()
|
||||
|
||||
qt_add_executable(som
|
||||
|
||||
@@ -146,11 +146,13 @@ void MainWindow::settings()
|
||||
|
||||
void MainWindow::loadPlugins()
|
||||
{
|
||||
#if DEV_BUILD
|
||||
pluginsDir = QDir(QCoreApplication::applicationDirPath());
|
||||
pluginsDir.cd("plugins");
|
||||
#else
|
||||
pluginsDir = QDir("/usr/lib");
|
||||
pluginsDir.cd("som");
|
||||
//pluginsDir = QDir(QCoreApplication::applicationDirPath());
|
||||
//pluginsDir.cd("plugins");
|
||||
|
||||
#endif
|
||||
const auto entryList = pluginsDir.entryList(QDir::Files);
|
||||
for (const QString &fileName : entryList) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user