Browse Source

fixup tools for win

pull/2/head
Skycoder42 6 years ago
parent
commit
f523e1a926
No known key found for this signature in database GPG Key ID: 8E01AD9EF0578D2B
  1. 24
      mkspecs/features/qsettingsgenerator.prf
  2. 23
      mkspecs/features/qsettingstranslator.prf
  3. 2
      src/mvvmcore/mvvmcore.pro

24
mkspecs/features/qsettingsgenerator.prf

@ -2,27 +2,11 @@ isEmpty(QMAKE_QSETTINGSGENERATOR): qtPrepareTool(QMAKE_QSETTINGSGENERATOR, qsett
isEmpty(QSETTINGSGENERATOR_DIR): QSETTINGSGENERATOR_DIR = .
isEmpty(MOC_DIR): MOC_DIR = .
isEmpty(QSETTINGSTRANSLATOR_DIR): QSETTINGSTRANSLATOR_DIR = $$_PRO_FILE_PWD_/.ts-dummy
!ReleaseBuild:!DebugBuild: {
qsettingstranslator_c.name = qsettingsgenerator --translate ${QMAKE_FILE_IN}
qsettingstranslator_c.input = SETTINGS_TRANSLATIONS #TODO compability
qsettingstranslator_c.variable_out = CPP_DUMMIES
qsettingstranslator_c.commands = $$QMAKE_QSETTINGSGENERATOR --translate --in ${QMAKE_FILE_IN} --impl ${QMAKE_FILE_OUT}
qsettingstranslator_c.output = $$QSETTINGSTRANSLATOR_DIR/${QMAKE_FILE_BASE}.tsdummy$${first(QMAKE_EXT_CPP)}
qsettingstranslator_c.CONFIG += no_link
qsettingstranslator_c.depends += $$QMAKE_QSETTINGSGENERATOR_EXE
QMAKE_EXTRA_COMPILERS += qsettingstranslator_c
qtmvvm_tsgen_target.target = qtmvvm-tsgen
qtmvvm_tsgen_target.depends += compiler_qsettingstranslator_c_make_all
qtmvvm_tsgen_target.commands += @echo $$shell_quote(>>> Remember to add the line \"_never_true_condition: SOURCES += $${LITERAL_DOLLAR}$${LITERAL_DOLLAR}$${LITERAL_DOLLAR}$${LITERAL_DOLLAR}files($${LITERAL_DOLLAR}$${LITERAL_DOLLAR}$${LITERAL_DOLLAR}$${LITERAL_DOLLAR}PWD/.ts-dummy/*)\" to your pro file)
QMAKE_EXTRA_TARGETS += qtmvvm_tsgen_target
} else {
qtmvvm_tsgen_target.target = qtmvvm-tsgen
QMAKE_EXTRA_TARGETS += qtmvvm_tsgen_target
debug_and_release {
CONFIG(debug, debug|release):SUFFIX = /debug
CONFIG(release, debug|release):SUFFIX = /release
}
QSETTINGSGENERATOR_DIR = $$QSETTINGSGENERATOR_DIR$$SUFFIX
{
qsettingsgenerator_c.name = qsettingsgenerator ${QMAKE_FILE_IN}.h

23
mkspecs/features/qsettingstranslator.prf

@ -0,0 +1,23 @@
isEmpty(QMAKE_QSETTINGSGENERATOR): qtPrepareTool(QMAKE_QSETTINGSGENERATOR, qsettingsgenerator)
isEmpty(QSETTINGSTRANSLATOR_DIR): QSETTINGSTRANSLATOR_DIR = $$_PRO_FILE_PWD_/.ts-dummy
!ReleaseBuild:!DebugBuild: {
qsettingstranslator_c.name = qsettingsgenerator --translate ${QMAKE_FILE_IN}
qsettingstranslator_c.input = SETTINGS_TRANSLATIONS #TODO compability
qsettingstranslator_c.variable_out = CPP_DUMMIES
qsettingstranslator_c.commands = $$QMAKE_QSETTINGSGENERATOR --translate --in ${QMAKE_FILE_IN} --impl ${QMAKE_FILE_OUT}
qsettingstranslator_c.output = $$QSETTINGSTRANSLATOR_DIR/${QMAKE_FILE_BASE}.tsdummy$${first(QMAKE_EXT_CPP)}
qsettingstranslator_c.CONFIG += no_link
qsettingstranslator_c.depends += $$QMAKE_QSETTINGSGENERATOR_EXE
QMAKE_EXTRA_COMPILERS += qsettingstranslator_c
qtmvvm_tsgen_target.target = qtmvvm-tsgen
qtmvvm_tsgen_target.depends += compiler_qsettingstranslator_c_make_all
qtmvvm_tsgen_target.commands += @echo $$shell_quote(>>> Remember to add the line \"_never_true_condition: SOURCES += $${LITERAL_DOLLAR}$${LITERAL_DOLLAR}$${LITERAL_DOLLAR}$${LITERAL_DOLLAR}files($${LITERAL_DOLLAR}$${LITERAL_DOLLAR}$${LITERAL_DOLLAR}$${LITERAL_DOLLAR}PWD/.ts-dummy/*)\" to your pro file)
QMAKE_EXTRA_TARGETS += qtmvvm_tsgen_target
} else {
qtmvvm_tsgen_target.target = qtmvvm-tsgen
QMAKE_EXTRA_TARGETS += qtmvvm_tsgen_target
}

2
src/mvvmcore/mvvmcore.pro

@ -1,7 +1,7 @@
TARGET = QtMvvmCore
QT = core gui
MODULE_CONFIG += qsettingsgenerator
MODULE_CONFIG += qsettingsgenerator qsettingstranslator
HEADERS += \
viewmodel.h \

Loading…
Cancel
Save