MuseScore/mscore/CMakeLists.txt

685 lines
25 KiB
CMake
Raw Normal View History

2012-05-26 14:49:10 +02:00
#=============================================================================
# MuseScore
# Linux Music Score Editor
#
2016-06-10 10:37:53 +02:00
# Copyright (C) 2002-2016 by Werner Schweer and others
2012-05-26 14:49:10 +02:00
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#=============================================================================
include (${PROJECT_SOURCE_DIR}/build/gch.cmake)
SET_SOURCE_FILES_PROPERTIES(revision.h PROPERTIES GENERATED TRUE)
include_directories(
${CMAKE_CURRENT_BINARY_DIR}
${PROJECT_SOURCE_DIR}
${PROJECT_SOURCE_DIR}/thirdparty
2015-11-16 14:24:47 +01:00
${QTSINGLEAPPLICATION_INCLUDE_DIRS}
2012-05-26 14:49:10 +02:00
)
2012-07-09 14:16:27 +02:00
if (SCRIPT_INTERFACE)
2015-01-07 13:47:03 +01:00
set (SCRIPT_FILES mscorePlugins pluginCreator.cpp qmledit.cpp pluginManager.cpp)
set (SCRIPT_UI pluginCreator.ui pluginManager.ui)
2012-07-09 14:16:27 +02:00
endif (SCRIPT_INTERFACE)
2015-01-27 14:22:03 +01:00
QT5_WRAP_UI (ui_headers
insertmeasuresdialog.ui editinstrument.ui editstyle.ui instrdialog.ui instrwidget.ui
2013-06-10 11:03:34 +02:00
measuresdialog.ui pagesettings.ui mixer.ui playpanel.ui prefsdialog.ui measureproperties.ui
textpalette.ui timedialog.ui symboldialog.ui shortcutcapturedialog.ui editdrumset.ui
editstaff.ui timesigproperties.ui
2012-05-26 14:49:10 +02:00
instrwizard.ui timesigwizard.ui newwizard.ui aboutbox.ui aboutmusicxmlbox.ui
2017-02-07 18:48:23 +01:00
transposedialog.ui excerptsdialog.ui stafftext.ui tupletdialog.ui
articulation.ui metaedit.ui palette.ui selectdialog.ui selectnotedialog.ui
2013-06-10 11:03:34 +02:00
synthcontrol.ui splitstaff.ui cellproperties.ui keyedit.ui selectinstr.ui
2017-01-16 20:51:12 +01:00
fretdprops.ui editstafftype.ui sectionbreak.ui bend.ui tremolobar.ui
editpitch.ui editstringdata.ui editraster.ui mediadialog.ui albummanager.ui layer.ui
2016-11-07 14:20:50 +01:00
omrpanel.ui masterpalette.ui harmonyedit.ui pathlistdialog.ui
note_groups.ui resourceManager.ui stafftypetemplates.ui
startcenter.ui scorePreview.ui scoreBrowser.ui
logindialog.ui uploadscoredialog.ui breaksdialog.ui
2016-05-31 17:44:39 +02:00
toolbarEditor.ui
2013-06-10 11:03:34 +02:00
importmidi/importmidi_panel.ui
2013-06-10 11:03:34 +02:00
debugger/barline.ui
debugger/harmony.ui
debugger/box.ui
debugger/keysig.ui
debugger/rest.ui
debugger/articulationbase.ui
debugger/accidental.ui
debugger/clef.ui
debugger/slursegment.ui
2016-12-03 20:27:21 +01:00
debugger/tiesegment.ui
2013-06-10 11:03:34 +02:00
debugger/spanner.ui
debugger/tremolo.ui
debugger/beam.ui
debugger/lyrics.ui
debugger/linesegment.ui
debugger/textline.ui
debugger/line.ui
debugger/slurtie.ui
2013-06-28 10:55:25 +02:00
debugger/tie.ui
2013-06-10 11:03:34 +02:00
debugger/tuplet.ui
debugger/dynamic.ui
debugger/hairpin.ui
debugger/chord.ui
debugger/chordrest.ui
debugger/segment.ui
debugger/measure.ui
debugger/element.ui
debugger/debugger.ui
debugger/note.ui
debugger/page.ui
debugger/text.ui
debugger/stem.ui
debugger/system.ui
2015-02-16 12:12:23 +01:00
debugger/timesig.ui
2013-06-10 11:03:34 +02:00
inspector/inspector_element.ui
inspector/inspector_vbox.ui
inspector/inspector_tbox.ui
2013-06-10 11:03:34 +02:00
inspector/inspector_articulation.ui
inspector/inspector_spacer.ui
inspector/inspector_hbox.ui
inspector/inspector_segment.ui
inspector/inspector_beam.ui
inspector/inspector_note.ui
inspector/inspector_rest.ui
inspector/inspector_chord.ui
inspector/inspector_group_element.ui
inspector/inspector_image.ui
inspector/inspector_lasso.ui
inspector/inspector_volta.ui
inspector/inspector_ottava.ui
inspector/inspector_trill.ui
inspector/inspector_hairpin.ui
inspector/inspector_jump.ui
inspector/inspector_marker.ui
inspector/inspector_glissando.ui
inspector/inspector_clef.ui
inspector/inspector_timesig.ui
inspector/inspector_keysig.ui
inspector/inspector_barline.ui
inspector/inspector_tuplet.ui
inspector/inspector_accidental.ui
inspector/inspector_tempotext.ui
inspector/inspector_dynamic.ui
2016-08-24 14:49:34 +02:00
inspector/inspector_lyric.ui
2013-06-10 11:03:34 +02:00
inspector/inspector_line.ui
inspector/inspector_textline.ui
2013-07-01 16:57:44 +02:00
inspector/inspector_slur.ui
2013-07-22 16:21:19 +02:00
inspector/inspector_text.ui
2016-08-25 17:34:25 +02:00
inspector/inspector_stafftext.ui
2013-11-25 12:17:12 +01:00
inspector/inspector_ambitus.ui
inspector/inspector_empty.ui
2015-01-15 14:50:50 +01:00
inspector/inspector_fret.ui
inspector/inspector_break.ui
2016-12-18 14:31:13 +01:00
inspector/inspector_stafftypechange.ui
inspector/inspector_bend.ui
2015-07-06 18:16:52 +02:00
inspector/inspector_arpeggio.ui
inspector/inspector_tremolo.ui
inspector/inspector_caesura.ui
2016-12-29 19:46:40 +01:00
inspector/inspector_bracket.ui
2016-12-30 10:58:53 +01:00
inspector/inspector_iname.ui
2017-01-05 14:53:21 +01:00
inspector/inspector_fingering.ui
2017-01-18 14:16:33 +01:00
inspector/inspector_frametext.ui
2017-01-16 20:51:12 +01:00
inspector/align_select.ui
2017-02-13 08:22:12 +01:00
inspector/offset_select.ui
inspector/scale_select.ui
2017-03-10 17:12:38 +01:00
inspector/size_select.ui
2012-07-09 14:16:27 +02:00
${SCRIPT_UI}
2012-05-26 14:49:10 +02:00
)
if (APPLE)
QT5_ADD_RESOURCES (qrc_files musescore.qrc musescorefonts-Mac.qrc shortcut-Mac.qrc)
2012-05-26 14:49:10 +02:00
else (APPLE)
QT5_ADD_RESOURCES (qrc_files musescore.qrc
musescorefonts-MScore.qrc
musescorefonts-Gootville.qrc
musescorefonts-Bravura.qrc
musescorefonts-MuseJazz.qrc
2014-10-27 12:12:31 +01:00
musescorefonts-FreeSerif.qrc
musescorefonts-Free.qrc
shortcut.qrc)
2012-05-26 14:49:10 +02:00
endif (APPLE)
set (AUDIO "")
if (MINGW)
set (resource_file ${PROJECT_BINARY_DIR}/resfile.o)
else (MINGW)
if (USE_ALSA)
2016-08-09 00:25:42 +02:00
set (AUDIO ${AUDIO} alsa.cpp)
2012-05-26 14:49:10 +02:00
endif (USE_ALSA)
endif (MINGW)
if (USE_PORTAUDIO)
set (AUDIO ${AUDIO} pa.cpp)
endif (USE_PORTAUDIO)
if (USE_PULSEAUDIO)
set (AUDIO ${AUDIO} pulseaudio.cpp)
endif (USE_PULSEAUDIO)
if (USE_PORTMIDI)
set (AUDIO ${AUDIO} pm.cpp)
endif (USE_PORTMIDI)
if (USE_LAME)
set (AUDIO ${AUDIO} exportmp3.cpp)
endif (USE_LAME)
2012-05-26 14:49:10 +02:00
if (USE_JACK)
set (AUDIO ${AUDIO} jackaudio.cpp jackweakapi.cpp)
endif (USE_JACK)
2016-08-09 00:25:42 +02:00
if (USE_ALSA OR USE_PORTMIDI)
set (AUDIO ${AUDIO} mididriver.cpp)
endif (USE_ALSA OR USE_PORTMIDI)
2014-11-09 21:03:56 +01:00
if (${CMAKE_SYSTEM} MATCHES "GNU-0.3")
2016-06-10 10:37:53 +02:00
# Include some cmake support file
2014-11-09 21:03:56 +01:00
INCLUDE (Platform/GNU)
set ( USE_ALSA 0 )
set ( USE_PORTMIDI 0 )
endif (${CMAKE_SYSTEM} MATCHES "GNU-0.3")
if (${CMAKE_SYSTEM} MATCHES "kFreeBSD")
2016-06-10 10:37:53 +02:00
# Include some cmake support file
2014-11-10 12:30:53 +01:00
INCLUDE (Platform/kFreeBSD)
2014-11-09 21:03:56 +01:00
set ( USE_ALSA 0 )
set ( USE_PORTMIDI 0 )
endif (${CMAKE_SYSTEM} MATCHES "kFreeBSD")
2012-05-26 14:49:10 +02:00
if (APPLE)
2014-07-22 16:43:29 +02:00
set (ExecutableName mscore MACOSX_BUNDLE)
set (MACOSX_BUNDLE_ICON_FILE mscore.icns)
set (MACOSX_BUNDLE_GUI_IDENTIFIER org.musescore.MuseScore)
set (MACOSX_BUNDLE_LONG_VERSION_STRING ${MUSESCORE_VERSION_FULL})
set (MACOSX_BUNDLE_BUNDLE_NAME MuseScore)
set (MACOSX_BUNDLE_SHORT_VERSION_STRING ${MUSESCORE_VERSION})
set (MACOSX_BUNDLE_BUNDLE_VERSION ${MUSESCORE_VERSION_FULL})
set (MACOSX_BUNDLE_COPYRIGHT musescore.org)
2012-05-26 14:49:10 +02:00
else (APPLE)
2014-07-22 16:43:29 +02:00
set (ExecutableName mscore)
2012-05-26 14:49:10 +02:00
endif (APPLE)
if (OMR)
set(OMR_FILES omrpanel.cpp)
endif (OMR)
if (APPLE)
2014-07-22 16:43:29 +02:00
file(GLOB_RECURSE INCS "*.h")
else (APPLE)
2014-07-22 16:43:29 +02:00
set(INCS "")
endif (APPLE)
2012-05-26 14:49:10 +02:00
add_executable ( ${ExecutableName}
${qrc_files}
${ui_headers}
${PROJECT_BINARY_DIR}/all.h
${PCH}
${resource_file}
${INCS}
2012-05-26 14:49:10 +02:00
2015-01-27 11:56:08 +01:00
recordbutton.h greendotbutton prefsdialog.h
scoreview.cpp editharmony.cpp editfiguredbass.cpp events.cpp
2017-05-02 14:17:31 +02:00
editinstrument.cpp editstyle.cpp
2015-03-22 21:36:46 +01:00
icons.cpp importbww.cpp
importmxml.cpp importmxmlpass1.cpp importmxmlpass2.cpp
instrdialog.cpp instrwidget.cpp
debugger/debugger.cpp menus.cpp
2012-05-26 14:49:10 +02:00
musescore.cpp navigator.cpp pagesettings.cpp palette.cpp
timeline.cpp
2014-06-02 12:12:53 +02:00
mixer.cpp playpanel.cpp selectionwindow.cpp preferences.cpp measureproperties.cpp
2014-10-16 14:43:51 +02:00
seq.cpp textpalette.cpp
2012-05-26 14:49:10 +02:00
timedialog.cpp symboldialog.cpp shortcutcapturedialog.cpp
2013-06-12 14:23:57 +02:00
simplebutton.cpp musedata.cpp
editdrumset.cpp editstaff.cpp
2012-05-26 14:49:10 +02:00
timesigproperties.cpp newwizard.cpp transposedialog.cpp
2013-12-06 01:42:12 +01:00
excerptsdialog.cpp metaedit.cpp magbox.cpp
2013-05-31 17:48:47 +02:00
capella.cpp capxml.cpp exportaudio.cpp palettebox.cpp
2017-01-16 20:51:12 +01:00
synthcontrol.cpp drumroll.cpp pianoroll.cpp piano.cpp
2012-05-26 14:49:10 +02:00
pianoview.cpp drumview.cpp scoretab.cpp keyedit.cpp harmonyedit.cpp
2017-01-16 20:51:12 +01:00
updatechecker.cpp
importove.cpp
ove.cpp
ruler.cpp
importgtp.cpp importgtp-gp4.cpp importgtp-gp5.cpp importgtp-gp6.cpp
fotomode.cpp drumtools.cpp
2016-11-07 14:20:50 +01:00
selinstrument.cpp editstafftype.cpp texttools.cpp
2012-05-26 14:49:10 +02:00
editpitch.cpp editstringdata.cpp editraster.cpp pianotools.cpp mediadialog.cpp
workspace.cpp chordview.cpp
2017-01-31 12:21:44 +01:00
albummanager.cpp
2017-02-07 18:48:23 +01:00
stafftextproperties.cpp splitstaff.cpp
2016-07-15 17:06:41 +02:00
tupletdialog.cpp
2017-01-16 20:51:12 +01:00
articulationprop.cpp
2013-03-27 17:52:26 +01:00
fretproperties.cpp sectionbreakprop.cpp
2012-05-26 14:49:10 +02:00
bendproperties.cpp tremolobarprop.cpp file.cpp keyb.cpp osc.cpp
layer.cpp selectdialog.cpp selectnotedialog.cpp propertymenu.cpp shortcut.cpp bb.cpp
dragelement.cpp startupWizard.cpp
2016-12-29 13:42:55 +01:00
svggenerator.cpp
masterpalette.cpp
dragdrop.cpp
waveview.cpp helpBrowser.cpp
inspector/inspector.cpp
inspector/inspectorBase.cpp
inspector/inspectorBeam.cpp
inspector/inspectorGroupElement.cpp
inspector/inspectorImage.cpp
2015-01-15 14:50:50 +01:00
inspector/inspectorFret.cpp
inspector/inspectorText.cpp
2016-12-29 13:42:55 +01:00
inspector/inspectorLasso.cpp
inspector/inspectorBarline.cpp
2017-01-05 14:53:21 +01:00
inspector/inspectorVolta.cpp
inspector/inspectorOttava.cpp
2013-06-10 11:03:34 +02:00
inspector/inspectorTrill.cpp
2017-01-05 14:53:21 +01:00
inspector/inspectorHairpin.cpp
inspector/inspectorJump.cpp
inspector/inspectorMarker.cpp
inspector/inspectorGlissando.cpp
inspector/inspectorNote.cpp
inspector/inspectorAmbitus.cpp
2015-07-06 18:16:52 +02:00
inspector/inspectorArpeggio.cpp
2017-01-05 14:53:21 +01:00
inspector/inspectorFingering.cpp
inspector/inspectorTextLine.cpp
2017-01-16 20:51:12 +01:00
inspector/alignSelect.cpp
2017-02-13 08:22:12 +01:00
inspector/offsetSelect.cpp
inspector/scaleSelect.cpp
2017-03-10 17:12:38 +01:00
inspector/sizeSelect.cpp
2017-02-08 11:12:43 +01:00
inspector/inspectorTextBase.cpp
inspector/inspectorDynamic.cpp
inspector/inspectorElementBase.cpp
2017-01-05 14:53:21 +01:00
enableplayforwidget.cpp
editelement.cpp
qmlplugin.cpp
editlyrics.cpp
musicxmlfonthandler.cpp
musicxmlsupport.cpp
exportxml.cpp
importxml.cpp
importxmlfirstpass.cpp
savePositions.cpp
paletteBoxButton.cpp
driver.cpp
exportmidi.cpp
noteGroups.cpp
pathlistdialog.cpp
exampleview.cpp
miconengine.cpp
importmidi/importmidi.cpp
importmidi/importmidi_panel.cpp importmidi/importmidi_operations.cpp
importmidi/importmidi_model.cpp importmidi/importmidi_delegate.cpp
importmidi/importmidi_meter.cpp importmidi/importmidi_quant.cpp
importmidi/importmidi_tuplet.cpp importmidi/importmidi_chord.cpp
importmidi/importmidi_swing.cpp importmidi/importmidi_fraction.cpp
importmidi/importmidi_drum.cpp importmidi/importmidi_clef.cpp
importmidi/importmidi_lrhand.cpp importmidi/importmidi_lyrics.cpp
importmidi/importmidi_inner.cpp importmidi/importmidi_tie.cpp
importmidi/importmidi_tuplet_voice.cpp importmidi/importmidi_beat.cpp
importmidi/importmidi_tuplet_detect.cpp importmidi/importmidi_tuplet_filter.cpp
importmidi/importmidi_tuplet_tonotes.cpp importmidi/importmidi_simplify.cpp
importmidi/importmidi_voice.cpp importmidi/importmidi_view.cpp importmidi/importmidi_key.cpp
importmidi/importmidi_tempo.cpp importmidi/importmidi_instrument.cpp
2015-01-30 14:09:49 +01:00
importmidi/importmidi_chordname.cpp
resourceManager.cpp downloadUtils.cpp
2014-11-10 10:05:25 +01:00
textcursor.cpp continuouspanel.cpp accessibletoolbutton.cpp scoreaccessibility.cpp
startcenter.cpp scoreBrowser.cpp scorePreview.cpp scoreInfo.cpp
2015-02-01 20:50:01 +01:00
logindialog.cpp loginmanager.cpp uploadscoredialog.cpp breaksdialog.cpp searchComboBox.cpp
2015-02-02 09:30:17 +01:00
help.cpp help.h
2016-05-31 17:44:39 +02:00
toolbarEditor.cpp toolbarEditor.h
2016-06-30 15:34:02 +02:00
abstractdialog.cpp abstractdialog.h
2016-07-04 00:46:37 +02:00
toolbuttonmenu.cpp
2012-05-26 14:49:10 +02:00
${OMR_FILES}
${AUDIO}
2012-07-09 14:16:27 +02:00
${SCRIPT_FILES}
driver.h
2015-01-27 11:56:08 +01:00
tremolobarcanvas.h bendcanvas.h fretcanvas.h keycanvas.h harmonycanvas.h
2012-05-26 14:49:10 +02:00
)
target_link_libraries(mscore
awl
diff_match_patch
bww
rtf2html
${QTSINGLEAPPLICATION_LIBRARIES}
synthesizer
2013-04-15 10:38:16 +02:00
midi
fluid
effects
vorbisfile
libmscore
qzip
beatroot
kqoauth
)
if (USE_SYSTEM_FREETYPE)
target_link_libraries(mscore ${FREETYPE_LIBRARIES})
endif (USE_SYSTEM_FREETYPE)
if (MINGW)
set(MSCORE_OUTPUT_NAME ${MUSESCORE_NAME})
elseif (MSCORE_INSTALL_SUFFIX)
set(MSCORE_OUTPUT_NAME "${ExecutableName}${MSCORE_INSTALL_SUFFIX}")
endif (MINGW)
2016-06-10 10:37:53 +02:00
# If MSCORE_OUTPUT_NAME is set (e.g, when cmake is called by the user), the output executable will be
# called MSCORE_OUTPUT_NAME instead of 'mscore'. This can be used to have MuseScore stable and unstable
# both installed in the same prefix on a Linux system.
if (MSCORE_OUTPUT_NAME)
2014-07-22 16:43:29 +02:00
set_target_properties(
${ExecutableName}
PROPERTIES
OUTPUT_NAME ${MSCORE_OUTPUT_NAME}
)
endif (MSCORE_OUTPUT_NAME)
if (ZERBERUS)
target_link_libraries(mscore zerberus synthesizer)
endif (ZERBERUS)
if (AEOLUS)
target_link_libraries(mscore aeolus)
endif (AEOLUS)
if (SOUNDFONT3)
target_link_libraries(mscore ${VORBIS_LIB} ${OGG_LIB})
endif (SOUNDFONT3)
if (HAS_AUDIOFILE)
target_link_libraries(mscore audiofile ${SNDFILE_LIB})
endif (HAS_AUDIOFILE)
2012-05-26 14:49:10 +02:00
if (APPLE)
set_target_properties (mscore
2014-07-22 16:43:29 +02:00
PROPERTIES
MACOSX_BUNDLE_INFO_PLIST ${PROJECT_SOURCE_DIR}/build/MacOSXBundleInfo.plist.in)
2016-06-10 10:37:53 +02:00
# Enable dSym generation
2012-07-28 09:47:21 +02:00
#set_target_properties (mscore
2016-06-10 10:37:53 +02:00
# PROPERTIES
# XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT "dwarf-with-dsym")
endif (APPLE)
2012-05-26 14:49:10 +02:00
if (OSC)
2014-07-22 16:43:29 +02:00
target_link_libraries(mscore ofqf)
2012-05-26 14:49:10 +02:00
endif (OSC)
if (MINGW)
add_custom_command(
OUTPUT ${PROJECT_BINARY_DIR}/resfile.o
COMMAND ${QT_WRC_EXECUTABLE} -i mscore.rc -o ${PROJECT_BINARY_DIR}/mscore.res
COMMAND ${QT_WINE_EXECUTABLE} /home/ws/.wine/drive_c/MingW/bin/windres.exe ${PROJECT_BINARY_DIR}/mscore.res -o ${PROJECT_BINARY_DIR}/resfile.o
DEPENDS ${PROJECT_SOURCE_DIR}/mscore/data/mscore.rc
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/mscore/data
)
set_source_files_properties(
${PROJECT_BINARY_DIR}/resfile.o
PROPERTIES generated true
)
string(TOUPPER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE)
2016-06-10 10:37:53 +02:00
# Windows: Add -mconsole to LINK_FLAGS to get a console window for debug output
2012-05-26 14:49:10 +02:00
if(CMAKE_BUILD_TYPE MATCHES "DEBUG")
set_target_properties( mscore
PROPERTIES
2013-03-14 16:00:06 +01:00
COMPILE_FLAGS "${PCH_INCLUDE} -g -Wall -Wextra -Winvalid-pch ${QT_DEFINITIONS} -DQT_SVG_LIB -DQT_GUI_LIB -DQT_XML_LIB -DQT_CORE_LIB"
LINK_FLAGS "-mwindows -mconsole -L ${CROSSQT}/lib"
2012-05-26 14:49:10 +02:00
)
else(CMAKE_BUILD_TYPE MATCHES "DEBUG")
set_target_properties( mscore
PROPERTIES
2013-03-14 16:00:06 +01:00
COMPILE_FLAGS "${PCH_INCLUDE} -Wall -Wextra -Winvalid-pch ${QT_DEFINITIONS} -DQT_SVG_LIB -DQT_GUI_LIB -DQT_XML_LIB -DQT_CORE_LIB"
LINK_FLAGS "-Wl,-S -mwindows -L ${CROSSQT}/lib"
2012-05-26 14:49:10 +02:00
)
endif(CMAKE_BUILD_TYPE MATCHES "DEBUG")
target_link_libraries(mscore
portaudio
portmidi
winmm
2015-11-16 18:44:31 +01:00
mscore_freetype
2013-07-26 15:39:46 +02:00
z
2012-05-26 14:49:10 +02:00
)
if (OMR)
target_link_libraries(mscore omr poppler)
2012-05-26 14:49:10 +02:00
if (OCR)
target_link_libraries(mscore tesseract_api)
endif (OCR)
endif (OMR)
target_link_libraries(mscore ${QT_mingw_LIBRARIES})
install( TARGETS mscore RUNTIME DESTINATION bin )
# Keep dependencies in alphabetical order. Changes made to this list
# might need to be made in "build/Linux+BSD/portable/copy-libs" too.
install( FILES
${CROSS}/bin/libgcc_s_dw2-1.dll
${CROSS}/bin/libstdc++-6.dll
${CROSS}/bin/libwinpthread-1.dll
2012-05-26 14:49:10 +02:00
${CROSS}/lib/libogg.dll
${CROSS}/lib/libsndfile-1.dll
2012-05-26 14:49:10 +02:00
${CROSS}/lib/libvorbis.dll
${CROSS}/lib/libvorbisfile.dll
${CROSS}/lib/portaudio.dll
${CROSS}/opt/bin/libeay32.dll
${CROSS}/opt/bin/ssleay32.dll
${CROSSQT}/bin/Qt5CLucene.dll
2013-05-14 17:25:16 +02:00
${CROSSQT}/bin/Qt5Core.dll
${CROSSQT}/bin/Qt5Gui.dll
${CROSSQT}/bin/Qt5Help.dll
${CROSSQT}/bin/Qt5Multimedia.dll
${CROSSQT}/bin/Qt5MultimediaWidgets.dll
2013-05-14 17:25:16 +02:00
${CROSSQT}/bin/Qt5Network.dll
${CROSSQT}/bin/Qt5OpenGL.dll
${CROSSQT}/bin/Qt5Positioning.dll
${CROSSQT}/bin/Qt5PrintSupport.dll
${CROSSQT}/bin/Qt5Qml.dll
${CROSSQT}/bin/Qt5Quick.dll
${CROSSQT}/bin/Qt5Sensors.dll
${CROSSQT}/bin/Qt5Sql.dll
${CROSSQT}/bin/Qt5Svg.dll
2014-12-17 17:51:33 +01:00
${CROSSQT}/bin/Qt5WebChannel.dll
${CROSSQT}/bin/Qt5Widgets.dll
${CROSSQT}/bin/Qt5Xml.dll
2013-05-14 17:25:16 +02:00
${CROSSQT}/bin/Qt5XmlPatterns.dll
${PROJECT_SOURCE_DIR}/build/qt.conf
DESTINATION bin)
install(FILES
2013-05-14 17:25:16 +02:00
${CROSSQT}/plugins/iconengines/qsvgicon.dll
DESTINATION bin/iconengines)
install(FILES
2013-05-14 17:25:16 +02:00
${CROSSQT}/plugins/imageformats/qjpeg.dll
${CROSSQT}/plugins/imageformats/qsvg.dll
${CROSSQT}/plugins/imageformats/qtiff.dll
DESTINATION bin/imageformats)
install(FILES
2013-07-12 11:50:40 +02:00
${CROSSQT}/plugins/platforms/qwindows.dll
DESTINATION bin/platforms)
2013-07-17 10:02:21 +02:00
install(FILES
${CROSSQT}/plugins/printsupport/windowsprintersupport.dll
DESTINATION bin/printsupport)
install(FILES
${CROSSQT}/plugins/sqldrivers/qsqlite.dll
DESTINATION bin/sqldrivers)
install(DIRECTORY
${CROSSQT}/qml
DESTINATION .
REGEX ".*d\\.dll" EXCLUDE
REGEX ".*QtGraphicalEffects.*" EXCLUDE
REGEX ".*QtMultimedia.*" EXCLUDE
REGEX ".*QtSensors.*" EXCLUDE
REGEX ".*QtTest.*" EXCLUDE
REGEX ".*QtWebkit.*" EXCLUDE)
2012-05-26 14:49:10 +02:00
else (MINGW)
target_link_libraries(mscore
${ALSA_LIB}
${QT_LIBRARIES}
z
dl
pthread
)
if (USE_SYSTEM_FREETYPE)
target_link_libraries(mscore freetype)
else (USE_SYSTEM_FREETYPE)
target_link_libraries(mscore mscore_freetype)
endif (USE_SYSTEM_FREETYPE)
2012-05-26 14:49:10 +02:00
if (USE_PORTAUDIO)
target_link_libraries(mscore ${PORTAUDIO_LIB})
endif (USE_PORTAUDIO)
2016-08-09 00:25:42 +02:00
if (USE_PORTMIDI)
if (APPLE)
set(PORTMIDI_LIB portmidi)
else (APPLE)
set(PORTMIDI_LIB -lportmidi -lporttime) # Remove -lporttime on RPM-based systems where PortTime is part of PortMidi.
endif (APPLE)
target_link_libraries(mscore ${PORTMIDI_LIB})
endif (USE_PORTMIDI)
2012-05-26 14:49:10 +02:00
if (USE_PULSEAUDIO)
target_link_libraries(mscore ${PULSEAUDIO_LIBRARY})
endif (USE_PULSEAUDIO)
set_target_properties (
mscore
PROPERTIES
2013-03-14 16:00:06 +01:00
COMPILE_FLAGS "${PCH_INCLUDE} -g -Wall -Wno-overloaded-virtual -Winvalid-pch"
2012-05-26 14:49:10 +02:00
)
if (OMR)
target_link_libraries(mscore omr poppler)
2012-05-26 14:49:10 +02:00
if (OCR)
target_link_libraries(mscore tesseract_api)
endif (OCR)
endif (OMR)
if (APPLE)
target_link_libraries(mscore ${OsxFrameworks})
else (APPLE)
target_link_libraries(mscore rt)
endif (APPLE)
2016-06-10 10:37:53 +02:00
# 'gold' does not use indirect shared libraries for symbol resolution, Linux only
2013-03-13 18:55:42 +01:00
if (NOT APPLE)
2012-05-26 14:49:10 +02:00
if(USE_JACK)
target_link_libraries(mscore dl)
endif(USE_JACK)
target_link_libraries(mscore rt)
2013-03-13 18:55:42 +01:00
endif (NOT APPLE)
2012-05-26 14:49:10 +02:00
if (APPLE)
2013-03-13 18:55:42 +01:00
set_target_properties(mscore
PROPERTIES
LINK_FLAGS "-stdlib=libc++"
)
2013-03-14 16:00:06 +01:00
xcode_pch(mscore all)
2012-05-26 14:49:10 +02:00
install (TARGETS mscore BUNDLE DESTINATION ${CMAKE_INSTALL_PREFIX})
install (FILES data/mscore.icns DESTINATION ${Mscore_SHARE_NAME}${Mscore_INSTALL_NAME})
install (FILES data/musescoreDocument.icns DESTINATION ${Mscore_SHARE_NAME}${Mscore_INSTALL_NAME})
else (APPLE)
#### PACKAGING for Linux and BSD based systems (more in top-level CMakeLists.txt) ####
2016-06-10 10:37:53 +02:00
# Install mscore executable (package maintainers may add "MuseScore" and/or "musescore" aliases that symlink to mscore)
2012-05-26 14:49:10 +02:00
install( TARGETS mscore RUNTIME DESTINATION bin )
if (LN_EXECUTABLE)
add_custom_target(mscore_alias ALL
COMMAND echo "Creating symlink alias for mscore executable."
COMMAND ${LN_EXECUTABLE} -sf "mscore${MSCORE_INSTALL_SUFFIX}" "musescore${MSCORE_INSTALL_SUFFIX}"
COMMAND echo 'Symlink alias: musescore${MSCORE_INSTALL_SUFFIX} -> mscore${MSCORE_INSTALL_SUFFIX}'
)
install( FILES ${PROJECT_BINARY_DIR}/mscore/musescore${MSCORE_INSTALL_SUFFIX} DESTINATION bin)
else (LN_EXECUTABLE)
add_custom_target(mscore_alias ALL
COMMAND echo "No symlink aliases will be created."
VERBATIM
)
endif (LN_EXECUTABLE)
2016-06-10 10:37:53 +02:00
# Install MuseScore icons (use SVGs where possible, but install PNGs as backup for systems that don't support SVG)
if (MSCORE_UNSTABLE)
2016-06-10 10:37:53 +02:00
set(MSCORE_ICON_BASE ../assets/musescore-icon-square) # Square icons on development builds
else (MSCORE_UNSTABLE)
2016-06-10 10:37:53 +02:00
set(MSCORE_ICON_BASE ../assets/musescore-icon-round) # Round icons on stable releases
endif (MSCORE_UNSTABLE)
install(FILES ${MSCORE_ICON_BASE}.svg RENAME mscore${MSCORE_INSTALL_SUFFIX}.svg DESTINATION share/icons/hicolor/scalable/apps)
install(FILES ${MSCORE_ICON_BASE}-16.png RENAME mscore${MSCORE_INSTALL_SUFFIX}.png DESTINATION share/icons/hicolor/16x16/apps)
install(FILES ${MSCORE_ICON_BASE}-24.png RENAME mscore${MSCORE_INSTALL_SUFFIX}.png DESTINATION share/icons/hicolor/24x24/apps)
install(FILES ${MSCORE_ICON_BASE}-32.png RENAME mscore${MSCORE_INSTALL_SUFFIX}.png DESTINATION share/icons/hicolor/32x32/apps)
install(FILES ${MSCORE_ICON_BASE}-48.png RENAME mscore${MSCORE_INSTALL_SUFFIX}.png DESTINATION share/icons/hicolor/48x48/apps)
install(FILES ${MSCORE_ICON_BASE}-64.png RENAME mscore${MSCORE_INSTALL_SUFFIX}.png DESTINATION share/icons/hicolor/64x64/apps)
install(FILES ${MSCORE_ICON_BASE}-96.png RENAME mscore${MSCORE_INSTALL_SUFFIX}.png DESTINATION share/icons/hicolor/96x96/apps)
install(FILES ${MSCORE_ICON_BASE}-128.png RENAME mscore${MSCORE_INSTALL_SUFFIX}.png DESTINATION share/icons/hicolor/128x128/apps)
install(FILES ${MSCORE_ICON_BASE}-512.png RENAME mscore${MSCORE_INSTALL_SUFFIX}.png DESTINATION share/icons/hicolor/512x512/apps)
2016-06-10 10:37:53 +02:00
# Install MIME (filetype) icons for each mimetype on Linux
install( FILES ../assets/mscz-icon.svg RENAME application-x-musescore${MSCORE_INSTALL_SUFFIX}.svg
DESTINATION share/icons/hicolor/scalable/mimetypes) # SVG icon for .MSCZ files
install( FILES ../assets/mscz-icon-48.png RENAME application-x-musescore${MSCORE_INSTALL_SUFFIX}.png
DESTINATION share/icons/hicolor/48x48/mimetypes) # PNG icon for .MSCZ files
install( FILES ../assets/mscx-icon.svg RENAME application-x-musescore${MSCORE_INSTALL_SUFFIX}+xml.svg
DESTINATION share/icons/hicolor/scalable/mimetypes) # SVG icon for .MSCX files
install( FILES ../assets/mscx-icon-48.png RENAME application-x-musescore${MSCORE_INSTALL_SUFFIX}+xml.png
DESTINATION share/icons/hicolor/48x48/mimetypes) # PNG icon for .MSCX files
# use a custom icon for MusicXML files (there isn't a standard icon for MusicXML files)
install( FILES ../assets/mxl-icon.svg RENAME application-vnd.recordare.musicxml${MSCORE_INSTALL_SUFFIX}.svg
DESTINATION share/icons/hicolor/scalable/mimetypes) # SVG icon for .MXL (compressed MusicXML) files
install( FILES ../assets/mxl-icon-48.png RENAME application-vnd.recordare.musicxml${MSCORE_INSTALL_SUFFIX}.png
DESTINATION share/icons/hicolor/48x48/mimetypes) # PNG icon for .MXL (compressed MusicXML) files
install( FILES ../assets/xml-icon.svg RENAME application-vnd.recordare.musicxml${MSCORE_INSTALL_SUFFIX}+xml.svg
DESTINATION share/icons/hicolor/scalable/mimetypes) # SVG icon for .XML (MusicXML) files
install( FILES ../assets/xml-icon-48.png RENAME application-vnd.recordare.musicxml${MSCORE_INSTALL_SUFFIX}+xml.png
DESTINATION share/icons/hicolor/48x48/mimetypes) # PNG icon for .XML (MusicXML) files
2016-06-10 10:37:53 +02:00
# Note: Must now run "gtk-update-icon-cache" to set the new icons. This is done in the Makefile.
2012-05-26 14:49:10 +02:00
endif (APPLE)
endif (MINGW)
if (APPLE)
install (FILES
../fonts/gootville/GootvilleText.otf
../fonts/mscore/MScoreText.ttf
2016-10-26 20:36:47 +02:00
../fonts/musejazz/MuseJazzText.otf
../fonts/FreeSerif.ttf
2014-03-04 10:08:00 +01:00
../fonts/FreeSerifBold.ttf
../fonts/FreeSerifItalic.ttf
../fonts/FreeSerifBoldItalic.ttf
2012-05-26 14:49:10 +02:00
../fonts/FreeSans.ttf
../fonts/mscoreTab.ttf
2012-05-26 14:49:10 +02:00
../fonts/mscore-BC.ttf
../fonts/bravura/BravuraText.otf
2012-05-26 14:49:10 +02:00
DESTINATION ${Mscore_SHARE_NAME}${Mscore_INSTALL_NAME}fonts
)
2013-07-20 11:15:56 +02:00
install(DIRECTORY
${QT_INSTALL_PREFIX}/qml
DESTINATION ${Mscore_SHARE_NAME}${Mscore_INSTALL_NAME}
REGEX ".*QtWebkit.*" EXCLUDE
REGEX ".*QtTest.*" EXCLUDE
REGEX ".*QtSensors.*" EXCLUDE
REGEX ".*QtGraphicalEffects.*" EXCLUDE
REGEX ".*QtMultimedia.*" EXCLUDE
REGEX ".*QtAudioEngine.*" EXCLUDE
REGEX ".*_debug\\.dylib" EXCLUDE)
2012-05-26 14:49:10 +02:00
endif (APPLE)
ADD_DEPENDENCIES(${ExecutableName} mops1)
ADD_DEPENDENCIES(${ExecutableName} mops2)