improved project config
This commit is contained in:
parent
97bc020524
commit
82e21f7285
22
general.pri
22
general.pri
|
@ -13,21 +13,14 @@ unix {
|
||||||
}
|
}
|
||||||
# prefix
|
# prefix
|
||||||
targetprefix = $$(TARGET_PREFIX)
|
targetprefix = $$(TARGET_PREFIX)
|
||||||
equals(targetprefix, "") {
|
|
||||||
win32 {
|
|
||||||
targetprefix = ../../..
|
|
||||||
} else {
|
|
||||||
targetprefix = ../..
|
|
||||||
}
|
|
||||||
}
|
|
||||||
message("Using target prefix \"$${targetprefix}\".")
|
message("Using target prefix \"$${targetprefix}\".")
|
||||||
# print install root
|
# print install root
|
||||||
message("Using install root \"$$(INSTALL_ROOT)\".")
|
message("Using install root \"$$(INSTALL_ROOT)\".")
|
||||||
# target
|
# target
|
||||||
CONFIG(debug, debug|release) {
|
CONFIG(debug, debug|release) {
|
||||||
TARGET = $$targetprefix/$${projectname}d
|
TARGET = $${targetprefix}$${projectname}d
|
||||||
} else {
|
} else {
|
||||||
TARGET = $$targetprefix/$$projectname
|
TARGET = $${targetprefix}$${projectname}
|
||||||
}
|
}
|
||||||
# variables to check target architecture
|
# variables to check target architecture
|
||||||
win32-g++:QMAKE_TARGET.arch = $$QMAKE_HOST.arch
|
win32-g++:QMAKE_TARGET.arch = $$QMAKE_HOST.arch
|
||||||
|
@ -79,3 +72,14 @@ guiqtwidgets {
|
||||||
DEFINES += GUI_QTWIDGETS
|
DEFINES += GUI_QTWIDGETS
|
||||||
DEFINES += MODEL_UNDO_SUPPORT
|
DEFINES += MODEL_UNDO_SUPPORT
|
||||||
}
|
}
|
||||||
|
# configuration for cross compliation with mingw-w64
|
||||||
|
mingw-w64-manualstrip-dll {
|
||||||
|
QMAKE_POST_LINK=$${CROSS_COMPILE}strip --strip-unneeded ./release/$(TARGET); \
|
||||||
|
$${CROSS_COMPILE}strip --strip-unneeded ./release/lib$(TARGET).a
|
||||||
|
}
|
||||||
|
mingw-w64-manualstrip-exe {
|
||||||
|
QMAKE_POST_LINK=$${CROSS_COMPILE}strip --strip-unneeded ./release/$(TARGET)
|
||||||
|
}
|
||||||
|
mingw-w64-noversion {
|
||||||
|
VERSION = ""
|
||||||
|
}
|
||||||
|
|
|
@ -27,7 +27,7 @@ contains(DEFINES, PLATFORM_SPECIFIC_CAPSLOCK_DETECTION) {
|
||||||
}
|
}
|
||||||
|
|
||||||
SOURCES += resources/resources.cpp \
|
SOURCES += resources/resources.cpp \
|
||||||
models/checklistmodel.cpp \
|
models/checklistmodel.cpp \
|
||||||
resources/qtconfigarguments.cpp \
|
resources/qtconfigarguments.cpp \
|
||||||
misc/dialogutils.cpp
|
misc/dialogutils.cpp
|
||||||
|
|
||||||
|
@ -87,9 +87,18 @@ INCLUDEPATH += ../
|
||||||
RESOURCES += resources/qtutilsicons.qrc
|
RESOURCES += resources/qtutilsicons.qrc
|
||||||
|
|
||||||
# installs
|
# installs
|
||||||
target.path = $$(INSTALL_ROOT)/lib
|
mingw-w64-install {
|
||||||
INSTALLS += target
|
target.path = $$(INSTALL_ROOT)
|
||||||
for(dir, $$list(aboutdialog enterpassworddialog models resources settingsdialog widgets)) {
|
target.extra = install -m755 -D $${OUT_PWD}/release/lib$(TARGET).a $$(INSTALL_ROOT)/lib/lib$(TARGET).a
|
||||||
|
INSTALLS += target
|
||||||
|
dlltarget.path = $$(INSTALL_ROOT)
|
||||||
|
dlltarget.extra = install -m755 -D $${OUT_PWD}/release/$(TARGET) $$(INSTALL_ROOT)/bin/$(TARGET)
|
||||||
|
INSTALLS += dlltarget
|
||||||
|
} else {
|
||||||
|
target.path = $$(INSTALL_ROOT)/lib
|
||||||
|
INSTALLS += target
|
||||||
|
}
|
||||||
|
for(dir, $$list(aboutdialog enterpassworddialog models resources settingsdialog widgets misc)) {
|
||||||
eval(inc_$${dir} = $${dir})
|
eval(inc_$${dir} = $${dir})
|
||||||
inc_$${dir}.path = $$(INSTALL_ROOT)/include/$$projectname/$${dir}
|
inc_$${dir}.path = $$(INSTALL_ROOT)/include/$$projectname/$${dir}
|
||||||
inc_$${dir}.files = $${dir}/*.h
|
inc_$${dir}.files = $${dir}/*.h
|
||||||
|
|
Loading…
Reference in New Issue