From 5b3e35537f1af3d09119a6bba970a9d665bf0ef6 Mon Sep 17 00:00:00 2001 From: Bill Somerville Date: Wed, 14 May 2014 19:14:37 +0000 Subject: [PATCH] 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 --- mainwindow.cpp | 2 +- wsjtx.pro | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index d6c21a394..4c03d5c3c 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -1,4 +1,4 @@ -//--------------------------------------------------------- MainWindow +//-------------------------------------------------------- MainWindow #include "mainwindow.h" diff --git a/wsjtx.pro b/wsjtx.pro index b85c56b6f..76e59855f 100644 --- a/wsjtx.pro +++ b/wsjtx.pro @@ -10,13 +10,19 @@ CONFIG += thread #CONFIG += console TARGET = wsjtx -DESTDIR = ../wsjtx_install VERSION = 1.4 TEMPLATE = app DEFINES = QT5 -HAMLIB_DIR = ../../hamlib3/mingw32 QMAKE_CXXFLAGS += -std=c++11 +isEmpty (DESTDIR) { +DESTDIR = ../wsjtx_install +} + +isEmpty (HAMLIB_DIR) { +HAMLIB_DIR = ../../hamlib3/mingw32 +} + F90 = gfortran gfortran.output = ${QMAKE_FILE_BASE}.o 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 { INCLUDEPATH += $${HAMLIB_DIR}/include -LIBS += -L${HAMLIB_DIR}/lib -lhamlib +LIBS += -L$${HAMLIB_DIR}/lib -lhamlib LIBS += -L./lib -lastro -ljt9 LIBS += -L. -lfftw3f_win LIBS += -lws2_32