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 @@ ...@@ -4,12 +4,20 @@
# ${ALTA}/external/ceres* directory once the obtain_ceres.py script has # ${ALTA}/external/ceres* directory once the obtain_ceres.py script has
# been runned. You need to have the env variable ALTA defined. # been runned. You need to have the env variable ALTA defined.
CONFIG += ceres EXTERNAL = $$(ALTA)/external/
INCLUDEPATH += $$(ALTA)/external/build/include EXTERNAL_INC = $${EXTERNAL}/build/include
LIBS += -L$$(ALTA)/external/build/lib \ EXTERNAL_LIB = $${EXTERNAL}/build/lib
-lceres -lglog
macx { exists($${EXTERNAL_INC}/ceres/ceres.h) {
LIBS += -lamd -lcamd -lcolamd -lcholmod -lcxsparse CONFIG += ceres
LIBS *= -lblas -llapack 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 { ...@@ -16,3 +16,5 @@ win32 {
} }
LIBS += -lCGAL -lCGAL_Core LIBS += -lCGAL -lCGAL_Core
message("$${CONFIG}")
...@@ -4,6 +4,16 @@ ...@@ -4,6 +4,16 @@
# ${ALTA}/external/nlopt* directory once the obtain_nlopt.py script has # ${ALTA}/external/nlopt* directory once the obtain_nlopt.py script has
# been runned. You need to have the env variable ALTA defined. # been runned. You need to have the env variable ALTA defined.
INCLUDEPATH += $$(ALTA)/external/build/include EXTERNAL = $$(ALTA)/external/
LIBS += -L$$(ALTA)/external/build/lib \ EXTERNAL_INC = $${EXTERNAL}/build/include
-lnlopt 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 TEMPLATE = lib
CONFIG *= plugin CONFIG *= plugin
DESTDIR = ../../build
load(eigen) load(eigen)
packagesExist(ceres, eigen) { packagesExist(ceres, eigen) {
DESTDIR = ../../build
INCLUDEPATH += ../.. INCLUDEPATH += ../..
HEADERS = data.h HEADERS = data.h
......
TEMPLATE = lib TEMPLATE = lib
CONFIG *= plugin CONFIG *= plugin
DESTDIR = ../../build
load(flann) load(flann)
load(eigen) load(eigen)
packagesExist(flann, eigen) { packagesExist(flann, eigen) {
DESTDIR = ../../build
INCLUDEPATH += ../.. INCLUDEPATH += ../..
HEADERS = data.h HEADERS = data.h
......
TEMPLATE = lib TEMPLATE = lib
CONFIG *= plugin CONFIG *= plugin
DESTDIR = ../../build
load(matlab) load(matlab)
load(eigen) load(eigen)
packagesExist(matlab, eigen) { !contains(CONFIG, eigen)|!contains(CONFIG, matlab) {
DESTDIR = ../../build unset(TARGET)
} else {
INCLUDEPATH += ../.. INCLUDEPATH += ../..
HEADERS = data.h HEADERS = data.h
......
TARGET = nonlinear_fitter_ceres
TEMPLATE = lib
CONFIG *= plugin
load(ceres) load(ceres)
load(eigen) load(eigen)
packagesExist(ceres, eigen) { !contains(CONFIG, ceres)|!contains(CONFIG, eigen) {
unset(TARGET)
} else {
TARGET = nonlinear_fitter_ceres
TEMPLATE = lib
CONFIG *= plugin
DESTDIR = ../../build DESTDIR = ../../build
INCLUDEPATH += ../.. INCLUDEPATH += ../..
......
TARGET = nonlinear_fitter_ipopt TARGET = nonlinear_fitter_ipopt
TEMPLATE = lib TEMPLATE = lib
CONFIG *= plugin CONFIG *= plugin
DESTDIR = ../../build
load(eigen) load(eigen)
load(ipopt) load(ipopt)
packagesExist(eigen, ipopt) { packagesExist(eigen, ipopt) {
DESTDIR = ../../build
INCLUDEPATH += ../.. INCLUDEPATH += ../..
......
TARGET = nonlinear_fitter_nlopt TARGET = nonlinear_fitter_nlopt
TEMPLATE = lib TEMPLATE = lib
CONFIG *= plugin CONFIG *= plugin
DESTDIR = ../../build
load(eigen) load(eigen)
load(nlopt) load(nlopt)
packagesExist(eigen, nlopt) { packagesExist(eigen, nlopt) {
DESTDIR = ../../build
INCLUDEPATH += ../.. INCLUDEPATH += ../..
......
TEMPLATE = lib
CONFIG += plugin
CONFIG -= qt
load(eigen)
load(cgal) 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 DESTDIR = ../../build
INCLUDEPATH += ../.. INCLUDEPATH += ../..
HEADERS = rational_fitter_cgal.h HEADERS = rational_fitter_cgal.h
......
TARGET = rational_fitter_dca
TEMPLATE = lib
load(eigen) load(eigen)
load(matlab) load(matlab)
packagesExist(eigen, matlab) { !contains(CONFIG, eigen)|!contains(CONFIG, matlab) {
unset(TARGET)
} else {
TARGET = rational_fitter_dca
TEMPLATE = lib
CONFIG *= plugin
DESTDIR = ../../build DESTDIR = ../../build
INCLUDEPATH += ../rational_function \ INCLUDEPATH += ../rational_function \
......
TARGET = rational_fitter_matlab
TEMPLATE = lib
CONFIG *= plugin
load(eigen) load(eigen)
load(matlab) load(matlab)
packagesExist(eigen,matlab) { !contains(CONFIG, eigen)|!contains(CONFIG, matlab) {
unset(TARGET)
} else {
TARGET = rational_fitter_matlab
TEMPLATE = lib
CONFIG *= plugin
DESTDIR = ../../build DESTDIR = ../../build
INCLUDEPATH += ../rational_function \ INCLUDEPATH += ../..
../rational_data \
../..
HEADERS = rational_fitter.h HEADERS = rational_fitter.h
SOURCES = rational_fitter.cpp 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