summaryrefslogtreecommitdiff
path: root/examples/cppbuild.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2021-08-26 19:56:27 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2021-08-26 20:07:30 +0200
commit9c5ba2e3b715fec11219bf9e1f57b2c67f1b7fa9 (patch)
tree1f4cf1872667040f7e638e4d0580cedf469dd799 /examples/cppbuild.cc
parent23b150fd0dedc012e85b405ec92bc3adacfe9959 (diff)
Bootstrap
Diffstat (limited to 'examples/cppbuild.cc')
-rw-r--r--examples/cppbuild.cc156
1 files changed, 156 insertions, 0 deletions
diff --git a/examples/cppbuild.cc b/examples/cppbuild.cc
new file mode 100644
index 0000000..d3d21be
--- /dev/null
+++ b/examples/cppbuild.cc
@@ -0,0 +1,156 @@
+#include "libcppbuild.h"
+
+namespace
+{
+BuildConfigurations myConfigs()
+{
+ return
+ {
+ {
+ .type = TargetType::Executable,
+ .target = "plugingui",
+ .sources = {
+ "drumgizmo/zita-resampler/libs/cresampler.cc",
+ "drumgizmo/zita-resampler/libs/resampler-table.cc",
+ "drumgizmo/zita-resampler/libs/resampler.cc",
+ "drumgizmo/zita-resampler/libs/vresampler.cc",
+ "drumgizmo/hugin/hugin.c",
+ "drumgizmo/pugixml/src/pugixml.cpp",
+ },
+ .depends = {
+ "libplugingui.so",
+ },
+ .cxxflags = {
+ "-DUI_X11",
+ "-O3",
+ "-g",
+ "-Wall",
+ "-Werror",
+ "-std=c++11",
+ "-Idrumgizmo/getoptpp",
+ "-Idrumgizmo/",
+ "-Idrumgizmo/hugin",
+ "-Idrumgizmo/plugingui/",
+ "-Idrumgizmo/src/",
+ "-Idrumgizmo/zita-resampler/libs",
+ "-Idrumgizmo/pugixml/src",
+ },
+ .cflags = {
+ "-g",
+ //"-O3",
+ "-Wall",
+ "-Werror",
+ },
+ .ldflags = {
+ "-lm",
+ "-lX11",
+ "-lXext",
+ "-lsndfile",
+ "-pthread",
+ }
+ },
+ };
+}
+
+BuildConfigurations myConfigs2()
+{
+ return
+ {
+ {
+ .type = TargetType::DynamicLibrary,
+ .target = "libplugingui.so",
+ .sources = {
+ "drumgizmo/plugingui/abouttab.cc",
+ "drumgizmo/plugingui/bleedcontrolframecontent.cc",
+ "drumgizmo/plugingui/button.cc",
+ "drumgizmo/plugingui/button_base.cc",
+ "drumgizmo/plugingui/checkbox.cc",
+ "drumgizmo/plugingui/colour.cc",
+ "drumgizmo/plugingui/combobox.cc",
+ "drumgizmo/plugingui/dialog.cc",
+ "drumgizmo/plugingui/diskstreamingframecontent.cc",
+ "drumgizmo/plugingui/drumkitframecontent.cc",
+ "drumgizmo/plugingui/drumkittab.cc",
+ "drumgizmo/plugingui/eventhandler.cc",
+ "drumgizmo/plugingui/filebrowser.cc",
+ "drumgizmo/plugingui/font.cc",
+ "drumgizmo/plugingui/frame.cc",
+ "drumgizmo/plugingui/helpbutton.cc",
+ "drumgizmo/plugingui/humaniservisualiser.cc",
+ "drumgizmo/plugingui/humanizerframecontent.cc",
+ "drumgizmo/plugingui/image.cc",
+ "drumgizmo/plugingui/imagecache.cc",
+ "drumgizmo/plugingui/knob.cc",
+ "drumgizmo/plugingui/label.cc",
+ "drumgizmo/plugingui/layout.cc",
+ "drumgizmo/plugingui/led.cc",
+ "drumgizmo/plugingui/lineedit.cc",
+ "drumgizmo/plugingui/listbox.cc",
+ "drumgizmo/plugingui/listboxbasic.cc",
+ "drumgizmo/plugingui/listboxthin.cc",
+ "drumgizmo/plugingui/maintab.cc",
+ "drumgizmo/plugingui/mainwindow.cc",
+ "drumgizmo/plugingui/nativewindow_x11.cc",
+ "drumgizmo/plugingui/painter.cc",
+ "drumgizmo/plugingui/pixelbuffer.cc",
+ "drumgizmo/plugingui/pluginconfig.cc",
+ "drumgizmo/plugingui/powerbutton.cc",
+ "drumgizmo/plugingui/powerwidget.cc",
+ "drumgizmo/plugingui/progressbar.cc",
+ "drumgizmo/plugingui/resamplingframecontent.cc",
+ "drumgizmo/plugingui/resource.cc",
+ "drumgizmo/plugingui/resource_data.cc",
+ "drumgizmo/plugingui/sampleselectionframecontent.cc",
+ "drumgizmo/plugingui/scrollbar.cc",
+ "drumgizmo/plugingui/slider.cc",
+ "drumgizmo/plugingui/stackedwidget.cc",
+ "drumgizmo/plugingui/statusframecontent.cc",
+ "drumgizmo/plugingui/tabbutton.cc",
+ "drumgizmo/plugingui/tabwidget.cc",
+ "drumgizmo/plugingui/testmain.cc",
+ "drumgizmo/plugingui/textedit.cc",
+ "drumgizmo/plugingui/texture.cc",
+ "drumgizmo/plugingui/texturedbox.cc",
+ "drumgizmo/plugingui/timingframecontent.cc",
+ "drumgizmo/plugingui/toggle.cc",
+ "drumgizmo/plugingui/tooltip.cc",
+ "drumgizmo/plugingui/uitranslation.cc",
+ "drumgizmo/plugingui/utf8.cc",
+ "drumgizmo/plugingui/verticalline.cc",
+ "drumgizmo/plugingui/visualizerframecontent.cc",
+ "drumgizmo/plugingui/voicelimitframecontent.cc",
+ "drumgizmo/plugingui/widget.cc",
+ "drumgizmo/plugingui/window.cc",
+ "drumgizmo/plugingui/lodepng/lodepng.cpp",
+ },
+ .depends = {
+ "src.a",
+ },
+ .cxxflags = {
+ "-DUI_X11",
+ "-O3",
+ "-g",
+ "-Wall",
+ "-Werror",
+ "-std=c++11",
+ "-Idrumgizmo/getoptpp",
+ "-Idrumgizmo/",
+ "-Idrumgizmo/hugin",
+ "-Idrumgizmo/plugingui/",
+ "-Idrumgizmo/src/",
+ "-Idrumgizmo/zita-resampler/libs",
+ "-Idrumgizmo/pugixml/src",
+ },
+ .cflags = {},
+ .ldflags = {}
+ }
+ };
+}
+
+//int a = reg(__FILE__, myConfigs);
+//int b = reg(__FILE__, myConfigs2);
+}
+
+// Convenience macro
+REG(myConfigs);
+REG(myConfigs2);