Build to executables

Signed-off-by: Nikolai Rodionov <allanger@badhouseplants.net>
This commit is contained in:
2025-11-16 21:45:14 +01:00
parent cd93853df1
commit e5855d5715
6 changed files with 31 additions and 137 deletions

View File

@@ -3,6 +3,10 @@ project('daw-exp ', 'cpp')
qt_dep = dependency('qt6', modules: ['Core', 'Widgets'])
jack_dep = dependency('jack', required : true)
executable('daw-project', 'src/main.cpp',
dependencies: [qt_dep, jack_dep],
executable('daw-project', 'src/engine/main.cpp',
dependencies: [jack_dep],
install: true)
executable('daw-gui', 'src/gui/main.cpp',
dependencies: [qt_dep],
install: true)

View File

@@ -1,120 +0,0 @@
#include <iostream>
#include "daw-exp.h"
void daw_exp(){
#ifdef NDEBUG
std::cout << "daw-exp/1.0: Hello World Release!\n";
#else
std::cout << "daw-exp/1.0: Hello World Debug!\n";
#endif
// ARCHITECTURES
#ifdef _M_X64
std::cout << " daw-exp/1.0: _M_X64 defined\n";
#endif
#ifdef _M_IX86
std::cout << " daw-exp/1.0: _M_IX86 defined\n";
#endif
#ifdef _M_ARM64
std::cout << " daw-exp/1.0: _M_ARM64 defined\n";
#endif
#if __i386__
std::cout << " daw-exp/1.0: __i386__ defined\n";
#endif
#if __x86_64__
std::cout << " daw-exp/1.0: __x86_64__ defined\n";
#endif
#if __aarch64__
std::cout << " daw-exp/1.0: __aarch64__ defined\n";
#endif
// Libstdc++
#if defined _GLIBCXX_USE_CXX11_ABI
std::cout << " daw-exp/1.0: _GLIBCXX_USE_CXX11_ABI "<< _GLIBCXX_USE_CXX11_ABI << "\n";
#endif
// MSVC runtime
#if defined(_DEBUG)
#if defined(_MT) && defined(_DLL)
std::cout << " daw-exp/1.0: MSVC runtime: MultiThreadedDebugDLL\n";
#elif defined(_MT)
std::cout << " daw-exp/1.0: MSVC runtime: MultiThreadedDebug\n";
#endif
#else
#if defined(_MT) && defined(_DLL)
std::cout << " daw-exp/1.0: MSVC runtime: MultiThreadedDLL\n";
#elif defined(_MT)
std::cout << " daw-exp/1.0: MSVC runtime: MultiThreaded\n";
#endif
#endif
// COMPILER VERSIONS
#if _MSC_VER
std::cout << " daw-exp/1.0: _MSC_VER" << _MSC_VER<< "\n";
#endif
#if _MSVC_LANG
std::cout << " daw-exp/1.0: _MSVC_LANG" << _MSVC_LANG<< "\n";
#endif
#if __cplusplus
std::cout << " daw-exp/1.0: __cplusplus" << __cplusplus<< "\n";
#endif
#if __INTEL_COMPILER
std::cout << " daw-exp/1.0: __INTEL_COMPILER" << __INTEL_COMPILER<< "\n";
#endif
#if __GNUC__
std::cout << " daw-exp/1.0: __GNUC__" << __GNUC__<< "\n";
#endif
#if __GNUC_MINOR__
std::cout << " daw-exp/1.0: __GNUC_MINOR__" << __GNUC_MINOR__<< "\n";
#endif
#if __clang_major__
std::cout << " daw-exp/1.0: __clang_major__" << __clang_major__<< "\n";
#endif
#if __clang_minor__
std::cout << " daw-exp/1.0: __clang_minor__" << __clang_minor__<< "\n";
#endif
#if __apple_build_version__
std::cout << " daw-exp/1.0: __apple_build_version__" << __apple_build_version__<< "\n";
#endif
// SUBSYSTEMS
#if __MSYS__
std::cout << " daw-exp/1.0: __MSYS__" << __MSYS__<< "\n";
#endif
#if __MINGW32__
std::cout << " daw-exp/1.0: __MINGW32__" << __MINGW32__<< "\n";
#endif
#if __MINGW64__
std::cout << " daw-exp/1.0: __MINGW64__" << __MINGW64__<< "\n";
#endif
#if __CYGWIN__
std::cout << " daw-exp/1.0: __CYGWIN__" << __CYGWIN__<< "\n";
#endif
}
void daw_exp_print_vector(const std::vector<std::string> &strings) {
for(std::vector<std::string>::const_iterator it = strings.begin(); it != strings.end(); ++it) {
std::cout << "daw_exp/1.0 " << *it << std::endl;
}
}

View File

@@ -1,14 +0,0 @@
#pragma once
#include <vector>
#include <string>
#ifdef _WIN32
#define DAW_EXP_EXPORT __declspec(dllexport)
#else
#define DAW_EXP_EXPORT
#endif
DAW_EXP_EXPORT void daw_exp();
DAW_EXP_EXPORT void daw_exp_print_vector(const std::vector<std::string> &strings);

View File

@@ -3,7 +3,6 @@
#include <cmath>
#include <iostream>
#include <atomic>
#include "QApplication"
static std::atomic<jack_client_t*> g_client{nullptr};
static float g_phase = 0.0f;
static const float kFreq = 440.0f;

13
src/gui/control_panel.cpp Normal file
View File

@@ -0,0 +1,13 @@
#include <QApplication>
#include <QPushButton>
int main(int argc, char **argv)
{
QApplication app (argc, argv);
QPushButton button ("Hello world !");
button.show();
return app.exec();
}

12
src/gui/main.cpp Normal file
View File

@@ -0,0 +1,12 @@
#include <QApplication>
#include <QPushButton>
int main(int argc, char **argv)
{
QApplication app (argc, argv);
QPushButton button ("Hello world !");
button.show();
return app.exec();
}