Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Changes: unify usage of mmoc and mgen in the different .pro files
RevBy: Max Waterman Details: there was quite some code duplication in the usage of mmoc and mgen in the project. this is now all simplified and unified. all unit tests still pass.
- Loading branch information
Holger Schroeder
authored and
Daniel d'Andrada
committed
Jun 30, 2010
1 parent
f11dee1
commit 1e1b956
Showing
27 changed files
with
149 additions
and
309 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,32 @@ | ||
include(meegotouch_defines.prf) | ||
include(meegotouch_mgen.prf) | ||
|
||
macx { | ||
INCLUDEPATH += /Library/Frameworks/m.framework/Headers | ||
} else { | ||
} | ||
|
||
contains(TEMPLATE, app) { | ||
DEFINES += M_APPLICATION_NAME=\\\"${QMAKE_TARGET}\\\" | ||
contains(TEMPLATE, app) { | ||
DEFINES += M_APPLICATION_NAME=\\\"${QMAKE_TARGET}\\\" | ||
} else { | ||
contains(TEMPLATE, lib) { | ||
DEFINES += M_LIBRARY_NAME=\\\"lib${QMAKE_TARGET}\\\" | ||
} else { | ||
contains(TEMPLATE, lib) { | ||
DEFINES += M_LIBRARY_NAME=\\\"lib${QMAKE_TARGET}\\\" | ||
} else { | ||
# error(Unknown template) | ||
} | ||
# error(Unknown template) | ||
} | ||
} | ||
|
||
!contains(DEFINES, BUILD_M) { | ||
M_INC_DIR = $$M_PREFIX/include/meegotouch | ||
M_LIB_DIR = $$M_LIBDIR | ||
|
||
GSTREAMER_INC = /usr/include/gstreamer-0.10 /usr/include/glib-2.0 /usr/lib/glib-2.0/include /usr/include/libxml2 | ||
|
||
INCLUDEPATH += $${M_INC_DIR} $${GSTREAMER_INC} | ||
DEPENDPATH += $${M_INC_DIR} | ||
|
||
unix: QMAKE_LFLAGS += $${QMAKE_LFLAGS_RPATH}$${M_LIB_DIR} | ||
LIBS += -L$${M_LIB_DIR} | ||
|
||
QMAKE_MOC = $${M_MMOC_EXECUTABLE} | ||
|
||
isEmpty(MGEN_OUTDIR) { | ||
MGEN_OUTDIR = . | ||
} | ||
|
||
mgenerator_model.name = mgenerator model | ||
mgenerator_model.input = MODEL_HEADERS | ||
mgenerator_model.output = $$MGEN_OUTDIR/gen_${QMAKE_FILE_BASE}data.cpp | ||
mgenerator_model.commands += mgen --model ${QMAKE_FILE_NAME} $$MGEN_OUTDIR | ||
mgenerator_model.clean += $$MGEN_OUTDIR/gen_* | ||
mgenerator_model.CONFIG = target_predeps no_link | ||
mgenerator_model.variable_out = GENERATED_SOURCES | ||
QMAKE_EXTRA_COMPILERS += mgenerator_model | ||
|
||
mgenerator_style.name = mgenerator style | ||
mgenerator_style.input = STYLE_HEADERS | ||
mgenerator_style.output = $$MGEN_OUTDIR/gen_${QMAKE_FILE_BASE}data.cpp | ||
mgenerator_style.commands += mgen --style ${QMAKE_FILE_NAME} $$MGEN_OUTDIR | ||
mgenerator_style.clean += $$MGEN_OUTDIR/gen_* | ||
mgenerator_style.CONFIG = target_predeps no_link | ||
mgenerator_style.variable_out = GENERATED_SOURCES | ||
QMAKE_EXTRA_COMPILERS += mgenerator_style | ||
} | ||
!contains(DEFINES, BUILD_M) { | ||
M_INC_DIR = $$M_PREFIX/include/meegotouch | ||
M_LIB_DIR = $$M_LIBDIR | ||
|
||
GSTREAMER_INC = /usr/include/gstreamer-0.10 /usr/include/glib-2.0 /usr/lib/glib-2.0/include /usr/include/libxml2 | ||
|
||
INCLUDEPATH += $${M_INC_DIR} $${GSTREAMER_INC} | ||
DEPENDPATH += $${M_INC_DIR} | ||
|
||
unix: QMAKE_LFLAGS += $${QMAKE_LFLAGS_RPATH}$${M_LIB_DIR} | ||
|
||
LIBS += -L$${M_LIB_DIR} | ||
|
||
QMAKE_MOC = $${M_MMOC_EXECUTABLE} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
isEmpty(M_MGEN_OUTDIR) { | ||
M_MGEN_OUTDIR = . | ||
} | ||
|
||
isEmpty(M_MGEN_EXECUTABLE) { | ||
M_MGEN_EXECUTABLE = mgen | ||
} | ||
|
||
mgenerator_model.name = mgenerator model | ||
mgenerator_model.input = MODEL_HEADERS | ||
mgenerator_model.output = $$M_MGEN_OUTDIR/gen_${QMAKE_FILE_BASE}data.cpp | ||
mgenerator_model.commands += $$M_MGEN_EXECUTABLE --model ${QMAKE_FILE_NAME} $$M_MGEN_OUTDIR | ||
mgenerator_model.clean += $$M_MGEN_OUTDIR/gen_* | ||
mgenerator_model.CONFIG = target_predeps no_link | ||
mgenerator_model.variable_out = GENERATED_SOURCES | ||
QMAKE_EXTRA_COMPILERS += mgenerator_model | ||
|
||
mgenerator_style.name = mgenerator style | ||
mgenerator_style.input = STYLE_HEADERS | ||
mgenerator_style.output = $$M_MGEN_OUTDIR/gen_${QMAKE_FILE_BASE}data.cpp | ||
mgenerator_style.commands += $$M_MGEN_EXECUTABLE --style ${QMAKE_FILE_NAME} $$M_MGEN_OUTDIR | ||
mgenerator_style.clean += $$M_MGEN_OUTDIR/gen_* | ||
mgenerator_style.CONFIG = target_predeps no_link | ||
mgenerator_style.variable_out = GENERATED_SOURCES | ||
QMAKE_EXTRA_COMPILERS += mgenerator_style |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# settings for meegotouch mmoc | ||
|
||
win32 { | ||
contains(DEFINES, IS_ARMEL) { | ||
M_MMOC_EXECUTABLE = perl.exe $$M_SOURCE_TREE/mmoc/mmoc.pl | ||
} else { | ||
debug { | ||
M_MMOC_EXECUTABLE = $$M_BUILD_TREE/mmoc/debug/mmoc.exe | ||
} else { | ||
M_MMOC_EXECUTABLE = $$M_BUILD_TREE/mmoc/release/mmoc.exe | ||
} | ||
} | ||
} else { | ||
contains(DEFINES, IS_ARMEL) { | ||
M_MMOC_EXECUTABLE = perl $$M_SOURCE_TREE/mmoc/mmoc.pl | ||
} else { | ||
M_MMOC_EXECUTABLE = $$M_BUILD_TREE/mmoc/mmoc | ||
} | ||
} | ||
|
||
QMAKE_MOC = $$M_MMOC_EXECUTABLE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,43 @@ | ||
QMAKE_EXTRA_TARGETS += build_mgen build_mmoc | ||
|
||
build_moc.target = ../mmoc/mmoc | ||
build_gen.target = ../mgen/mgen | ||
win32 { | ||
build_mmoc.commands = \ | ||
cd $$M_BUILD_TREE/mmmoc && mingw32-make | ||
|
||
build_mgen.commands = \ | ||
cd $$M_BUILD_TREE/mgen && mingw32-make | ||
|
||
# FIXME make it work for release build too | ||
MGEN_EXECUTABLE = $$M_BUILD_TREE/mgen/debug/mgen.exe | ||
} else { | ||
build_mmoc.commands = \ | ||
cd $$M_BUILD_TREE/mmoc && qmake && make | ||
|
||
build_mgen.commands = \ | ||
cd $$M_BUILD_TREE/mgen && qmake && make | ||
|
||
MGEN_EXECUTABLE = $$M_BUILD_TREE/mgen/mgen | ||
} | ||
|
||
build_moc.target = ../mmoc/mmoc | ||
win32 { | ||
build_mmmoc.commands = \ | ||
cd $$M_BUILD_TREE/mmmoc && mingw32-make | ||
|
||
# FIXME make it work for release build too | ||
MMOC_EXECUTABLE = $$M_BUILD_TREE/mgen/debug/mmoc.exe | ||
# make sure mmoc executable is found | ||
win32 { | ||
M_MMOC_EXECUTABLE = perl.exe $$M_SOURCE_TREE/mmoc/mmoc.pl | ||
} else { | ||
build_mmoc.commands = \ | ||
cd $$M_BUILD_TREE/mmoc && qmake && make | ||
|
||
MMOC_EXECUTABLE = $$M_BUILD_TREE/mmoc/mmoc | ||
contains(DEFINES, IS_ARMEL) { | ||
M_MMOC_EXECUTABLE = perl $$M_SOURCE_TREE/mmoc/mmoc.pl | ||
} else { | ||
M_MMOC_EXECUTABLE = $$M_BUILD_TREE/mmoc/mmoc | ||
} | ||
} | ||
|
||
MMOC_PERL_SCRIPT = $$M_BUILD_TREE/mmoc/mmoc.pl | ||
|
||
MMOC_PERL = perl $$MMOC_PERL_SCRIPT | ||
# make sure mgen executable is found | ||
win32 { | ||
MMOC_PERL = perl.exe $$MMOC_PERL_SCRIPT | ||
debug { | ||
M_MGEN_EXECUTABLE = $$M_BUILD_TREE/mgen/debug/mgen.exe | ||
} else { | ||
M_MGEN_EXECUTABLE = $$M_BUILD_TREE/mgen/release/mgen.exe | ||
} | ||
} else { | ||
M_MGEN_EXECUTABLE = $$M_BUILD_TREE/mgen/mgen | ||
} | ||
|
||
PRE_TARGETDEPS += $$M_MGEN_EXECUTABLE $$M_MMOC_EXECUTABLE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.