##// END OF EJS Templates
Fixed integrated build on mac
Tero Ahola -
r558:c5ee375ca54b
parent child
Show More
@@ -1,31 +1,32
1 !include(common.pri) {
1 !include(common.pri) {
2 error('missing common.pri')
2 error('missing common.pri')
3 }
3 }
4
4
5 TEMPLATE = subdirs
5 TEMPLATE = subdirs
6 SUBDIRS += src examples demos test qmlplugin
6 SUBDIRS += src examples demos test qmlplugin
7
7
8 integrated_build:{
8 integrated_build:{
9 message('Configured for integrated build')
9 message('Configured for integrated build against local libs...')
10 } else {
10 } else {
11 message('Running build aginst system libs...')
11 message('Please build example test and qmlplugin after installing library.')
12 message('Please build example test and qmlplugin after installing library.')
12 }
13 }
13
14
14 CONFIG += ordered
15 CONFIG += ordered
15 QMAKE_CXXFLAGS += -g -Wall
16 QMAKE_CXXFLAGS += -g -Wall
16 unix:QMAKE_DISTCLEAN += -r build bin include lib doc/html
17 unix:QMAKE_DISTCLEAN += -r build bin include lib doc/html
17 win32:QMAKE_DISTCLEAN += /Q /s build bin include lib doc\\html
18 win32:QMAKE_DISTCLEAN += /Q /s build bin include lib doc\\html
18
19
19 # install feature file
20 # install feature file
20 feature.path = $$[QT_INSTALL_DATA]/mkspecs/features
21 feature.path = $$[QT_INSTALL_DATA]/mkspecs/features
21 feature.files = $$PWD/features/qtcommercialchart.prf
22 feature.files = $$PWD/features/qtcommercialchart.prf
22 INSTALLS += feature
23 INSTALLS += feature
23
24
24 doc.target = doc
25 doc.target = doc
25 win32:{
26 win32:{
26 doc.commands = qdoc3 $$CHART_BUILD_DOC_DIR\\qcharts.qdocconf
27 doc.commands = qdoc3 $$CHART_BUILD_DOC_DIR\\qcharts.qdocconf
27 }else{
28 }else{
28 doc.commands = qdoc3 $$CHART_BUILD_DOC_DIR/qcharts.qdocconf
29 doc.commands = qdoc3 $$CHART_BUILD_DOC_DIR/qcharts.qdocconf
29 }
30 }
30 doc.depends = FORCE
31 doc.depends = FORCE
31 QMAKE_EXTRA_TARGETS += doc
32 QMAKE_EXTRA_TARGETS += doc
@@ -1,54 +1,49
1 integrated_build:{
1 integrated_build:{
2 message('Running integrated build against local libs...')
3 INCLUDEPATH += $$CHART_BUILD_PUBLIC_HEADER_DIR
2 INCLUDEPATH += $$CHART_BUILD_PUBLIC_HEADER_DIR
4
3
5 !win32: {
4 !win32: {
6 LIBS += -L $$CHART_BUILD_LIB_DIR -Wl,-rpath,$$CHART_BUILD_LIB_DIR
5 LIBS += -L $$CHART_BUILD_LIB_DIR -Wl,-rpath,$$CHART_BUILD_LIB_DIR
7 }else{
6 }else{
8 win32-msvc*: {
7 win32-msvc*: {
9 # hack fix for error:
8 # hack fix for error:
10 # "LINK : fatal error LNK1146: no argument specified with option '/LIBPATH:'"
9 # "LINK : fatal error LNK1146: no argument specified with option '/LIBPATH:'"
11 QMAKE_LIBDIR += $$CHART_BUILD_LIB_DIR
10 QMAKE_LIBDIR += $$CHART_BUILD_LIB_DIR
12 }else{
11 }else{
13 LIBS += -L $$CHART_BUILD_LIB_DIR
12 LIBS += -L $$CHART_BUILD_LIB_DIR
14 }
13 }
15 }
14 }
16
15
17 CONFIG(debug, debug|release) {
16 CONFIG(debug, debug|release) {
18 LIBS += -lQtCommercialChartd
17 LIBS += -lQtCommercialChartd
19 #this is ugly hack to work around missing rpath, it simply copies lib
18 #this is ugly hack to work around missing rpath, it simply copies lib
20 win32:{
19 win32:{
21 copylib.target = $$CHART_BUILD_BIN_DIR/QtCommercialChartd.dll
20 copylib.target = $$CHART_BUILD_BIN_DIR/QtCommercialChartd.dll
22 copylib.commands = $$QMAKE_COPY $$CHART_BUILD_LIB_DIR\\QtCommercialChartd.dll $$CHART_BUILD_BIN_DIR
21 copylib.commands = $$QMAKE_COPY $$CHART_BUILD_LIB_DIR\\QtCommercialChartd.dll $$CHART_BUILD_BIN_DIR
23 copylib.depends = $$CHART_BUILD_LIB_DIR/QtCommercialChartd.dll
22 copylib.depends = $$CHART_BUILD_LIB_DIR/QtCommercialChartd.dll
24 PRE_TARGETDEPS += $$CHART_BUILD_BIN_DIR/QtCommercialChartd.dll
23 PRE_TARGETDEPS += $$CHART_BUILD_BIN_DIR/QtCommercialChartd.dll
25 QMAKE_EXTRA_TARGETS +=copylib
24 QMAKE_EXTRA_TARGETS +=copylib
26 }
25 }
27 } else {
26 } else {
28 LIBS += -lQtCommercialChart
27 LIBS += -lQtCommercialChart
29
28
30 #this is ugly hack to work around missing rpath, it simply copies lib
29 #this is ugly hack to work around missing rpath, it simply copies lib
31 win32: {
30 win32: {
32 copylib.target = $$CHART_BUILD_BIN_DIR/QtCommercialChart
31 copylib.target = $$CHART_BUILD_BIN_DIR/QtCommercialChart
33 copylib.commands = $$QMAKE_COPY $$CHART_BUILD_LIB_DIR\\QtCommercialChart.dll $$CHART_BUILD_BIN_DIR
32 copylib.commands = $$QMAKE_COPY $$CHART_BUILD_LIB_DIR\\QtCommercialChart.dll $$CHART_BUILD_BIN_DIR
34 copylib.depends = $$CHART_BUILD_LIB_DIR/QtCommercialChart.dll
33 copylib.depends = $$CHART_BUILD_LIB_DIR/QtCommercialChart.dll
35 PRE_TARGETDEPS += $$CHART_BUILD_BIN_DIR/QtCommercialChart
34 PRE_TARGETDEPS += $$CHART_BUILD_BIN_DIR/QtCommercialChart
36 QMAKE_EXTRA_TARGETS +=copylib
35 QMAKE_EXTRA_TARGETS +=copylib
37 }
36 }
38 }
37 }
39
38
40 mac: {
39 mac: {
41 # This is a hack to make binaries to use the internal version of the QtCommercial Charts library on OSX
40 # This is a hack to make binaries to use the internal version of the QtCommercial Charts library on OSX
42 QMAKE_POST_LINK += install_name_tool -change "libQtCommercialChartd.1.dylib" "@rpath/libQtCommercialChartd.dylib" $$CHART_BUILD_BIN_DIR/chartwidgettest.app/Contents/MacOS/chartwidgettest
41 exists($$CHART_BUILD_BIN_DIR"/"$$TARGET".app/Contents/MacOS/"$$TARGET) {
43 QMAKE_POST_LINK += && install_name_tool -change "libQtCommercialChartd.1.dylib" "@rpath/libQtCommercialChartd.dylib" $$CHART_BUILD_BIN_DIR/barchart.app/Contents/MacOS/barchart
42 QMAKE_POST_LINK+=install_name_tool -change "libQtCommercialChartd.1.dylib" $$CHART_BUILD_LIB_DIR"/libQtCommercialChartd.dylib" $$CHART_BUILD_BIN_DIR"/"$$TARGET".app/Contents/MacOS/"$$TARGET
44 QMAKE_POST_LINK += && install_name_tool -change "libQtCommercialChartd.1.dylib" "@rpath/libQtCommercialChartd.dylib" $$CHART_BUILD_BIN_DIR/colorlineChart.app/Contents/MacOS/colorlineChart
43 message($$QMAKE_POST_LINK)
45 QMAKE_POST_LINK += && install_name_tool -change "libQtCommercialChartd.1.dylib" "@rpath/libQtCommercialChartd.dylib" $$CHART_BUILD_BIN_DIR/lineChart.app/Contents/MacOS/lineChart
44 }
46 QMAKE_POST_LINK += && install_name_tool -change "libQtCommercialChartd.1.dylib" "@rpath/libQtCommercialChartd.dylib" $$CHART_BUILD_BIN_DIR/percentbarchart.app/Contents/MacOS/percentbarchart
47 QMAKE_POST_LINK += && install_name_tool -change "libQtCommercialChartd.1.dylib" "@rpath/libQtCommercialChartd.dylib" $$CHART_BUILD_BIN_DIR/stackedbarchart.app/Contents/MacOS/stackedbarchart
48 QMAKE_POST_LINK += && install_name_tool -change "libQtCommercialChartd.1.dylib" "@rpath/libQtCommercialChartd.dylib" $$CHART_BUILD_BIN_DIR/zoomLineChart.app/Contents/MacOS/zoomLineChart
49 }
45 }
50
46
51 } else {
47 } else {
52 message('Running build aginst system libs...')
53 CONFIG+=qtcommercialchart
48 CONFIG+=qtcommercialchart
54 }
49 }
General Comments 0
You need to be logged in to leave comments. Login now