##// END OF EJS Templates
Fix compilation config for windows
Michal Klocek -
r37:58ed1b062b4f
parent child
Show More
@@ -1,14 +1,15
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 example test
6 SUBDIRS += src example test
7 CONFIG += ordered
7 CONFIG += ordered
8 QMAKE_CXXFLAGS += -g -Wall
8 QMAKE_CXXFLAGS += -g -Wall
9 QMAKE_DISTCLEAN += -r build bin
9 unix:QMAKE_DISTCLEAN += -r build bin
10 win32:QMAKE_DISTCLEAN += build bin
10
11
11 # install feature file
12 # install feature file
12 feature.path = $$[QT_INSTALL_DATA]/mkspecs/features
13 feature.path = $$[QT_INSTALL_DATA]/mkspecs/features
13 feature.files = $$PWD/features/qtcommercialchart.prf
14 feature.files = $$PWD/features/qtcommercialchart.prf
14 INSTALLS += feature
15 INSTALLS += feature
@@ -1,8 +1,16
1 CONFIG+=internal_build #remove if you want to build against installed libs
1 CONFIG+=internal_build #remove if you want to build against installed libs
2
2
3 CHART_BUILD_HEADER_DIR = $$PWD/include
3 CHART_BUILD_HEADER_DIR = $$PWD/include
4 CHART_BUILD_LIB_DIR = $$PWD/lib
4 CHART_BUILD_LIB_DIR = $$PWD/lib
5 CHART_BUILD_DIR = $$PWD/build
5 CHART_BUILD_DIR = $$PWD/build
6 CHART_BUILD_BIN = $$PWD/bin
6 CHART_BUILD_BIN = $$PWD/bin
7
7
8 # hack to fix windows builds
9
10 win32:{
11 CHART_BUILD_HEADER_DIR = $$replace(CHART_BUILD_HEADER_DIR, "/","\\")
12 CHART_BUILD_LIB_DIR = $$replace(CHART_BUILD_LIB_DIR, "/","\\")
13 CHART_BUILD_BUILD_DIR = $$replace(CHART_BUILD_BUILD_DIR, "/","\\")
14 CHART_BUILD_BIN_DIR = $$replace(CHART_BUILD_BIN_DIR, "/","\\")
15 }
8
16
@@ -1,13 +1,32
1 internal_build:{
1 internal_build:{
2 message('Internal build within charts core source tree')
2 message('Internal build within charts core source tree')
3 INCLUDEPATH += $$CHART_BUILD_HEADER_DIR
3 INCLUDEPATH += $$CHART_BUILD_HEADER_DIR
4 LIBS += -L $$CHART_BUILD_LIB_DIR -Wl,-rpath,$$CHART_BUILD_LIB_DIR
4 LIBS += -L $$CHART_BUILD_LIB_DIR -Wl,-rpath,$$CHART_BUILD_LIB_DIR
5 DESTDIR = $$CHART_BUILD_BIN
5 DESTDIR = $$CHART_BUILD_BIN
6 CONFIG(debug, debug|release) {
6 CONFIG(debug, debug|release) {
7 LIBS += -lQtCommercialChartd
7 LIBS += -lQtCommercialChartd
8
9 #this is ugly hack to work around missing rpath, it simply copies lib
10 win32:{
11 copylib.target = QtCommercialChartd.dll
12 copylib.commands = $$QMAKE_COPY $$CHART_BUILD_LIB_DIR\QtCommercialChartd.dll $$CHART_BUILD_BIN_DIR
13 copylib.depends = $$CHART_BUILD_LIB_DIR/QtCommercialChartd.dll
14 PRE_TARGETDEPS += QtCommercialChartd.dll
15 QMAKE_EXTRA_TARGETS +=copylib
16 }
17
8 } else {
18 } else {
9 LIBS += -lQtCommercialChart
19 LIBS += -lQtCommercialChart
20
21 #this is ugly hack to work around missing rpath, it simply copies lib
22 win32:{
23 copylib.target = QtCommercialChart
24 copylib.commands = $$QMAKE_COPY $$CHART_BUILD_LIB_DIR\QtCommercialChart.dll $$CHART_BUILD_BIN_DIR
25 copylib.depends = $$CHART_BUILD_LIB_DIR/QtCommercialChart.dll
26 PRE_TARGETDEPS += QtCommercialChart
27 QMAKE_EXTRA_TARGETS +=copylib
28 }
10 }
29 }
11 }else{
30 }else{
12 CONFIG+=qtcommercialchart
31 CONFIG+=qtcommercialchart
13 }
32 }
@@ -1,72 +1,73
1 !include( ../common.pri ) {
1 !include( ../common.pri ) {
2 error( Couldn't find the common.pri file! )
2 error( Couldn't find the common.pri file! )
3 }
3 }
4
4
5
5
6 TARGET = QtCommercialChart
6 TARGET = QtCommercialChart
7 DESTDIR = $$CHART_BUILD_LIB_DIR
7 DESTDIR = $$CHART_BUILD_LIB_DIR
8 TEMPLATE = lib
8 TEMPLATE = lib
9 QT += core \
9 QT += core \
10 gui
10 gui
11
11
12 CONFIG += debug_and_release
12 CONFIG += debug_and_release
13 CONFIG(debug, debug|release):TARGET = QtCommercialChartd
13 CONFIG(debug, debug|release):TARGET = QtCommercialChartd
14
14
15 SOURCES += \
15 SOURCES += \
16 xylinechart/qxychartseries.cpp \
16 xylinechart/qxychartseries.cpp \
17 xylinechart/xylinechartitem.cpp \
17 xylinechart/xylinechartitem.cpp \
18 xylinechart/xygrid.cpp \
18 xylinechart/xygrid.cpp \
19 xylinechart/xyplotdomain.cpp \
19 xylinechart/xyplotdomain.cpp \
20 qchart.cpp \
20 qchart.cpp \
21 axis.cpp \
21 axis.cpp \
22 qchartwidget.cpp
22 qchartwidget.cpp
23
23
24 PRIVATE_HEADERS += \
24 PRIVATE_HEADERS += \
25 xylinechart/xylinechartitem_p.h \
25 xylinechart/xylinechartitem_p.h \
26 xylinechart/xyplotdomain_p.h \
26 xylinechart/xyplotdomain_p.h \
27 xylinechart/xygrid_p.h \
27 xylinechart/xygrid_p.h \
28 axis_p.h
28 axis_p.h
29
29
30 PUBLIC_HEADERS += \
30 PUBLIC_HEADERS += \
31 qchartseries.h \
31 qchartseries.h \
32 qchart.h \
32 qchart.h \
33 qchartwidget.h \
33 qchartwidget.h \
34 qchartglobal.h \
34 qchartglobal.h \
35 xylinechart/qxychartseries.h
35 xylinechart/qxychartseries.h
36
36
37 HEADERS += $$PUBLIC_HEADERS
37 HEADERS += $$PUBLIC_HEADERS
38 HEADERS += $$PRIVATE_HEADERS
38 HEADERS += $$PRIVATE_HEADERS
39
39
40 INCLUDEPATH += xylinechart \
40 INCLUDEPATH += xylinechart \
41 .
41 .
42
42
43 OBJECTS_DIR = $$CHART_BUILD_DIR/lib
43 OBJECTS_DIR = $$CHART_BUILD_DIR/lib
44 MOC_DIR = $$CHART_BUILD_DIR/lib
44 MOC_DIR = $$CHART_BUILD_DIR/lib
45 UI_DIR = $$CHART_BUILD_DIR/lib
45 UI_DIR = $$CHART_BUILD_DIR/lib
46 RCC_DIR = $$CHART_BUILD_DIR/lib
46 RCC_DIR = $$CHART_BUILD_DIR/lib
47
47
48
48
49 DEFINES += QTCOMMERCIALCHART_LIBRARY
49 DEFINES += QTCOMMERCIALCHART_LIBRARY
50
50
51 public_headers.path = $$[QT_INSTALL_HEADERS]/QtCommercialChart
51 public_headers.path = $$[QT_INSTALL_HEADERS]/QtCommercialChart
52 public_headers.files = $$PUBLIC_HEADERS
52 public_headers.files = $$PUBLIC_HEADERS
53 target.path = $$[QT_INSTALL_LIBS]
53 target.path = $$[QT_INSTALL_LIBS]
54 INSTALLS += target \
54 INSTALLS += target \
55 public_headers
55 public_headers
56
56
57
57
58 install_build_headers.name = bild_headers
58 install_build_headers.name = bild_headers
59 install_build_headers.output = $$CHART_BUILD_HEADER_DIR/${QMAKE_FILE_BASE}.h
59 install_build_headers.output = $$CHART_BUILD_HEADER_DIR/${QMAKE_FILE_BASE}.h
60 install_build_headers.input = PUBLIC_HEADERS
60 install_build_headers.input = PUBLIC_HEADERS
61 install_build_headers.commands = $$QMAKE_COPY ${QMAKE_FILE_NAME} $$CHART_BUILD_HEADER_DIR
61 install_build_headers.commands = $$QMAKE_COPY ${QMAKE_FILE_NAME} $$CHART_BUILD_HEADER_DIR
62 install_build_headers.CONFIG += target_predeps no_link
62 install_build_headers.CONFIG += target_predeps no_link
63 QMAKE_EXTRA_COMPILERS += install_build_headers
63 QMAKE_EXTRA_COMPILERS += install_build_headers
64
64
65 chartversion.target = qchartversion_p.h
65 chartversion.target = qchartversion_p.h
66 chartversion.commands = @echo "build_time" > $$chartversion.target;
66 chartversion.commands = @echo "build_time" > $$chartversion.target;
67 chartversion.depends = $$HEADERS $$SOURCES
67 chartversion.depends = $$HEADERS $$SOURCES
68 PRE_TARGETDEPS += qchartversion_p.h
68 PRE_TARGETDEPS += qchartversion_p.h
69 QMAKE_CLEAN+= qchartversion_p.h
69 QMAKE_CLEAN+= qchartversion_p.h
70 QMAKE_EXTRA_TARGETS += chartversion
70 QMAKE_EXTRA_TARGETS += chartversion
71
71
72 QMAKE_DISTCLEAN += -r $$CHART_BUILD_HEADER_DIR $$CHART_BUILD_LIB_DIR No newline at end of file
72 unix:QMAKE_DISTCLEAN += -r $$CHART_BUILD_HEADER_DIR $$CHART_BUILD_LIB_DIR
73 win32:QMAKE_DISTCLEAN += $$CHART_BUILD_HEADER_DIR $$CHART_BUILD_LIB_DIR No newline at end of file
General Comments 0
You need to be logged in to leave comments. Login now