Check for system installed eigen & glew

pull/110/head
Hleb Valoshka 2018-07-11 22:25:23 +03:00
parent bff29b516a
commit c250fa623e
5 changed files with 37 additions and 5 deletions

View File

@ -12,6 +12,8 @@ QT += xml
load(configure)
qtCompileTest(spice)
qtCompileTest(byteswap)
qtCompileTest(eigen)
qtCompileTest(glew)
unix {
!exists(config.h):system(touch config.h)
@ -414,12 +416,18 @@ CURVEPLOT_SOURCES = \
CURVEPLOT_HEADERS = \
thirdparty/curveplot/include/curveplot.h
THIRDPARTY_SOURCES = $$GLEW_SOURCES $$CURVEPLOT_SOURCES
THIRDPARTY_HEADERS = $$GLEW_HEADERS $$CURVEPLOT_HEADERS
THIRDPARTY_SOURCES = $$CURVEPLOT_SOURCES
THIRDPARTY_HEADERS = $$CURVEPLOT_HEADERS
!config_glew {
THIRDPARTY_SOURCES += $$GLEW_SOURCES
THIRDPARTY_HEADERS += $$GLEW_HEADERS
INCLUDEPATH += thirdparty/glew/include
DEFINES += GLEW_STATIC
}
#### common definitions
DEFINES += CELX
DEFINES += GLEW_STATIC
# SPICE support
config_spice {
@ -474,8 +482,10 @@ INCLUDEPATH += .
INCLUDEPATH += src
# Third party libraries
INCLUDEPATH += thirdparty/glew/include
INCLUDEPATH += thirdparty/Eigen
!config_eigen {
INCLUDEPATH += thirdparty/Eigen
}
INCLUDEPATH += thirdparty/curveplot/include
@ -616,6 +626,12 @@ unix:config_spice {
INCLUDEPATH += /usr/local/cspice/include
LIBS += /usr/local/cspice/lib/cspice.a
}
unix:config_eigen {
PKGCONFIG += eigen3
}
unix:config_glew {
PKGCONFIG += glew
}
macx {
message(Copying extras-standard to bundle)

View File

@ -0,0 +1,6 @@
SOURCES = main.cpp
unix {
CONFIG += link_pkgconfig
PKGCONFIG += eigen3
}

View File

@ -0,0 +1,2 @@
#include <Eigen/Core>
int main() { Eigen::Vector3f t; return 0; }

View File

@ -0,0 +1,6 @@
SOURCES = main.cpp
unix {
CONFIG += link_pkgconfig
PKGCONFIG += glew
}

View File

@ -0,0 +1,2 @@
#include <GL/glew.h>
int main() { return (int)glewInit(); }