Make qmake project file more generic.

It is now possible to override the default locations hard coded in
this file with local preferences.

The variables that can be overridden are HAMLIB_DIR and DESTDIR.

To override, add local variable assignments on the intial qmake
command line. E.g.:

qmake HAMLIB_DIR=c:\my\local\hamlib\installation DESTDIR=c:\my\local\install\destination



git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@4141 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Bill Somerville 2014-05-14 19:14:37 +00:00
parent c33fe44b98
commit 5b3e35537f
2 changed files with 10 additions and 4 deletions

View File

@ -1,4 +1,4 @@
//--------------------------------------------------------- MainWindow //-------------------------------------------------------- MainWindow
#include "mainwindow.h" #include "mainwindow.h"

View File

@ -10,13 +10,19 @@ CONFIG += thread
#CONFIG += console #CONFIG += console
TARGET = wsjtx TARGET = wsjtx
DESTDIR = ../wsjtx_install
VERSION = 1.4 VERSION = 1.4
TEMPLATE = app TEMPLATE = app
DEFINES = QT5 DEFINES = QT5
HAMLIB_DIR = ../../hamlib3/mingw32
QMAKE_CXXFLAGS += -std=c++11 QMAKE_CXXFLAGS += -std=c++11
isEmpty (DESTDIR) {
DESTDIR = ../wsjtx_install
}
isEmpty (HAMLIB_DIR) {
HAMLIB_DIR = ../../hamlib3/mingw32
}
F90 = gfortran F90 = gfortran
gfortran.output = ${QMAKE_FILE_BASE}.o gfortran.output = ${QMAKE_FILE_BASE}.o
gfortran.commands = $$F90 -c -O2 -o ${QMAKE_FILE_OUT} ${QMAKE_FILE_NAME} gfortran.commands = $$F90 -c -O2 -o ${QMAKE_FILE_OUT} ${QMAKE_FILE_NAME}
@ -119,7 +125,7 @@ LIBS += -lfftw3f $$system($$F90 -print-file-name=libgfortran.so)
win32 { win32 {
INCLUDEPATH += $${HAMLIB_DIR}/include INCLUDEPATH += $${HAMLIB_DIR}/include
LIBS += -L${HAMLIB_DIR}/lib -lhamlib LIBS += -L$${HAMLIB_DIR}/lib -lhamlib
LIBS += -L./lib -lastro -ljt9 LIBS += -L./lib -lastro -ljt9
LIBS += -L. -lfftw3f_win LIBS += -L. -lfftw3f_win
LIBS += -lws2_32 LIBS += -lws2_32