changeset 3:3bae396cf8e0

Start to organise as a Qt project, with a main (command-line) executable
author Chris Cannam
date Wed, 13 Apr 2016 09:12:04 +0100
parents 2288c1d05c28
children 6f891a9c6434
files .hgignore Makefile Makefile.helper checker.cpp checker.pro plugincandidates.cpp
diffstat 6 files changed, 48 insertions(+), 26 deletions(-) [+]
line wrap: on
line diff
--- a/.hgignore	Tue Apr 12 17:38:57 2016 +0100
+++ b/.hgignore	Wed Apr 13 09:12:04 2016 +0100
@@ -2,3 +2,4 @@
 *~
 *.o
 checker
+helper
--- a/Makefile	Tue Apr 12 17:38:57 2016 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,17 +0,0 @@
-
-all:	helper plugincandidates
-
-CXXFLAGS	:= -Wall -Werror 
-
-helper:	helper.o
-		$(CXX) -o $@ $< -ldl
-
-# todo: qmake .pro file
-CXXFLAGS	+= -I/usr/include/qt -I/usr/include/qt/QtCore -fPIC -std=c++11
-
-plugincandidates:	plugincandidates.o
-		$(CXX) -o $@ $< -lQt5Core -ldl
-
-clean:
-		rm helper.o plugincandidates.o
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Makefile.helper	Wed Apr 13 09:12:04 2016 +0100
@@ -0,0 +1,11 @@
+
+all:	helper
+
+CXXFLAGS	:= -Wall -Werror 
+
+helper:	helper.o
+		$(CXX) -o $@ $< -ldl
+
+clean:
+		rm helper.o
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/checker.cpp	Wed Apr 13 09:12:04 2016 +0100
@@ -0,0 +1,12 @@
+
+#include "plugincandidates.h"
+
+int main(int argc, char **argv)
+{
+    //!!! just a test
+    PluginCandidates candidates("./helper");
+    candidates.scan("vamp",
+                    { "/usr/lib/vamp", "/usr/local/lib/vamp" },
+                    "vampGetPluginDescriptor");
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/checker.pro	Wed Apr 13 09:12:04 2016 +0100
@@ -0,0 +1,24 @@
+
+TEMPLATE = app
+
+CONFIG += qt stl c++11 exceptions console
+QT -= xml network gui widgets
+
+# Using the "console" CONFIG flag above should ensure this happens for
+# normal Windows builds, but this may be necessary when cross-compiling
+win32-x-g++:QMAKE_LFLAGS += -Wl,-subsystem,console
+
+TARGET = checker
+
+OBJECTS_DIR = o
+MOC_DIR = o
+
+HEADERS += \
+	plugincandidates.h
+
+SOURCES += \
+	plugincandidates.cpp \
+	checker.cpp
+
+QMAKE_POST_LINK=make -f Makefile.helper
+
--- a/plugincandidates.cpp	Tue Apr 12 17:38:57 2016 +0100
+++ b/plugincandidates.cpp	Wed Apr 13 09:12:04 2016 +0100
@@ -147,12 +147,3 @@
     cerr << "(ends)" << endl;
 }
 
-int main(int argc, char **argv)
-{
-    //!!! just a test
-    PluginCandidates candidates("./helper");
-    candidates.scan("vamp",
-                    { "/usr/lib/vamp", "/usr/local/lib/vamp" },
-                    "vampGetPluginDescriptor");
-}
-