Commit 8c71e51d authored by Ludovic Courtès's avatar Ludovic Courtès
Browse files

Remove Qmake build system.

parent 40c932e7
......@@ -32,17 +32,20 @@ sources/: contains all the source files. A Makefile or VS project can be
2. Building
===========
You can build ALTA using either scons or Qt's qmake tools. Both tools should
be called at the root level of ALTA (noted ${ALTA} in the following):
ALTA uses SCons, a Python-based build system:
$ scons --cfg=config-file.py
http://scons.org/
for scons and:
To build ALTA, run a command like the following from the top-level
source directory (noted ${ALTA} in the remainder of this document):
$ qmake && make -i
$ scons --cfg=config-file.py
for qmake.
Here, 'config-file.py' must be replaced with a suitable configuration
file for your platform. For instance, when building with GCC on
GNU/Linux, you may run:
$ scons --cfg=configs/scons/config-linux-gcc.py
3. Building Advises (for Qt enthousiasts)
......
CONFIG -= qt
TEMPLATE = subdirs
SUBDIRS = sources \
external \
sources.depends = external
# This configuration file is part of ALTA library
#
# Configuration file for Google's CERES library present in the
# ${ALTA}/external/ceres* directory once the obtain_ceres.py script has
# been runned. You need to have the env variable ALTA defined.
EXTERNAL = $$(ALTA)/external/
EXTERNAL_INC = $${EXTERNAL}/build/include
EXTERNAL_LIB = $${EXTERNAL}/build/lib
exists($${EXTERNAL_INC}/ceres/ceres.h) {
CONFIG += ceres
INCLUDEPATH += $$(ALTA)/external/build/include
LIBS += -L$$(ALTA)/external/build/lib \
-lceres -lminiglog
macx {
LIBS *= -lamd -lcamd -lcolamd -lcholmod -lcxsparse
LIBS *= -lblas -llapack
}
} else {
warning("Did not find ceres.h in $${EXTERNAL_INC}/ceres")
}
# This configuration file is part of ALTA library
#
# Configuration file for CGAL library in the case where it is installed in
# the default location for your configuration.
unix {
exists("/usr/include/CGAL/version.h") {
CONFIG *= cgal
LIBS += -lCGAL -lCGAL_Core
}
}
macx {
exists("/opt/local/include/CGAL/version.h") {
CONFIG *= cgal
INCLUDEPATH *= /opt/local/include
LIBS *= -L/opt/local/lib
LIBS += -lCGAL -lCGAL_Core
}
}
win32 {
exists("C:\Program Files\CGAL-4.4\include\CGAL\version.h") {
CONFIG *= cgal
INCLUDEPATH *= "C:\Program Files\CGAL-4.4\include"
LIBS *= -L"C:\Program Files\CGAL-4.4\lib"
}
}
# This configuration file is part of ALTA library
#
# Configuration file for the Eigen package required for the CORE and
# some PLUGINS. You need to have the env variable ALTA defined.
CONFIG += eigen
INCLUDEPATH += $$(ALTA)/external/build/include $$(ALTA)/external/build/include/Eigen
# This configuration file is part of ALTA library
#
# It provides Qt with the configuration necessary to compile plugins
# using FLANN library. This .prf file works under Ubuntu/debian,
# but must be updated for other OS/distributions.
#
unix:!macx{
CONFIG *= flann
INCLUDEPATH *= /usr/include/
LIBS *= -L/usr/lib/x86_64-linux-gnu
LIBS *= -lflann
}
macx{
CONFIG *= flann
INCLUDEPATH *= /opt/local/include
LIBS *= -L/opt/local/lib
LIBS *= -lflann
}
# This configuration file is part of ALTA library
#
# Configuration file for MIT's NlOpt library present in the
# ${ALTA}/external/nlopt* directory once the obtain_nlopt.py script has
# been runned. You need to have the env variable ALTA defined.
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}")
}
# This configuration file is part of ALTA library
#
# It provides Qt with the configuration necessary to compile plugins
# using ILM's OpenEXR library. This .prf file works under Ubuntu/debian,
# but must be updated for other OS/distributions.
#
CONFIG += openexr
unix:!macx {
INCLUDEPATH += /usr/include/OpenEXR/
LIBS += -L/usr/lib/x86_64-linux-gnu -lHalf -lIlmThread -lIlmImf
}
macx {
INCLUDEPATH += /opt/local/include/OpenEXR
LIBS += -L/opt/local/lib -lHalf -lIlmThread -lIlmImf
}
# This configuration file is part of ALTA library
#
# It provides Qt with the configuration necessary to compile plugins
# using OpenMP. This .prf file works under Ubuntu/debian, but must
# be updated for other OS/distributions.
#
unix:!macx {
CONFIG += openmp
QMAKE_CXXFLAGS += -fopenmp
LIBS += -lgomp
}
macx {
exists(/opt/local/bin/gcc-mp-4.9) {
CONFIG += openmp
QMAKE_CXX = /opt/local/bin/gcc-mp-4.9
QMAKE_LINK = /opt/local/bin/gcc-mp-4.9
QMAKE_CXXFLAGS += -fopenmp
QMAKE_CXXFLAGS -= -Xarch_x86_64
QMAKE_LFLAGS += -fopenmp
QMAKE_LFLAGS -= -Xarch_x86_64
LIBS += -L/opt/local/lib/libgcc -lstdc++
} else {
warning("No OpenMP compliant compiler found")
}
}
# This configuration file is part of ALTA library
#
# Configuration file for the QuadProg++ package present in the
# ${ALTA}/external/quadprog++ directory provided with the ALTA
# library. You need to have the env variable ALTA defined.
CONFIG += quadprog
INCLUDEPATH += $$(ALTA)/external/quadprog++
LIBS += -L$$(ALTA)/external/build/lib -lquadprog++
TEMPLATE = subdirs
SUBDIRS = quadprog++ \
quadprog++-v2
system("python --help") {
system("python obtain_eigen.py")
system("python obtain_ceres.py")
system("python obtain_nlopt.py")
system("python obtain_ipopt.py")
} else {
warning("Python has not been found, you will need to compile external dependancies on your own.")
}
\ No newline at end of file
TARGET = quadprog++
TEMPLATE = lib
CONFIG *= static \
plugin \
eigen
DESTDIR = ../build/lib
INCLUDEPATH += ../..
HEADERS = QuadProg++.hh \
Array.hh
SOURCES = QuadProg++.cc \
Array.cc
TARGET = quadprog++
TEMPLATE = lib
CONFIG *= static \
plugin \
eigen
DESTDIR = ../build/lib
INCLUDEPATH += ../..
HEADERS = QuadProg++.hh \
Array.hh
SOURCES = QuadProg++.cc \
Array.cc
TEMPLATE = lib
CONFIG *= static \
console \
eigen
CONFIG -= qt
DESTDIR = ../build
unix{
QMAKE_CXXFLAGS += -Wall -pedantic -fPIC
LIBS += -ldl
}
HEADERS = args.h \
common.h \
data.h \
fitter.h \
function.h \
plugins_manager.h \
vertical_segment.h \
rational_function.h \
params.h \
clustering.h
SOURCES = common.cpp \
plugins_manager.cpp \
vertical_segment.cpp \
rational_function.cpp \
params.cpp \
function.cpp
TEMPLATE = lib
CONFIG *= plugin
DESTDIR = ../../build
load(eigen)
packagesExist(ceres, eigen) {
INCLUDEPATH += ../..
HEADERS = data.h
SOURCES = data.cpp
LIBS += -L../../build \
-lcore
}
load(openexr)
load(eigen)
requires(contains(CONFIG, openexr))
requires(contains(CONFIG, eigen))
TEMPLATE = lib
CONFIG *= plugin
DESTDIR = ../../build
INCLUDEPATH += ../..
HEADERS = data.h
SOURCES = data.cpp
LIBS += -L../../build \
-lcore
load(flann)
load(eigen)
requires(contains(CONFIG, flann))
requires(contains(CONFIG, eigen))
TEMPLATE = lib
CONFIG *= plugin
DESTDIR = ../../build
INCLUDEPATH += ../..
HEADERS = data.h
SOURCES = data.cpp
LIBS += -L../../build \
-lcore
load(matlab)
load(eigen)
requires(contains(CONFIG, eigen))
requires(contains(CONFIG, matlab))
TEMPLATE = lib
CONFIG *= plugin
DESTDIR = ../../build
INCLUDEPATH += ../..
HEADERS = data.h
SOURCES = data.cpp
LIBS += -L../../build \
-lcore
TEMPLATE = lib
CONFIG *= plugin \
eigen
DESTDIR = ../../build
INCLUDEPATH += ../..
HEADERS = data.h
SOURCES = data.cpp
LIBS += -L../../build \
-lcore
load(ceres)
load(eigen)
load(openmp)
requires(contains(CONFIG, ceres))
requires(contains(CONFIG, eigen))
TARGET = nonlinear_fitter_ceres
TEMPLATE = lib
CONFIG *= plugin
DESTDIR = ../../build
INCLUDEPATH += ../..
HEADERS = fitter.h
SOURCES = fitter.cpp
LIBS += -L../../build \
-lcore
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