config.pri
118 lines
| 3.9 KiB
| text/plain
|
TextLexer
|
r1676 | ##################### LIB ################################################# | ||
|
r34 | |||
|
r1021 | LIBRARY_NAME = QtCommercialChart | ||
|
r1439 | CONFIG(debug, debug|release) { | ||
mac: LIBRARY_NAME = $$join(LIBRARY_NAME,,,_debug) | ||||
win32: LIBRARY_NAME = $$join(LIBRARY_NAME,,,d) | ||||
} | ||||
|
r1676 | LIBS += -l$$LIBRARY_NAME | ||
# This will undefine Q_DECL_EXPORT/Q_DECL_IMPORT at qchartglobal.h | ||||
# They should not be used for staticlib builds. | ||||
staticlib:DEFINES+=QTCOMMERCIALCHART_STATICLIB | ||||
|
r1021 | |||
|
r1998 | #################### COVERAGE ################################################################# | ||
coverage: CONFIG += debug | ||||
|
r1021 | ##################### SHADOW CONFIG ################################################# | ||
|
r711 | !contains($${PWD}, $${OUT_PWD}){ | ||
|
r996 | search = "$$PWD:::" | ||
|
r2247 | temp = $$split(search,"/") | ||
|
r708 | temp = $$last(temp) | ||
path = $$replace(search,$$temp,'') | ||||
temp = $$split(OUT_PWD,$$path) | ||||
temp = $$split(temp,'/') | ||||
temp = $$first(temp) | ||||
path = "$${path}$${temp}" | ||||
|
r2247 | SHADOW=$$path | ||
|
r711 | }else{ | ||
SHADOW=$$PWD | ||||
|
r2247 | CONFIG-=development_build | ||
|
r708 | } | ||
|
r1021 | ##################### BUILD PATHS ################################################## | ||
|
r708 | CHART_BUILD_PUBLIC_HEADER_DIR = $$SHADOW/include | ||
|
r193 | CHART_BUILD_PRIVATE_HEADER_DIR = $$CHART_BUILD_PUBLIC_HEADER_DIR/private | ||
|
r708 | CHART_BUILD_LIB_DIR = $$SHADOW/lib | ||
CHART_BUILD_DIR = $$SHADOW/build | ||||
CHART_BUILD_BIN_DIR = $$SHADOW/bin | ||||
|
r1978 | CHART_BUILD_QML_PLUGIN_DIR = $$CHART_BUILD_BIN_DIR | ||
CHART_BUILD_DESIGNER_PLUGIN_DIR = $$CHART_BUILD_LIB_DIR | ||||
|
r708 | CHART_BUILD_DOC_DIR = $$SHADOW/doc | ||
|
r1978 | CONFIG(release,debug|release){ | ||
CHART_BUILD_LIB_DIR = $$CHART_BUILD_LIB_DIR/release | ||||
CHART_BUILD_BIN_DIR = $$CHART_BUILD_BIN_DIR/release | ||||
CHART_BUILD_QML_PLUGIN_DIR = $$CHART_BUILD_QML_PLUGIN_DIR/release/QtCommercial/Chart | ||||
CHART_BUILD_DESIGNER_PLUGIN_DIR = $$CHART_BUILD_LIB_DIR | ||||
} | ||||
CONFIG(debug,debug|release){ | ||||
CHART_BUILD_LIB_DIR = $$CHART_BUILD_LIB_DIR/debug | ||||
CHART_BUILD_BIN_DIR = $$CHART_BUILD_BIN_DIR/debug | ||||
CHART_BUILD_QML_PLUGIN_DIR = $$CHART_BUILD_QML_PLUGIN_DIR/debug/QtCommercial/Chart | ||||
CHART_BUILD_DESIGNER_PLUGIN_DIR = $$CHART_BUILD_LIB_DIR | ||||
} | ||||
|
r1433 | # Use own folders for debug and release builds | ||
|
r1676 | |||
CONFIG(debug, debug|release):CHART_BUILD_DIR = $$join(CHART_BUILD_DIR,,,/debug) | ||||
CONFIG(release, debug|release): CHART_BUILD_DIR = $$join(CHART_BUILD_DIR,,,/release) | ||||
|
r1433 | |||
|
r2458 | contains(QMAKE_HOST.os, Windows) { | ||
|
r193 | CHART_BUILD_PUBLIC_HEADER_DIR = $$replace(CHART_BUILD_PUBLIC_HEADER_DIR, "/","\\") | ||
CHART_BUILD_PRIVATE_HEADER_DIR = $$replace(CHART_BUILD_PRIVATE_HEADER_DIR, "/","\\") | ||||
|
r120 | CHART_BUILD_BUILD_DIR = $$replace(CHART_BUILD_BUILD_DIR, "/","\\") | ||
CHART_BUILD_BIN_DIR = $$replace(CHART_BUILD_BIN_DIR, "/","\\") | ||||
|
r1978 | CHART_BUILD_QML_PLUGIN_DIR = $$replace(CHART_BUILD_QML_PLUGIN_DIR, "/","\\") | ||
CHART_BUILD_DESIGNER_PLUGIN_DIR = $$replace(CHART_BUILD_DESIGNER_PLUGIN_DIR, "/","\\") | ||||
|
r307 | CHART_BUILD_DOC_DIR = $$replace(CHART_BUILD_DOC_DIR, "/","\\") | ||
|
r1042 | CHART_BUILD_LIB_DIR = $$replace(CHART_BUILD_LIB_DIR, "/","\\") | ||
|
r37 | } | ||
|
r33 | |||
|
r100 | mac: { | ||
|
r1912 | # Some Qt versions use an incompatible configuration on OSX which makes the build fail. | ||
# As a work-around, set the minimum OSX version to 10.5. | ||||
|
r100 | QMAKE_CXXFLAGS *= -mmacosx-version-min=10.5 | ||
QMAKE_LFLAGS *= -mmacosx-version-min=10.5 | ||||
} | ||||
|
r996 | |||
|
r1867 | linux-arm*: { | ||
DEFINES+=QT_ON_ARM | ||||
} | ||||
|
r1676 | ##################### INCLUDES ############################################################ | ||
|
r1021 | |||
|
r1439 | INCLUDEPATH += $$CHART_BUILD_PUBLIC_HEADER_DIR | ||
|
r1021 | |||
|
r1439 | !win32: { | ||
|
r1775 | LIBS += -L$$CHART_BUILD_LIB_DIR -Wl,-rpath,$$CHART_BUILD_LIB_DIR | ||
|
r1439 | } else { | ||
win32-msvc*: { | ||||
# hack fix for error: | ||||
# "LINK : fatal error LNK1146: no argument specified with option '/LIBPATH:'" | ||||
QMAKE_LIBDIR += $$CHART_BUILD_LIB_DIR | ||||
|
r1431 | } else { | ||
|
r1775 | LIBS += -L$$CHART_BUILD_LIB_DIR | ||
|
r1021 | } | ||
|
r1034 | } | ||
|
r1050 | |||
|
r1676 | ##################### DEVELOPMENT BUILD ################################################### | ||
|
r1439 | |||
|
r1676 | development_build: { | ||
DEFINES+=DEVELOPMENT_BUILD | ||||
CONFIG+=debug_and_release | ||||
CONFIG+=build_all | ||||
} | ||||
|
r1440 | |||
|
r1050 | ##################### UNIT TESTS ############################################################## | ||
CONFIG(debug, debug|release) { | ||||
DEFINES+=BUILD_PRIVATE_UNIT_TESTS | ||||
} | ||||
|
r1087 | |||