2012-02-02 10:45:26 +00:00
|
|
|
CONFIG -= app_bundle qt
|
|
|
|
TEMPLATE = app
|
|
|
|
OBJECTS_DIR = obj
|
|
|
|
CONFIG += debug_and_release
|
|
|
|
|
2012-05-24 07:55:48 +00:00
|
|
|
VERSION = 0.1.0
|
|
|
|
|
2013-09-04 11:23:09 +00:00
|
|
|
exists(localPaths.pri) {
|
|
|
|
include(localPaths.pri)
|
2012-12-04 15:47:01 +00:00
|
|
|
}
|
|
|
|
|
2012-02-02 10:45:26 +00:00
|
|
|
win32 {
|
2012-03-01 21:24:49 +00:00
|
|
|
CONFIG += console
|
2012-05-24 07:55:48 +00:00
|
|
|
|
2012-12-03 13:22:25 +00:00
|
|
|
isEmpty(WIN32_LIB_ROOT) {
|
|
|
|
WIN32_LIB_ROOT = ../..
|
|
|
|
}
|
2012-05-24 07:55:48 +00:00
|
|
|
|
2012-09-14 13:14:26 +00:00
|
|
|
# #3rd party libraries#
|
2012-05-24 07:55:48 +00:00
|
|
|
# tinyxml
|
2013-10-23 11:14:34 +00:00
|
|
|
DEFINES += TIXML_USE_STL
|
2012-09-14 13:14:26 +00:00
|
|
|
INCLUDEPATH += $$WIN32_LIB_ROOT/tinyxml/include
|
|
|
|
LIBS += -L$$WIN32_LIB_ROOT/tinyxml/bin -ltinyxml2
|
2012-05-24 07:55:48 +00:00
|
|
|
|
|
|
|
# hdf5
|
2012-09-14 13:14:26 +00:00
|
|
|
INCLUDEPATH += $$WIN32_LIB_ROOT/hdf5/include
|
2012-05-24 07:55:48 +00:00
|
|
|
LIBS += -L$$WIN32_LIB_ROOT/hdf5/lib -lhdf5
|
2012-10-23 07:51:16 +00:00
|
|
|
# zlib
|
|
|
|
LIBS += -L$$WIN32_LIB_ROOT/zlib/lib -lz
|
2012-05-24 07:55:48 +00:00
|
|
|
|
|
|
|
# boost
|
|
|
|
DEFINES += BOOST_THREAD_USE_LIB
|
|
|
|
INCLUDEPATH += $$WIN32_LIB_ROOT/boost/include
|
2012-09-14 13:14:26 +00:00
|
|
|
LIBS += -L$$WIN32_LIB_ROOT/boost/lib -lboost_thread -lboost_chrono -lboost_system
|
2012-02-02 10:45:26 +00:00
|
|
|
}
|
|
|
|
!win32 {
|
2012-03-02 19:26:36 +00:00
|
|
|
LIBS += -lboost_thread-mt
|
2012-04-11 09:43:30 +00:00
|
|
|
LIBS += -ltinyxml
|
2013-10-12 11:10:30 +00:00
|
|
|
#vtk
|
|
|
|
isEmpty(VTK_LIBRARYPATH){
|
|
|
|
} else {
|
|
|
|
LIBS +=-L$$VTK_LIBRARYPATH
|
|
|
|
}
|
2012-11-13 08:38:23 +00:00
|
|
|
LIBS += -lhdf5_hl -lhdf5
|
2012-02-02 10:45:26 +00:00
|
|
|
}
|
|
|
|
|
2012-03-02 19:26:36 +00:00
|
|
|
# hdf5 compat
|
|
|
|
DEFINES += H5_USE_16_API
|
|
|
|
|
2012-02-02 10:45:26 +00:00
|
|
|
TOOLSPATH = ../tools
|
|
|
|
|
|
|
|
#### SOURCES ################################################################
|
|
|
|
SOURCES += main.cpp \
|
|
|
|
nf2ff.cpp \
|
|
|
|
nf2ff_calc.cpp
|
|
|
|
|
|
|
|
# tools
|
|
|
|
SOURCES += $$TOOLSPATH/global.cpp \
|
|
|
|
$$TOOLSPATH/useful.cpp \
|
|
|
|
$$TOOLSPATH/array_ops.cpp \
|
|
|
|
$$TOOLSPATH/hdf5_file_reader.cpp \
|
|
|
|
$$TOOLSPATH/hdf5_file_writer.cpp
|
|
|
|
|
|
|
|
#### HEADERS ################################################################
|
|
|
|
HEADERS += nf2ff.h \
|
|
|
|
nf2ff_calc.h
|
|
|
|
|
|
|
|
# tools
|
|
|
|
HEADERS += $$TOOLSPATH/constants.h \
|
|
|
|
$$TOOLSPATH/array_ops.h \
|
|
|
|
$$TOOLSPATH/global.h \
|
|
|
|
$$TOOLSPATH/useful.h \
|
|
|
|
$$TOOLSPATH/aligned_allocator.h \
|
|
|
|
$$TOOLSPATH/hdf5_file_reader.h \
|
|
|
|
$$TOOLSPATH/hdf5_file_writer.h
|
|
|
|
|
2012-03-02 19:26:36 +00:00
|
|
|
!packaging {
|
|
|
|
# if packaging is not set in CONFIG, set some default flags
|
|
|
|
# if packaging is enabled, give the flags on the qmake comandline
|
2012-02-02 10:45:26 +00:00
|
|
|
QMAKE_CXXFLAGS_RELEASE = -O3 \
|
|
|
|
-g \
|
|
|
|
-march=native
|
|
|
|
QMAKE_CXXFLAGS_DEBUG = -O0 \
|
|
|
|
-g \
|
|
|
|
-march=native
|
2012-03-02 19:26:36 +00:00
|
|
|
}
|
2012-02-02 10:45:26 +00:00
|
|
|
|
|
|
|
# add git revision
|
|
|
|
# QMAKE_CXXFLAGS += -DGIT_VERSION=\\\"`git describe --tags`\\\"
|
|
|
|
|
|
|
|
|
2012-03-01 21:24:49 +00:00
|
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
# INSTALL (only the nf2ff executable)
|
|
|
|
#
|
2012-12-04 15:47:01 +00:00
|
|
|
isEmpty(PREFIX) {
|
|
|
|
PREFIX = /usr/local
|
|
|
|
}
|
2012-03-01 21:24:49 +00:00
|
|
|
install.target = install
|
2012-12-04 15:47:01 +00:00
|
|
|
install.commands = mkdir -p \"$$PREFIX/bin\"
|
|
|
|
unix:install.commands += && cp -at \"$$PREFIX/bin/\" nf2ff
|
|
|
|
win32:install.commands += && cp -at \"$$PREFIX/bin/\" release/nf2ff.exe
|
2012-03-01 21:24:49 +00:00
|
|
|
QMAKE_EXTRA_TARGETS += install
|
|
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
# create .PHONY target
|
|
|
|
#
|
|
|
|
phony.target = .PHONY
|
|
|
|
phony.depends = $$QMAKE_EXTRA_TARGETS
|
|
|
|
QMAKE_EXTRA_TARGETS += phony
|
|
|
|
|