@@ -1,10 +1,14 | |||
|
1 | 1 | !include( ../examples.pri ) { |
|
2 | 2 | error( "Couldn't find the examples.pri file!" ) |
|
3 | 3 | } |
|
4 | 4 | |
|
5 | 5 | QT+= sql |
|
6 | 6 | TARGET = gdpbarchart |
|
7 | 7 | SOURCES += main.cpp\ |
|
8 | 8 | widget.cpp |
|
9 | 9 | HEADERS += widget.h |
|
10 | QMAKE_POST_LINK += $$QMAKE_COPY gdpData $$CHART_BUILD_BIN_DIR | |
|
10 | ||
|
11 | !mac { | |
|
12 | # TODO: QMAKE_POST_LINK does not work on mac; how to copy the data file? | |
|
13 | QMAKE_POST_LINK += $$QMAKE_COPY gdpData $$CHART_BUILD_BIN_DIR | |
|
14 | } |
@@ -1,49 +1,49 | |||
|
1 | 1 | integrated_build:{ |
|
2 | 2 | INCLUDEPATH += $$CHART_BUILD_PUBLIC_HEADER_DIR |
|
3 | 3 | |
|
4 | 4 | !win32: { |
|
5 | 5 | LIBS += -L $$CHART_BUILD_LIB_DIR -Wl,-rpath,$$CHART_BUILD_LIB_DIR |
|
6 | 6 | }else{ |
|
7 | 7 | win32-msvc*: { |
|
8 | 8 | # hack fix for error: |
|
9 | 9 | # "LINK : fatal error LNK1146: no argument specified with option '/LIBPATH:'" |
|
10 | 10 | QMAKE_LIBDIR += $$CHART_BUILD_LIB_DIR |
|
11 | 11 | }else{ |
|
12 | 12 | LIBS += -L $$CHART_BUILD_LIB_DIR |
|
13 | 13 | } |
|
14 | 14 | } |
|
15 | 15 | |
|
16 | 16 | CONFIG(debug, debug|release) { |
|
17 | 17 | LIBS += -lQtCommercialChartd |
|
18 | 18 | #this is ugly hack to work around missing rpath, it simply copies lib |
|
19 | 19 | win32:{ |
|
20 | 20 | copylib.target = $$CHART_BUILD_BIN_DIR/QtCommercialChartd.dll |
|
21 | 21 | copylib.commands = $$QMAKE_COPY $$CHART_BUILD_LIB_DIR\\QtCommercialChartd.dll $$CHART_BUILD_BIN_DIR |
|
22 | 22 | copylib.depends = $$CHART_BUILD_LIB_DIR/QtCommercialChartd.dll |
|
23 | 23 | PRE_TARGETDEPS += $$CHART_BUILD_BIN_DIR/QtCommercialChartd.dll |
|
24 | 24 | QMAKE_EXTRA_TARGETS +=copylib |
|
25 | 25 | } |
|
26 | 26 | } else { |
|
27 | 27 | LIBS += -lQtCommercialChart |
|
28 | 28 | |
|
29 | 29 | #this is ugly hack to work around missing rpath, it simply copies lib |
|
30 | 30 | win32: { |
|
31 | 31 | copylib.target = $$CHART_BUILD_BIN_DIR/QtCommercialChart |
|
32 | 32 | copylib.commands = $$QMAKE_COPY $$CHART_BUILD_LIB_DIR\\QtCommercialChart.dll $$CHART_BUILD_BIN_DIR |
|
33 | 33 | copylib.depends = $$CHART_BUILD_LIB_DIR/QtCommercialChart.dll |
|
34 | 34 | PRE_TARGETDEPS += $$CHART_BUILD_BIN_DIR/QtCommercialChart |
|
35 | 35 | QMAKE_EXTRA_TARGETS +=copylib |
|
36 | 36 | } |
|
37 | 37 | } |
|
38 | 38 | |
|
39 | 39 | mac: { |
|
40 | 40 | # This is a hack to make binaries to use the internal version of the QtCommercial Charts library on OSX |
|
41 | 41 | exists($$CHART_BUILD_BIN_DIR"/"$$TARGET".app/Contents/MacOS/"$$TARGET) { |
|
42 | 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 |
|
43 | message($$QMAKE_POST_LINK) | |
|
43 | #message($$QMAKE_POST_LINK) | |
|
44 | 44 | } |
|
45 | 45 | } |
|
46 | 46 | |
|
47 | 47 | } else { |
|
48 | 48 | CONFIG+=qtcommercialchart |
|
49 | 49 | } |
General Comments 0
You need to be logged in to leave comments.
Login now