diff --git a/.gitignore b/.gitignore index f87fb20..e2d0afb 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ Makefile* *.pro.user* *.orig openEMS +localPathes.pri diff --git a/nf2ff/nf2ff.pro b/nf2ff/nf2ff.pro index bbef55b..efeb044 100644 --- a/nf2ff/nf2ff.pro +++ b/nf2ff/nf2ff.pro @@ -5,6 +5,10 @@ CONFIG += debug_and_release VERSION = 0.1.0 +exists(localPathes.pri) { + include(localPathes.pri) +} + win32 { CONFIG += console @@ -87,9 +91,13 @@ QMAKE_CXXFLAGS_DEBUG = -O0 \ # # INSTALL (only the nf2ff executable) # +isEmpty(PREFIX) { + PREFIX = /usr/local +} install.target = install -install.commands = mkdir -p \"$(INSTALL_ROOT)/usr/bin\" -install.commands += && cp -at \"$(INSTALL_ROOT)/usr/bin/\" nf2ff +install.commands = mkdir -p \"$$PREFIX/bin\" +unix:install.commands += && cp -at \"$$PREFIX/bin/\" nf2ff +win32:install.commands += && cp -at \"$$PREFIX/bin/\" release/nf2ff.exe QMAKE_EXTRA_TARGETS += install diff --git a/openEMS.pro b/openEMS.pro index 8e8aa7a..aa81e72 100644 --- a/openEMS.pro +++ b/openEMS.pro @@ -14,6 +14,17 @@ CONFIG += debug_and_release # VERSION=0.0.29 +# add git revision +GITREV = $$system(git describe --tags) +isEmpty(GITREV):GITREV=$$VERSION +DEFINES += GIT_VERSION=\\\"$$GITREV\\\" + +# remove unnecessary webkit define +DEFINES -= QT_WEBKIT + +exists(localPathes.pri) { + include(localPathes.pri) +} ############################################################################### # CONFIG SECTION @@ -262,13 +273,6 @@ MPI_SUPPORT { QMAKE_CXXFLAGS_RELEASE += -Wno-unused-parameter #needed because mpich2 produces tons of unused parameter } -# add git revision -GITREV = $$system(git describe --tags) -isEmpty(GITREV):GITREV=$$VERSION -DEFINES += GIT_VERSION=\\\"$$GITREV\\\" - - - # @@ -282,11 +286,15 @@ QMAKE_EXTRA_TARGETS += tarball # # INSTALL (only the openEMS executable and matlab scripts) # +isEmpty(PREFIX) { + PREFIX = /usr/local +} install.target = install -install.commands = mkdir -p \"$(INSTALL_ROOT)/usr/bin\" -install.commands += && mkdir -p \"$(INSTALL_ROOT)/usr/share/openEMS/matlab\" -install.commands += && cp -at \"$(INSTALL_ROOT)/usr/bin/\" openEMS.sh openEMS_MPI.sh openEMS -install.commands += && cp -at \"$(INSTALL_ROOT)/usr/share/openEMS/\" matlab/ +install.commands = mkdir -p \"$$PREFIX/bin\" +install.commands += && mkdir -p \"$$PREFIX/share/openEMS/matlab\" +unix:install.commands += && cp -at \"$$PREFIX/bin/\" openEMS.sh openEMS_MPI.sh openEMS +win32:install.commands += && cp -at \"$$PREFIX/bin/\" release/openEMS.exe +install.commands += && cp -at \"$$PREFIX/share/openEMS/\" matlab/ QMAKE_EXTRA_TARGETS += install