Skip to content

Commit

Permalink
check Boost version with qtCompileTest instead of dpkg
Browse files Browse the repository at this point in the history
Removes use of BOOST_INSTALLED and removes boostdetect.pri
  • Loading branch information
cjmayo committed Jul 5, 2016
1 parent 7ab7da8 commit 701e3a3
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 62 deletions.
1 change: 1 addition & 0 deletions config.tests/boost/boost.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SOURCES = main.cpp
8 changes: 8 additions & 0 deletions config.tests/boost/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#include <boost/version.hpp>
#if BOOST_VERSION / 100000 == 1 && BOOST_VERSION / 100 % 1000 == 54
#error "Boost 1.54 found"
#endif

int main()
{
}
6 changes: 2 additions & 4 deletions phoenix.pro
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ unix:!macx {
CONFIG += link_pkgconfig
}

load(configure)

win32 {
# release build using msvc 2010 needs to use Multi-threaded (/MT) for the code generation/runtime library option
# release build using msvc 2010 needs to add msvcrt.lib;%(IgnoreSpecificDefaultLibraries) to the linker/no default libraries option
Expand Down Expand Up @@ -196,10 +198,6 @@ include(pri/translations.pri)
include(pri/program.pri)
include(pri/qtsysteminfo.pri)

!contains(DEFINES, BOOST_INSTALLED) {
include(pri/boostdetect.pri)
}

contains(DEFINES, QUAZIP_INSTALLED) {
INCLUDEPATH += /usr/include/quazip
LIBS += -lquazip
Expand Down
58 changes: 0 additions & 58 deletions pri/boostdetect.pri

This file was deleted.

25 changes: 25 additions & 0 deletions pri/utils.pri
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,31 @@
# $Date: 2013-01-12 07:45:08 +0100 (Sa, 12. Jan 2013) $
# ********************************************************************/

# boost_1_54_0 is buggy
BOOSTS = 43 44 45 46 47 48 49 50 51 52 53 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
LATESTBOOST = 0
for(boost, BOOSTS) {
exists(../src/lib/boost_1_$${boost}_0) {
LATESTBOOST = $$boost
}
}

contains(LATESTBOOST, 0) {
qtCompileTest(boost)
config_boost {
LATESTBOOST = installed
message("using installed Boost library")
} else {
message("Boost 1.54 has a bug in a function that Fritzing uses, so download or install some other version")
error("Easiest to copy the Boost library to .../src/lib/, so that you have .../src/lib/boost_1_xx_0")
}
}

!contains(LATESTBOOST, installed) {
message("using Boost from src/lib/boost_1_$${LATESTBOOST}_0")
INCLUDEPATH += src/lib/boost_1_$${LATESTBOOST}_0
}

HEADERS += \
src/utils/abstractstatesbutton.h \
src/utils/autoclosemessagebox.h \
Expand Down

0 comments on commit 701e3a3

Please sign in to comment.