Commit 61e047b5 authored by Laurent Belcour's avatar Laurent Belcour
Browse files

Trying to update the Qt mechanism to have conditional compilation.

It seems to work half of the time.
parent 362c5777
......@@ -4,12 +4,20 @@
# ${ALTA}/external/ceres* directory once the obtain_ceres.py script has
# been runned. You need to have the env variable ALTA defined.
CONFIG += ceres
INCLUDEPATH += $$(ALTA)/external/build/include
LIBS += -L$$(ALTA)/external/build/lib \
-lceres -lglog
EXTERNAL = $$(ALTA)/external/
EXTERNAL_INC = $${EXTERNAL}/build/include
EXTERNAL_LIB = $${EXTERNAL}/build/lib
macx {
LIBS += -lamd -lcamd -lcolamd -lcholmod -lcxsparse
LIBS *= -lblas -llapack
exists($${EXTERNAL_INC}/ceres/ceres.h) {
CONFIG += ceres
INCLUDEPATH += $$(ALTA)/external/build/include
LIBS += -L$$(ALTA)/external/build/lib \
-lceres -lglog
macx {
LIBS *= -lamd -lcamd -lcolamd -lcholmod -lcxsparse
LIBS *= -lblas -llapack
}
} else {
warning("Did not find ceres.h in $${EXTERNAL_INC}/ceres")
}
......@@ -16,3 +16,5 @@ win32 {
}
LIBS += -lCGAL -lCGAL_Core
message("$${CONFIG}")
......@@ -4,6 +4,16 @@
# ${ALTA}/external/nlopt* directory once the obtain_nlopt.py script has
# been runned. You need to have the env variable ALTA defined.
INCLUDEPATH += $$(ALTA)/external/build/include
LIBS += -L$$(ALTA)/external/build/lib \
-lnlopt
EXTERNAL = $$(ALTA)/external/
EXTERNAL_INC = $${EXTERNAL}/build/include
EXTERNAL_LIB = $${EXTERNAL}/build/lib
exists($${EXTERNAL_INC}/nlopt.h) {
CONFIG += nlopt
INCLUDEPATH += $$(ALTA)/external/build/include
LIBS += -L$$(ALTA)/external/build/lib \
-lnlopt
} else {
warning("Did not find nlopt.h in $${EXTERNAL_INC}")
}
TEMPLATE = lib
CONFIG *= plugin
DESTDIR = ../../build
load(eigen)
packagesExist(ceres, eigen) {
DESTDIR = ../../build
INCLUDEPATH += ../..
HEADERS = data.h
......
TEMPLATE = lib
CONFIG *= plugin
DESTDIR = ../../build
load(flann)
load(eigen)
packagesExist(flann, eigen) {
DESTDIR = ../../build
INCLUDEPATH += ../..
HEADERS = data.h
......
TEMPLATE = lib
CONFIG *= plugin
DESTDIR = ../../build
load(matlab)
load(eigen)
packagesExist(matlab, eigen) {
DESTDIR = ../../build
!contains(CONFIG, eigen)|!contains(CONFIG, matlab) {
unset(TARGET)
} else {
INCLUDEPATH += ../..
HEADERS = data.h
......
TARGET = nonlinear_fitter_ceres
TEMPLATE = lib
CONFIG *= plugin
load(ceres)
load(eigen)
packagesExist(ceres, eigen) {
!contains(CONFIG, ceres)|!contains(CONFIG, eigen) {
unset(TARGET)
} else {
TARGET = nonlinear_fitter_ceres
TEMPLATE = lib
CONFIG *= plugin
DESTDIR = ../../build
INCLUDEPATH += ../..
......
TARGET = nonlinear_fitter_ipopt
TEMPLATE = lib
CONFIG *= plugin
DESTDIR = ../../build
load(eigen)
load(ipopt)
packagesExist(eigen, ipopt) {
DESTDIR = ../../build
INCLUDEPATH += ../..
......
TARGET = nonlinear_fitter_nlopt
TEMPLATE = lib
CONFIG *= plugin
DESTDIR = ../../build
load(eigen)
load(nlopt)
packagesExist(eigen, nlopt) {
DESTDIR = ../../build
INCLUDEPATH += ../..
......
TEMPLATE = lib
CONFIG += plugin
CONFIG -= qt
load(eigen)
load(cgal)
load(eigen)
packagesExist(eigen, cgal) {
!contains(CONFIG, eigen)|!contains(CONFIG, cgal) {
unset(TARGET)
} else {
TARGET = rational_fitter_cgal
TEMPLATE = lib
CONFIG += plugin
CONFIG -= qt
DESTDIR = ../../build
INCLUDEPATH += ../..
HEADERS = rational_fitter_cgal.h
......
TARGET = rational_fitter_dca
TEMPLATE = lib
load(eigen)
load(matlab)
packagesExist(eigen, matlab) {
!contains(CONFIG, eigen)|!contains(CONFIG, matlab) {
unset(TARGET)
} else {
TARGET = rational_fitter_dca
TEMPLATE = lib
CONFIG *= plugin
DESTDIR = ../../build
INCLUDEPATH += ../rational_function \
......
TARGET = rational_fitter_matlab
TEMPLATE = lib
CONFIG *= plugin
load(eigen)
load(matlab)
packagesExist(eigen,matlab) {
!contains(CONFIG, eigen)|!contains(CONFIG, matlab) {
unset(TARGET)
} else {
TARGET = rational_fitter_matlab
TEMPLATE = lib
CONFIG *= plugin
DESTDIR = ../../build
INCLUDEPATH += ../rational_function \
../rational_data \
../..
INCLUDEPATH += ../..
HEADERS = rational_fitter.h
SOURCES = rational_fitter.cpp
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment