config.pri
114 lines
| 4.1 KiB
| text/plain
|
TextLexer
Michal Klocek
|
r34 | ||
Michal Klocek
|
r1021 | LIBRARY_NAME = QtCommercialChart | |
##################### SHADOW CONFIG ################################################# | |||
Michal Klocek
|
r711 | !contains($${PWD}, $${OUT_PWD}){ | |
Michal Klocek
|
r996 | search = "$$PWD:::" | |
Michal Klocek
|
r708 | temp = $$split(search,"/") | |
temp = $$last(temp) | |||
path = $$replace(search,$$temp,'') | |||
temp = $$split(OUT_PWD,$$path) | |||
temp = $$split(temp,'/') | |||
temp = $$first(temp) | |||
path = "$${path}$${temp}" | |||
Michal Klocek
|
r996 | SHADOW=$$path | |
Michal Klocek
|
r711 | }else{ | |
SHADOW=$$PWD | |||
Michal Klocek
|
r998 | CONFIG-=development_build | |
Michal Klocek
|
r708 | } | |
Michal Klocek
|
r1021 | ##################### BUILD PATHS ################################################## | |
Michal Klocek
|
r708 | CHART_BUILD_PUBLIC_HEADER_DIR = $$SHADOW/include | |
Michal Klocek
|
r193 | CHART_BUILD_PRIVATE_HEADER_DIR = $$CHART_BUILD_PUBLIC_HEADER_DIR/private | |
Michal Klocek
|
r708 | CHART_BUILD_LIB_DIR = $$SHADOW/lib | |
CHART_BUILD_DIR = $$SHADOW/build | |||
CHART_BUILD_BIN_DIR = $$SHADOW/bin | |||
Michal Klocek
|
r1021 | CHART_BUILD_PLUGIN_DIR = $$CHART_BUILD_BIN_DIR/QtCommercial/Chart | |
Michal Klocek
|
r708 | CHART_BUILD_DOC_DIR = $$SHADOW/doc | |
Michal Klocek
|
r37 | win32:{ | |
Michal Klocek
|
r193 | CHART_BUILD_PUBLIC_HEADER_DIR = $$replace(CHART_BUILD_PUBLIC_HEADER_DIR, "/","\\") | |
CHART_BUILD_PRIVATE_HEADER_DIR = $$replace(CHART_BUILD_PRIVATE_HEADER_DIR, "/","\\") | |||
Tero Ahola
|
r120 | CHART_BUILD_BUILD_DIR = $$replace(CHART_BUILD_BUILD_DIR, "/","\\") | |
CHART_BUILD_BIN_DIR = $$replace(CHART_BUILD_BIN_DIR, "/","\\") | |||
Michal Klocek
|
r255 | CHART_BUILD_PLUGIN_DIR = $$replace(CHART_BUILD_PLUGIN_DIR, "/","\\") | |
Michal Klocek
|
r307 | CHART_BUILD_DOC_DIR = $$replace(CHART_BUILD_DOC_DIR, "/","\\") | |
Michal Klocek
|
r1021 | CHART_BUILD_LIB_DIR = CHART_BUILD_BIN_DIR | |
Michal Klocek
|
r37 | } | |
Michal Klocek
|
r33 | ||
Tero Ahola
|
r100 | mac: { | |
# TODO: The following qmake flags are a work-around to make QtCommercial Charts compile on | |||
# QtCommercial 4.8. On the other hand Charts builds successfully with Qt open source 4.8 | |||
# without these definitions, so this is probably a configuration issue on QtCommercial 4.8; | |||
# it should probably define the minimum OSX version to be 10.5... | |||
QMAKE_CXXFLAGS *= -mmacosx-version-min=10.5 | |||
QMAKE_LFLAGS *= -mmacosx-version-min=10.5 | |||
} | |||
Michal Klocek
|
r996 | ||
Michal Klocek
|
r1021 | ##################### DEVELOPMENT BUILD ################################################### | |
Michal Klocek
|
r998 | development_build: { | |
DEFINES+=DEVELOPMENT_BUILD | |||
Michal Klocek
|
r1000 | CONFIG+=debug_and_release | |
Michal Klocek
|
r1021 | } | |
##################### BUILD CONFIG ######################################################## | |||
!system_build:{ | |||
INCLUDEPATH += $$CHART_BUILD_PUBLIC_HEADER_DIR | |||
!win32: { | |||
LIBS += -L $$CHART_BUILD_LIB_DIR -Wl,-rpath,$$CHART_BUILD_LIB_DIR | |||
}else{ | |||
win32-msvc*: { | |||
# hack fix for error: | |||
# "LINK : fatal error LNK1146: no argument specified with option '/LIBPATH:'" | |||
QMAKE_LIBDIR += $$CHART_BUILD_LIB_DIR | |||
}else{ | |||
LIBS += -L $$CHART_BUILD_LIB_DIR | |||
} | |||
} | |||
CONFIG(debug, debug|release) { | |||
mac: LIBRARY_NAME = $$join(LIBRARY_NAME,,,_debug) | |||
win32: LIBRARY_NAME = $$join(LIBRARY_NAME,,,d) | |||
} | |||
LIBS += -l$$LIBRARY_NAME | |||
mac: { | |||
# This is a hack to make binaries to use the internal version of the QtCommercial Charts library on OSX | |||
CHARTS_LIB_NAME = libQtCommercialChart.1.dylib | |||
CONFIG(debug, debug|release) { | |||
CHARTS_LIB_NAME = libQtCommercialChartd.1.dylib | |||
} | |||
BIN_TARGET_PATH = "" | |||
exists ($$CHART_BUILD_BIN_DIR"/"$$TARGET".app/Contents/MacOS/"$$TARGET) { | |||
BIN_TARGET_PATH = $$CHART_BUILD_BIN_DIR"/"$$TARGET".app/Contents/MacOS/"$$TARGET | |||
} | |||
exists ($$CHART_BUILD_BIN_DIR"/test/"$$TARGET".app/Contents/MacOS/"$$TARGET) { | |||
# Executable in test folder | |||
BIN_TARGET_PATH = $$CHART_BUILD_BIN_DIR"/test/"$$TARGET".app/Contents/MacOS/"$$TARGET | |||
} | |||
exists ($$CHART_BUILD_BIN_DIR"/test/tst_"$$TARGET".app/Contents/MacOS/tst_"$$TARGET) { | |||
# Executable in test folder with custom target "tst_NNN" | |||
BIN_TARGET_PATH = $$CHART_BUILD_BIN_DIR"/test/tst_"$$TARGET".app/Contents/MacOS/tst_"$$TARGET | |||
} | |||
exists($$CHART_BUILD_PLUGIN_DIR"/lib"$$TARGET".dylib") { | |||
# Plugin | |||
BIN_TARGET_PATH = $$CHART_BUILD_PLUGIN_DIR"/lib"$$TARGET".dylib" | |||
} | |||
!isEmpty (BIN_TARGET_PATH) { | |||
QMAKE_POST_LINK += install_name_tool -change $$CHARTS_LIB_NAME $$CHART_BUILD_LIB_DIR"/"$$CHARTS_LIB_NAME $$BIN_TARGET_PATH | |||
} | |||
} | |||
}else { | |||
CONFIG += qtcommercialchart | |||
Michal Klocek
|
r998 | } |