use AUTOMOC in cmake files

This commit is contained in:
ws 2015-01-27 11:56:08 +01:00
parent ed4f023195
commit 1960bbbff7
11 changed files with 32 additions and 152 deletions

1
.gitignore vendored
View file

@ -24,4 +24,5 @@ mscore/revision.h
.DS_Store
CMakeLists.txt.user.*
vtest/html
thirdparty/mupdf-qt

View file

@ -47,6 +47,8 @@ include (CreatePrecompiledHeader)
# for debugging the make system uncomment next line:
# set(CMAKE_VERBOSE_MAKEFILE ON)
set (CMAKE_AUTOMOC TRUE)
set(MSCORE_UNSTABLE TRUE) # mark as unstable
set(USE_SSE TRUE)

View file

@ -20,22 +20,6 @@
include (${PROJECT_SOURCE_DIR}/build/gch.cmake)
QT4_WRAP_CPP (mocs
aslider.h
knob.h
panknob.h
volknob.h
midipanknob.h
colorlabel.h
slider.h
volslider.h
mslider.h
pitchedit.h
pitchlabel.h
poslabel.h
denomspinbox.h
)
if (APPLE)
file(GLOB_RECURSE INCS "*.h")
else (APPLE)
@ -46,7 +30,6 @@ add_library (
awl STATIC
${PROJECT_BINARY_DIR}/all.h
${PCH}
${mocs}
${INCS}
aslider.cpp
knob.cpp
@ -75,28 +58,9 @@ xcode_pch(awl all)
ADD_DEPENDENCIES(awl mops1)
ADD_DEPENDENCIES(awl mops2)
QT4_WRAP_CPP (mocs2
aslider.h
knob.h
panknob.h
volknob.h
midipanknob.h
awlplugin.h
colorlabel.h
slider.h
volslider.h
mslider.h
denomspinbox.h
pitchedit.h
pitchlabel.h
awlplugin.h
)
add_library (
awlplugin SHARED
${PROJECT_BINARY_DIR}/all.h
${mocs2}
awlplugin.cpp
aslider.cpp
knob.cpp

View file

@ -22,23 +22,14 @@ QT4_ADD_RESOURCES (qrc_effects_files
zita1/zita.qrc
)
QT4_WRAP_CPP(effectMocs
effectgui.h
zita1/zita.h
zita1/zitagui.h
noeffect/noeffect.h
noeffect/noeffectgui.h
effect.h
)
add_library (effects STATIC
${qrc_effects_files}
${effectMocs}
${PROJECT_BINARY_DIR}/all.h
${PCH}
effect.cpp
effectgui.cpp
noeffect/noeffect.cpp
noeffect/noeffectgui.h
zita1/zita.cpp
zita1/zitagui.cpp
${INCS}

View file

@ -12,20 +12,6 @@
#=============================================================================
# if (SCRIPT_INTERFACE)
QT4_WRAP_CPP (libqtMocs
accidental.h arpeggio.h articulation.h barline.h beam.h bend.h
box.h bracket.h breath.h bsymbol.h chord.h chordline.h chordrest.h
clef.h duration.h dynamic.h element.h figuredbass.h fingering.h fret.h
glissando.h hairpin.h harmony.h hook.h icon.h image.h instrchange.h
keysig.h lasso.h layoutbreak.h line.h lyrics.h measurebase.h measure.h
notedot.h note.h ossia.h ottava.h page.h pedal.h rehearsalmark.h repeat.h
rest.h segment.h shadownote.h slur.h tie.h spacer.h spanner.h
stafftext.h stem.h symbol.h system.h tempotext.h textframe.h text.h
textline.h timesig.h tremolobar.h tremolo.h trill.h tuplet.h volta.h
score.h cursor.h page.h part.h staff.h mscore.h staffstate.h marker.h
jump.h stemslash.h ledgerline.h noteline.h
bagpembell.h ambitus.h plugins.h
)
set (LIB_SCRIPT_FILES plugins.cpp)
# endif (SCRIPT_INTERFACE)
@ -46,7 +32,6 @@ endif (APPLE)
add_library (
libmscore STATIC
${PROJECT_BINARY_DIR}/all.h
${libqtMocs}
${INCS}
${LIB_SCRIPT_FILES}
segmentlist.cpp fingering.cpp accidental.cpp arpeggio.cpp

View file

@ -30,7 +30,6 @@ include_directories(
if (SCRIPT_INTERFACE)
set (SCRIPT_FILES mscorePlugins pluginCreator.cpp qmledit.cpp pluginManager.cpp)
set (SCRIPT_MOCS pluginCreator.h qmledit.h pluginManager.h)
set (SCRIPT_UI pluginCreator.ui pluginManager.ui)
endif (SCRIPT_INTERFACE)
@ -123,49 +122,6 @@ QT4_WRAP_UI (ui_headers
${SCRIPT_UI}
)
if (OMR)
set(OMR_MOCS omrpanel.h)
endif (OMR)
QT4_WRAP_CPP (mocs
scoreview.h editinstrument.h editstyle.h instrdialog.h instrwidget.h
musescore.h navigator.h pagesettings.h palette.h mixer.h playpanel.h
measureproperties.h seq.h textpalette.h textstyle.h selectionwindow.h
timedialog.h symboldialog.h shortcutcapturedialog.h simplebutton.h
greendotbutton.h recordbutton.h editdrumset.h editstaff.h selinstrument.h
voltaproperties.h timesigproperties.h newwizard.h
transposedialog.h lineproperties.h
excerptsdialog.h stafftextproperties.h glissandoproperties.h
articulationprop.h metaedit.h magbox.h
textprop.h textproperties.h tupletdialog.h
selectdialog.h synthcontrol.h drumroll.h pianoroll.h
piano.h ruler.h file.h
pianoview.h drumview.h splitstaff.h scoretab.h keyedit.h keycanvas.h harmonyedit.h
harmonycanvas.h updatechecker.h fretproperties.h fretcanvas.h editstafftype.h
prefsdialog.h sectionbreakprop.h bendproperties.h
bendcanvas.h tremolobarprop.h tremolobarcanvas.h
drumtools.h texteditor.h texttools.h pianotools.h editpitch.h
editstringdata.h editraster.h mediadialog.h chordview.h albummanager.h layer.h
# webpage.h
inspector/inspector.h inspector/inspectorBase.h inspector/inspectorBeam.h masterpalette.h
inspector/inspectorGroupElement.h inspector/inspectorImage.h waveview.h helpBrowser.h
inspector/inspectorLasso.h inspector/inspectorVolta.h inspector/inspectorOttava.h
inspector/inspectorTrill.h
inspector/inspectorHairpin.h qmlplugin.h palettebox.h workspace.h
inspector/inspectorJump.h inspector/inspectorMarker.h inspector/inspectorGlissando.h
inspector/inspectorNote.h inspector/inspectorAmbitus.h
inspector/inspectorFret.h
paletteBoxButton.h pathlistdialog.h exampleview.h noteGroups.h inspector/inspectorTextLine.h
importmidi/importmidi_panel.h importmidi/importmidi_delegate.h importmidi/importmidi_view.h
debugger/debugger.h
resourceManager.h downloadUtils.h accessibletoolbutton.h scoreaccessibility.h
startcenter.h scoreBrowser.h scorePreview.h
logindialog.h loginmanager.h uploadscoredialog.h breaksdialog.h
${OMR_MOCS}
${SCRIPT_MOCS}
)
if (APPLE)
QT4_ADD_RESOURCES (qrc_files musescore.qrc)
else (APPLE)
@ -242,16 +198,14 @@ else (APPLE)
endif (APPLE)
add_executable ( ${ExecutableName}
# mops.cpp # HACK! first file disappears during linking as CMake generates
# # something like: gcc ... -L mops.o ...
${qrc_files}
${ui_headers}
${mocs}
${PROJECT_BINARY_DIR}/all.h
${PCH}
${resource_file}
${INCS}
recordbutton.h greendotbutton prefsdialog.h
scoreview.cpp editinstrument.cpp editstyle.cpp
icons.cpp importbww.cpp instrdialog.cpp instrwidget.cpp
debugger/debugger.cpp menus.cpp
@ -260,7 +214,6 @@ add_executable ( ${ExecutableName}
seq.cpp textpalette.cpp
timedialog.cpp symboldialog.cpp shortcutcapturedialog.cpp
simplebutton.cpp musedata.cpp
# exportly.cpp
editdrumset.cpp editstaff.cpp voltaproperties.cpp
timesigproperties.cpp newwizard.cpp transposedialog.cpp
excerptsdialog.cpp metaedit.cpp magbox.cpp
@ -273,7 +226,6 @@ add_executable ( ${ExecutableName}
editpitch.cpp editstringdata.cpp editraster.cpp pianotools.cpp mediadialog.cpp
workspace.cpp exportmp3.cpp chordview.cpp
album.cpp albummanager.cpp
# webpage.cpp
textstyle.cpp
lineproperties.cpp stafftextproperties.cpp splitstaff.cpp
tupletdialog.cpp glissandoproperties.cpp
@ -318,10 +270,9 @@ add_executable ( ${ExecutableName}
${SCRIPT_FILES}
musescoreCore.h
driver.h
tremolobarcanvas.h bendcanvas.h fretcanvas.h keycanvas.h harmonycanvas.h
)
#qt5_use_modules(${ExecutableName} Gui Widgets Network)
target_link_libraries(mscore
awl
mstyle

View file

@ -14,9 +14,9 @@
namespace Ms {
DownloadUtils::DownloadUtils(QWidget *parent) :QObject(parent)
DownloadUtils::DownloadUtils(QWidget *parent)
: QObject(parent)
{
}
bool DownloadUtils::saveFile()

View file

@ -10,32 +10,37 @@
// the file LICENCE.GPL
//=============================================================================
#ifndef __DOWNLOAD_UTILS_H__
#define __DOWNLOAD_UTILS_H__
namespace Ms {
class DownloadUtils : public QObject
{
{
Q_OBJECT
private:
QByteArray sdata;
QNetworkAccessManager manager;
QString _target;
QString _localFile;
QByteArray sdata;
QNetworkAccessManager manager;
QString _target;
QString _localFile;
public:
explicit DownloadUtils(QWidget *parent=0);
public:
explicit DownloadUtils(QWidget *parent=0);
void setTarget(const QString& t) { _target = t; }
void setLocalFile(const QString& t) { _localFile = t; }
bool saveFile();
QByteArray returnData();
void setTarget(const QString& t) { _target = t; }
void setLocalFile(const QString& t) { _localFile = t; }
bool saveFile();
QByteArray returnData();
signals:
void done();
signals:
void done();
public slots:
void download();
void downloadFinished(QNetworkReply* data);
void downloadProgress(qint64 recieved, qint64 total);
};
public slots:
void download();
void downloadFinished(QNetworkReply* data);
void downloadProgress(qint64 recieved, qint64 total);
};
}
#endif

View file

@ -18,15 +18,9 @@ else (APPLE)
set(INCS "")
endif (APPLE)
QT4_WRAP_CPP(synthesizerMocs
synthesizergui.h
msynthesizer.h
)
add_library (synthesizer STATIC
${PROJECT_BINARY_DIR}/all.h
${PCH}
${synthesizerMocs}
msynthesizer.cpp
event.cpp
synthesizergui.cpp

View file

@ -20,12 +20,6 @@
include (${PROJECT_SOURCE_DIR}/build/gch.cmake)
QT4_WRAP_CPP (mocs
qoscclient.h
qoscserver.h
qosctypes.h
)
if (APPLE)
file(GLOB_RECURSE INCS "*.h")
else (APPLE)
@ -35,7 +29,6 @@ endif (APPLE)
add_library(ofqf STATIC
${PROJECT_BINARY_DIR}/all.h
${PCH}
${mocs}
${INCS}
qoscclient.cpp qoscserver.cpp qosctypes.cpp
)

View file

@ -20,16 +20,10 @@
include (${PROJECT_SOURCE_DIR}/build/gch.cmake)
QT4_WRAP_CPP (mocs
qtsingleapplication.h
qtlocalpeer.h
)
add_library (
qtsingleapp STATIC
${PROJECT_BINARY_DIR}/all.h
${PCH}
${mocs}
qtsingleapplication.cpp
qtlocalpeer.cpp
)