##// END OF EJS Templates
OSX install name tool now executed only on QtCommercialChart library during build
Tero Ahola -
r1419:9a2b5d956bb6
parent child
Show More
@@ -79,25 +79,9 development_build: {
79 CONFIG(debug, debug|release) {
79 CONFIG(debug, debug|release) {
80 mac: LIBRARY_NAME = $$join(LIBRARY_NAME,,,_debug)
80 mac: LIBRARY_NAME = $$join(LIBRARY_NAME,,,_debug)
81 win32: LIBRARY_NAME = $$join(LIBRARY_NAME,,,d)
81 win32: LIBRARY_NAME = $$join(LIBRARY_NAME,,,d)
82 }
83
84 LIBS += -l$$LIBRARY_NAME
85
86 mac: {
87 # This is a hack; we define variables for easier install_name_tool calls from project files of OSX executables/libraries
88 # install_name_tool is used to update the dependencies to chart library to match the local build folder
89 MAC_CHARTS_LIB_NAME = "lib"$$LIBRARY_NAME".1.dylib"
90 CONFIG(debug, debug|release) {
91 MAC_CHARTS_LIB_NAME = "lib"$$LIBRARY_NAME".1.dylib"
92 }
93 MAC_POST_LINK_PREFIX = install_name_tool -change $$MAC_CHARTS_LIB_NAME $$CHART_BUILD_LIB_DIR"/"$$MAC_CHARTS_LIB_NAME
94 MAC_DEMOS_BIN_DIR = $$CHART_BUILD_BIN_DIR"/"$$TARGET".app/Contents/MacOS/"$$TARGET
95 MAC_EXAMPLES_BIN_DIR = $$CHART_BUILD_BIN_DIR"/"$$TARGET".app/Contents/MacOS/"$$TARGET
96 MAC_TESTS_BIN_DIR = $$CHART_BUILD_BIN_DIR"/"$$TARGET".app/Contents/MacOS/"$$TARGET
97 MAC_AUTOTESTS_BIN_DIR = $$CHART_BUILD_BIN_DIR"/tst_"$$TARGET".app/Contents/MacOS/tst_"$$TARGET
98 MAC_PLUGINS_BIN_DIR = $$CHART_BUILD_PLUGIN_DIR"/lib"$$TARGET".dylib"
99 }
82 }
100
83
84 LIBS += -l$$LIBRARY_NAME
101 } else {
85 } else {
102 CONFIG += qtcommercialchart
86 CONFIG += qtcommercialchart
103 }
87 }
@@ -2,11 +2,3
2 TARGET = chartthemes
2 TARGET = chartthemes
3 SOURCES = main.cpp themewidget.cpp
3 SOURCES = main.cpp themewidget.cpp
4 HEADERS = themewidget.h
4 HEADERS = themewidget.h
5
6 # This is a hack to make binaries to use the internal version of the QtCommercial Charts library on OSX
7 #CHARTS_LIB_NAME = "lib"$$LIBRARY_NAME".1.dylib"
8 #CONFIG(debug, debug|release) {
9 # CHARTS_LIB_NAME = "lib"$$LIBRARY_NAME".1.dylib"
10 #}
11
12 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_DEMOS_BIN_DIR"
@@ -2,5 +2,3
2 TARGET = dynamicspline
2 TARGET = dynamicspline
3 HEADERS += chart.h
3 HEADERS += chart.h
4 SOURCES += main.cpp chart.cpp
4 SOURCES += main.cpp chart.cpp
5
6 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_DEMOS_BIN_DIR"
@@ -13,6 +13,3 HEADERS += \
13 brushtool.h \
13 brushtool.h \
14 customslice.h \
14 customslice.h \
15 mainwidget.h
15 mainwidget.h
16
17 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_DEMOS_BIN_DIR"
18
@@ -6,5 +6,3 RESOURCES += resources.qrc
6 SOURCES += main.cpp
6 SOURCES += main.cpp
7
7
8 include(qmlapplicationviewer/qmlapplicationviewer.pri)
8 include(qmlapplicationviewer/qmlapplicationviewer.pri)
9
10 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_DEMOS_BIN_DIR"
@@ -6,5 +6,3 RESOURCES += resources.qrc
6 SOURCES += main.cpp
6 SOURCES += main.cpp
7
7
8 include(qmlapplicationviewer/qmlapplicationviewer.pri)
8 include(qmlapplicationviewer/qmlapplicationviewer.pri)
9
10 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_DEMOS_BIN_DIR"
@@ -10,5 +10,3 HEADERS += customtablemodel.h \
10 declarativemodel.h
10 declarativemodel.h
11
11
12 include(qmlapplicationviewer/qmlapplicationviewer.pri)
12 include(qmlapplicationviewer/qmlapplicationviewer.pri)
13
14 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_DEMOS_BIN_DIR"
@@ -6,5 +6,3 RESOURCES += resources.qrc
6 SOURCES += main.cpp
6 SOURCES += main.cpp
7
7
8 include(qmlapplicationviewer/qmlapplicationviewer.pri)
8 include(qmlapplicationviewer/qmlapplicationviewer.pri)
9
10 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_DEMOS_BIN_DIR"
@@ -6,5 +6,3 RESOURCES += resources.qrc
6 SOURCES += main.cpp
6 SOURCES += main.cpp
7
7
8 include(qmlapplicationviewer/qmlapplicationviewer.pri)
8 include(qmlapplicationviewer/qmlapplicationviewer.pri)
9
10 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_DEMOS_BIN_DIR"
@@ -3,5 +3,3
3 }
3 }
4 TARGET = areachart
4 TARGET = areachart
5 SOURCES += main.cpp
5 SOURCES += main.cpp
6
7 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_EXAMPLES_BIN_DIR"
@@ -4,5 +4,3
4
4
5 TARGET = barchart
5 TARGET = barchart
6 SOURCES += main.cpp
6 SOURCES += main.cpp
7
8 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_EXAMPLES_BIN_DIR"
@@ -14,5 +14,3 SOURCES += main.cpp\
14
14
15 HEADERS += tablewidget.h \
15 HEADERS += tablewidget.h \
16 customtablemodel.h
16 customtablemodel.h
17
18 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_EXAMPLES_BIN_DIR"
@@ -4,5 +4,3
4
4
5 TARGET = customchart
5 TARGET = customchart
6 SOURCES += main.cpp
6 SOURCES += main.cpp
7
8 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_EXAMPLES_BIN_DIR"
@@ -4,5 +4,3
4
4
5 TARGET = groupedbarchart
5 TARGET = groupedbarchart
6 SOURCES += main.cpp
6 SOURCES += main.cpp
7
8 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_EXAMPLES_BIN_DIR"
@@ -6,7 +6,5 TARGET = legend
6 SOURCES += main.cpp \
6 SOURCES += main.cpp \
7 mainwidget.cpp
7 mainwidget.cpp
8
8
9 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_EXAMPLES_BIN_DIR"
10
11 HEADERS += \
9 HEADERS += \
12 mainwidget.h
10 mainwidget.h
@@ -3,5 +3,3
3 }
3 }
4 TARGET = linechart
4 TARGET = linechart
5 SOURCES += main.cpp
5 SOURCES += main.cpp
6
7 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_EXAMPLES_BIN_DIR"
@@ -14,5 +14,3 SOURCES += main.cpp\
14
14
15 HEADERS += tablewidget.h \
15 HEADERS += tablewidget.h \
16 customtablemodel.h
16 customtablemodel.h
17
18 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_EXAMPLES_BIN_DIR"
@@ -4,5 +4,3
4
4
5 TARGET = percentbarchart
5 TARGET = percentbarchart
6 SOURCES += main.cpp
6 SOURCES += main.cpp
7
8 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_EXAMPLES_BIN_DIR"
@@ -3,5 +3,3
3 }
3 }
4 TARGET = piechart
4 TARGET = piechart
5 SOURCES += main.cpp
5 SOURCES += main.cpp
6
7 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_EXAMPLES_BIN_DIR"
@@ -9,5 +9,3 SOURCES += main.cpp \
9 HEADERS += \
9 HEADERS += \
10 drilldownchart.h \
10 drilldownchart.h \
11 drilldownslice.h
11 drilldownslice.h
12
13 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_EXAMPLES_BIN_DIR"
@@ -4,5 +4,3
4 TARGET = presenterchart
4 TARGET = presenterchart
5 HEADERS += chartview.h
5 HEADERS += chartview.h
6 SOURCES += main.cpp chartview.cpp
6 SOURCES += main.cpp chartview.cpp
7
8 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_EXAMPLES_BIN_DIR"
@@ -7,5 +7,3 SOURCES += main.cpp \
7
7
8 HEADERS += \
8 HEADERS += \
9 chartview.h
9 chartview.h
10
11 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_EXAMPLES_BIN_DIR"
@@ -7,5 +7,3 SOURCES += main.cpp \
7 chartview.cpp
7 chartview.cpp
8 HEADERS += \
8 HEADERS += \
9 chartview.h
9 chartview.h
10
11 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_EXAMPLES_BIN_DIR"
@@ -3,5 +3,3
3 }
3 }
4 TARGET = splinechart
4 TARGET = splinechart
5 SOURCES += main.cpp
5 SOURCES += main.cpp
6
7 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_EXAMPLES_BIN_DIR"
@@ -3,5 +3,3
3 }
3 }
4 TARGET = stackedbarchart
4 TARGET = stackedbarchart
5 SOURCES += main.cpp
5 SOURCES += main.cpp
6
7 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_EXAMPLES_BIN_DIR"
@@ -4,5 +4,3
4 TARGET = stackedbarchartdrilldown
4 TARGET = stackedbarchartdrilldown
5 SOURCES += main.cpp drilldownseries.cpp drilldownchart.cpp
5 SOURCES += main.cpp drilldownseries.cpp drilldownchart.cpp
6 HEADERS += drilldownseries.h drilldownchart.h
6 HEADERS += drilldownseries.h drilldownchart.h
7
8 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_EXAMPLES_BIN_DIR"
@@ -5,5 +5,3 TARGET = zoomlinechart
5 HEADERS += chart.h chartview.h
5 HEADERS += chart.h chartview.h
6
6
7 SOURCES += main.cpp chart.cpp chartview.cpp
7 SOURCES += main.cpp chart.cpp chartview.cpp
8
9 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_EXAMPLES_BIN_DIR"
@@ -42,4 +42,3 INSTALLS += target qmldir
42 FILE = $$PWD/qmldir
42 FILE = $$PWD/qmldir
43 win32:{FILE = $$replace(FILE, "/","\\")}
43 win32:{FILE = $$replace(FILE, "/","\\")}
44 QMAKE_POST_LINK += $$QMAKE_COPY $$FILE $$CHART_BUILD_PLUGIN_DIR
44 QMAKE_POST_LINK += $$QMAKE_COPY $$FILE $$CHART_BUILD_PLUGIN_DIR
45 !system_build:mac: QMAKE_POST_LINK += " & $$MAC_POST_LINK_PREFIX $$MAC_PLUGINS_BIN_DIR"
@@ -166,6 +166,13 win32:{
166 target.path=$$[QT_INSTALL_LIBS]
166 target.path=$$[QT_INSTALL_LIBS]
167 INSTALLS += target
167 INSTALLS += target
168 }
168 }
169
170 mac: {
171 # Update the name (id) of the library on OSX to point to the lib dir
172 MAC_CHARTS_LIB_NAME = "lib"$$LIBRARY_NAME".1.dylib"
173 QMAKE_POST_LINK += "install_name_tool -id $$CHART_BUILD_LIB_DIR"/"$$MAC_CHARTS_LIB_NAME $$CHART_BUILD_LIB_DIR"/"$$MAC_CHARTS_LIB_NAME"
174 }
175
169 ################################ DEVELOPMENT BUILD ##########################################
176 ################################ DEVELOPMENT BUILD ##########################################
170 # There is a problem with jom.exe currently. It does not seem to understand QMAKE_EXTRA_TARGETS properly.
177 # There is a problem with jom.exe currently. It does not seem to understand QMAKE_EXTRA_TARGETS properly.
171 # This is the case at least with shadow builds.
178 # This is the case at least with shadow builds.
@@ -3,5 +3,3
3 }
3 }
4
4
5 SOURCES += tst_chartdataset.cpp
5 SOURCES += tst_chartdataset.cpp
6
7 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_AUTOTESTS_BIN_DIR"
@@ -2,5 +2,3
2 error( "Couldn't find the auto.pri file!" )
2 error( "Couldn't find the auto.pri file!" )
3 }
3 }
4 SOURCES += tst_domain.cpp
4 SOURCES += tst_domain.cpp
5
6 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_AUTOTESTS_BIN_DIR"
@@ -4,5 +4,3
4
4
5 SOURCES += \
5 SOURCES += \
6 tst_qbarmodelmapper.cpp
6 tst_qbarmodelmapper.cpp
7
8 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_AUTOTESTS_BIN_DIR"
@@ -2,5 +2,3
2 error( "Couldn't find the auto.pri file!" )
2 error( "Couldn't find the auto.pri file!" )
3 }
3 }
4 SOURCES += tst_qbarseries.cpp
4 SOURCES += tst_qbarseries.cpp
5
6 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_AUTOTESTS_BIN_DIR"
@@ -2,5 +2,3
2 error( "Couldn't find the auto.pri file!" )
2 error( "Couldn't find the auto.pri file!" )
3 }
3 }
4 SOURCES += tst_qbarset.cpp
4 SOURCES += tst_qbarset.cpp
5
6 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_AUTOTESTS_BIN_DIR"
@@ -2,5 +2,3
2 error( "Couldn't find the auto.pri file!" )
2 error( "Couldn't find the auto.pri file!" )
3 }
3 }
4 SOURCES += tst_qchart.cpp
4 SOURCES += tst_qchart.cpp
5
6 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_AUTOTESTS_BIN_DIR"
@@ -2,5 +2,3
2 error( "Couldn't find the auto.pri file!" )
2 error( "Couldn't find the auto.pri file!" )
3 }
3 }
4 SOURCES += tst_qchartview.cpp
4 SOURCES += tst_qchartview.cpp
5
6 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_AUTOTESTS_BIN_DIR"
@@ -2,5 +2,3
2 error( "Couldn't find the auto.pri file!" )
2 error( "Couldn't find the auto.pri file!" )
3 }
3 }
4 SOURCES += tst_qgroupedbarseries.cpp
4 SOURCES += tst_qgroupedbarseries.cpp
5
6 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_AUTOTESTS_BIN_DIR"
@@ -3,5 +3,3
3 }
3 }
4 HEADERS += ../qxyseries/tst_qxyseries.h
4 HEADERS += ../qxyseries/tst_qxyseries.h
5 SOURCES += tst_qlineseries.cpp ../qxyseries/tst_qxyseries.cpp
5 SOURCES += tst_qlineseries.cpp ../qxyseries/tst_qxyseries.cpp
6
7 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_AUTOTESTS_BIN_DIR"
@@ -2,5 +2,3
2 error( "Couldn't find the auto.pri file!" )
2 error( "Couldn't find the auto.pri file!" )
3 }
3 }
4 SOURCES += tst_qpercentbarseries.cpp
4 SOURCES += tst_qpercentbarseries.cpp
5
6 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_AUTOTESTS_BIN_DIR"
@@ -4,5 +4,3
4
4
5 SOURCES += \
5 SOURCES += \
6 tst_qpiemodelmapper.cpp
6 tst_qpiemodelmapper.cpp
7
8 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_AUTOTESTS_BIN_DIR"
@@ -2,5 +2,3
2 error( "Couldn't find the auto.pri file!" )
2 error( "Couldn't find the auto.pri file!" )
3 }
3 }
4 SOURCES += tst_qpieseries.cpp
4 SOURCES += tst_qpieseries.cpp
5
6 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_AUTOTESTS_BIN_DIR"
@@ -2,5 +2,3
2 error( "Couldn't find the auto.pri file!" )
2 error( "Couldn't find the auto.pri file!" )
3 }
3 }
4 SOURCES += tst_qpieslice.cpp
4 SOURCES += tst_qpieslice.cpp
5
6 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_AUTOTESTS_BIN_DIR"
@@ -2,5 +2,3
2
2
3 HEADERS += ../qxyseries/tst_qxyseries.h
3 HEADERS += ../qxyseries/tst_qxyseries.h
4 SOURCES += tst_qscatterseries.cpp ../qxyseries/tst_qxyseries.cpp
4 SOURCES += tst_qscatterseries.cpp ../qxyseries/tst_qxyseries.cpp
5
6 !system_build:mac:QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_AUTOTESTS_BIN_DIR"
@@ -3,5 +3,3
3 }
3 }
4 HEADERS += ../qxyseries/tst_qxyseries.h
4 HEADERS += ../qxyseries/tst_qxyseries.h
5 SOURCES += tst_qsplineseries.cpp ../qxyseries/tst_qxyseries.cpp
5 SOURCES += tst_qsplineseries.cpp ../qxyseries/tst_qxyseries.cpp
6
7 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_AUTOTESTS_BIN_DIR"
@@ -2,5 +2,3
2 error( "Couldn't find the auto.pri file!" )
2 error( "Couldn't find the auto.pri file!" )
3 }
3 }
4 SOURCES += tst_qstackedbarseries.cpp
4 SOURCES += tst_qstackedbarseries.cpp
5
6 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_AUTOTESTS_BIN_DIR"
@@ -4,5 +4,3
4
4
5 SOURCES += \
5 SOURCES += \
6 tst_qxymodelmapper.cpp
6 tst_qxymodelmapper.cpp
7
8 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_AUTOTESTS_BIN_DIR"
@@ -16,5 +16,3 SOURCES += main.cpp \
16 HEADERS += \
16 HEADERS += \
17 mainwidget.h \
17 mainwidget.h \
18 dataseriedialog.h
18 dataseriedialog.h
19
20 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_TESTS_BIN_DIR"
@@ -6,5 +6,3 RESOURCES += resources.qrc
6 SOURCES += main.cpp
6 SOURCES += main.cpp
7
7
8 include(qmlapplicationviewer/qmlapplicationviewer.pri)
8 include(qmlapplicationviewer/qmlapplicationviewer.pri)
9
10 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_DEMOS_BIN_DIR"
@@ -5,5 +5,3 QT+=opengl
5 TARGET = wavechart
5 TARGET = wavechart
6 SOURCES += main.cpp wavechart.cpp
6 SOURCES += main.cpp wavechart.cpp
7 HEADERS += wavechart.h
7 HEADERS += wavechart.h
8
9 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_TESTS_BIN_DIR"
General Comments 0
You need to be logged in to leave comments. Login now