##// END OF EJS Templates
Fix build for iOS and for building the QtQuick 2 plugin statically...
Andy Shaw -
r2680:743754a36d25
parent child
Show More
@@ -1,6 +1,7
1 ##################### LIB #################################################
1 ##################### LIB #################################################
2
2
3 LIBRARY_NAME = QtCommercialChart
3 LIBRARY_NAME = QtCommercialChart
4 ios:CONFIG(iphonesimulator, iphonesimulator|iphoneos):LIBRARY_NAME = $$join(LIBRARY_NAME,,,_iphonesimulator)
4 CONFIG(debug, debug|release) {
5 CONFIG(debug, debug|release) {
5 mac: LIBRARY_NAME = $$join(LIBRARY_NAME,,,_debug)
6 mac: LIBRARY_NAME = $$join(LIBRARY_NAME,,,_debug)
6 win32: LIBRARY_NAME = $$join(LIBRARY_NAME,,,d)
7 win32: LIBRARY_NAME = $$join(LIBRARY_NAME,,,d)
@@ -10,7 +11,7 LIBS += -l$$LIBRARY_NAME
10
11
11 # This will undefine Q_DECL_EXPORT/Q_DECL_IMPORT at qchartglobal.h
12 # This will undefine Q_DECL_EXPORT/Q_DECL_IMPORT at qchartglobal.h
12 # They should not be used for staticlib builds.
13 # They should not be used for staticlib builds.
13 staticlib:DEFINES+=QTCOMMERCIALCHART_STATICLIB
14 static|staticlib:DEFINES+=QTCOMMERCIALCHART_STATICLIB
14
15
15 #################### COVERAGE #################################################################
16 #################### COVERAGE #################################################################
16 coverage: CONFIG += debug
17 coverage: CONFIG += debug
@@ -78,7 +79,7 contains(QMAKE_HOST.os, Windows) {
78 CHART_BUILD_LIB_DIR = $$replace(CHART_BUILD_LIB_DIR, "/","\\")
79 CHART_BUILD_LIB_DIR = $$replace(CHART_BUILD_LIB_DIR, "/","\\")
79 }
80 }
80
81
81 macx: {
82 macx:!ios {
82 # Some Qt versions use an incompatible configuration on OSX which makes the build fail.
83 # Some Qt versions use an incompatible configuration on OSX which makes the build fail.
83 # As a work-around, set the minimum OSX version to 10.5.
84 # As a work-around, set the minimum OSX version to 10.5.
84 QMAKE_CXXFLAGS *= -mmacosx-version-min=10.5
85 QMAKE_CXXFLAGS *= -mmacosx-version-min=10.5
@@ -3,11 +3,12
3 }
3 }
4
4
5 DESTDIR = $$CHART_BUILD_BIN_DIR
5 DESTDIR = $$CHART_BUILD_BIN_DIR
6 !ios {
6 OBJECTS_DIR = $$CHART_BUILD_DIR/demos/$$TARGET
7 OBJECTS_DIR = $$CHART_BUILD_DIR/demos/$$TARGET
7 MOC_DIR = $$CHART_BUILD_DIR/demos/$$TARGET
8 MOC_DIR = $$CHART_BUILD_DIR/demos/$$TARGET
8 UI_DIR = $$CHART_BUILD_DIR/demos/$$TARGET
9 UI_DIR = $$CHART_BUILD_DIR/demos/$$TARGET
9 RCC_DIR = $$CHART_BUILD_DIR/demos/$$TARGET
10 RCC_DIR = $$CHART_BUILD_DIR/demos/$$TARGET
10
11 }
11 TEMPLATE = app
12 TEMPLATE = app
12 QT += core gui
13 QT += core gui
13 greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
14 greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
@@ -3,11 +3,12
3 }
3 }
4
4
5 DESTDIR = $$CHART_BUILD_BIN_DIR
5 DESTDIR = $$CHART_BUILD_BIN_DIR
6 !ios {
6 OBJECTS_DIR = $$CHART_BUILD_DIR/examples/$$TARGET
7 OBJECTS_DIR = $$CHART_BUILD_DIR/examples/$$TARGET
7 MOC_DIR = $$CHART_BUILD_DIR/examples/$$TARGET
8 MOC_DIR = $$CHART_BUILD_DIR/examples/$$TARGET
8 UI_DIR = $$CHART_BUILD_DIR/examples/$$TARGET
9 UI_DIR = $$CHART_BUILD_DIR/examples/$$TARGET
9 RCC_DIR = $$CHART_BUILD_DIR/examples/$$TARGET
10 RCC_DIR = $$CHART_BUILD_DIR/examples/$$TARGET
10
11 }
11 TEMPLATE = app
12 TEMPLATE = app
12 QT += core gui
13 QT += core gui
13 greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
14 greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
@@ -9,7 +9,7 contains(DEFINES, CHARTS_FOR_QUICK2) {
9 }
9 }
10
10
11 INCLUDEPATH += $$CHART_BUILD_PRIVATE_HEADER_DIR
11 INCLUDEPATH += $$CHART_BUILD_PRIVATE_HEADER_DIR
12
12 ios:CONFIG(iphonesimulator, iphonesimulator|iphoneos):TARGET = $$join(TARGET,,,_iphonesimulator)
13 CONFIG(debug, debug|release) {
13 CONFIG(debug, debug|release) {
14 mac: TARGET = $$join(TARGET,,,_debug)
14 mac: TARGET = $$join(TARGET,,,_debug)
15 win32: TARGET = $$join(TARGET,,,d)
15 win32: TARGET = $$join(TARGET,,,d)
@@ -241,10 +241,10 public:
241 }
241 }
242 };
242 };
243
243
244 #include "plugin.moc"
245
246 QTCOMMERCIALCHART_END_NAMESPACE
244 QTCOMMERCIALCHART_END_NAMESPACE
247
245
246 #include "plugin.moc"
247
248 QTCOMMERCIALCHART_USE_NAMESPACE
248 QTCOMMERCIALCHART_USE_NAMESPACE
249
249
250 #if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0))
250 #if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0))
@@ -1,2 +1,3
1 module QtCommercial.Chart
1 module QtCommercial.Chart
2 plugin qtcommercialchartqml2
2 plugin qtcommercialchartqml2
3 classname ChartQmlPlugin
@@ -7,4 +7,5 DEFINES += CHARTS_FOR_QUICK2
7 error( "Couldn't find the declarative.pri file!" )
7 error( "Couldn't find the declarative.pri file!" )
8 }
8 }
9 qmldir.files += plugins.qmltypes
9 qmldir.files += plugins.qmltypes
10
10 TARGETPATH = QtCommercial.Chart
11 QMAKE_MOC_OPTIONS += -Muri=$$TARGETPATH
@@ -186,7 +186,7 win32:{
186 INSTALLS += target
186 INSTALLS += target
187 }
187 }
188
188
189 mac: !staticlib: {
189 mac: !static:!staticlib {
190 # Update the name (id) of the library on OSX to point to the lib path
190 # Update the name (id) of the library on OSX to point to the lib path
191 MAC_CHARTS_LIB_NAME = "lib"$$LIBRARY_NAME".1.dylib"
191 MAC_CHARTS_LIB_NAME = "lib"$$LIBRARY_NAME".1.dylib"
192 QMAKE_POST_LINK += "install_name_tool -id $$CHART_BUILD_LIB_DIR"/"$$MAC_CHARTS_LIB_NAME $$CHART_BUILD_LIB_DIR"/"$$MAC_CHARTS_LIB_NAME"
192 QMAKE_POST_LINK += "install_name_tool -id $$CHART_BUILD_LIB_DIR"/"$$MAC_CHARTS_LIB_NAME $$CHART_BUILD_LIB_DIR"/"$$MAC_CHARTS_LIB_NAME"
General Comments 0
You need to be logged in to leave comments. Login now