changeset 7:846464771d06

Use qmake for everything, + build static lib too
author Chris Cannam
date Thu, 14 Apr 2016 09:42:26 +0100
parents 61dbb18f2369
children 25e00373f597
files .hgignore Makefile.helper checker-lib.pro checker.pri checker.pro helper.pro vamp-plugin-load-checker.pro
diffstat 7 files changed, 68 insertions(+), 27 deletions(-) [+]
line wrap: on
line diff
--- a/.hgignore	Wed Apr 13 18:41:49 2016 +0100
+++ b/.hgignore	Thu Apr 14 09:42:26 2016 +0100
@@ -1,5 +1,7 @@
 syntax: glob
 *~
 *.o
+*.a
 checker
 helper
+Makefile*
--- a/Makefile.helper	Wed Apr 13 18:41:49 2016 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-
-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-lib.pro	Thu Apr 14 09:42:26 2016 +0100
@@ -0,0 +1,10 @@
+
+TEMPLATE = lib
+
+CONFIG += staticlib
+
+include(checker.pri)
+    
+TARGET = checker
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/checker.pri	Thu Apr 14 09:42:26 2016 +0100
@@ -0,0 +1,20 @@
+
+CONFIG += qt stl c++11 exceptions console warn_on
+QT -= xml network gui widgets
+
+!win32 {
+    QMAKE_CXXFLAGS += -Werror
+}
+
+OBJECTS_DIR = o
+MOC_DIR = o
+
+HEADERS += \
+	plugincandidates.h \
+	knownplugins.h
+
+SOURCES += \
+	plugincandidates.cpp \
+	knownplugins.cpp
+
+        
--- a/checker.pro	Wed Apr 13 18:41:49 2016 +0100
+++ b/checker.pro	Thu Apr 14 09:42:26 2016 +0100
@@ -1,28 +1,14 @@
 
 TEMPLATE = app
 
-CONFIG += qt stl c++11 exceptions console warn_on
-QT -= xml network gui widgets
+include(checker.pri)
 
 # 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
-
-QMAKE_CXXFLAGS += -Werror
-
+    
 TARGET = checker
 
-OBJECTS_DIR = o
-MOC_DIR = o
-
-HEADERS += \
-	plugincandidates.h \
-	knownplugins.h
-
 SOURCES += \
-	plugincandidates.cpp \
-	knownplugins.cpp \
 	checker.cpp
 
-QMAKE_POST_LINK=make -f Makefile.helper
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/helper.pro	Thu Apr 14 09:42:26 2016 +0100
@@ -0,0 +1,26 @@
+
+TEMPLATE = app
+
+CONFIG += stl c++11 exceptions console warn_on
+CONFIG -= qt
+
+# 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
+
+!win32* {
+    QMAKE_CXXFLAGS += -Werror
+}
+
+linux* {
+    QMAKE_LFLAGS += -ldl
+}
+
+TARGET = helper
+
+OBJECTS_DIR = o
+MOC_DIR = o
+
+SOURCES += \
+	helper.cpp
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/vamp-plugin-load-checker.pro	Thu Apr 14 09:42:26 2016 +0100
@@ -0,0 +1,8 @@
+
+TEMPLATE = subdirs
+SUBDIRS = sub_checker_lib sub_checker sub_helper
+
+sub_checker_lib.file = checker-lib.pro
+sub_checker.file = checker.pro
+sub_helper.file = helper.pro
+