| 1 |
#============================================================================= |
| 2 |
# Mscore |
| 3 |
# Linux Music Score Editor |
| 4 |
# |
| 5 |
# Copyright (C) 2002-2011 by Werner Schweer and others |
| 6 |
# |
| 7 |
# This program is free software; you can redistribute it and/or modify |
| 8 |
# it under the terms of the GNU General Public License version 2. |
| 9 |
# |
| 10 |
# This program is distributed in the hope that it will be useful, |
| 11 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 |
# GNU General Public License for more details. |
| 14 |
# |
| 15 |
# You should have received a copy of the GNU General Public License |
| 16 |
# along with this program; if not, write to the Free Software |
| 17 |
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
| 18 |
#============================================================================= |
| 19 |
|
| 20 |
project(mscore) |
| 21 |
|
| 22 |
#minimum tested, report if it works with older |
| 23 |
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.7) |
| 24 |
|
| 25 |
set (CI $ENV{CI}) |
| 26 |
if (CI) |
| 27 |
SET_PROPERTY(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache) |
| 28 |
SET_PROPERTY(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache) |
| 29 |
endif (CI) |
| 30 |
|
| 31 |
# Libraries linked via full path no longer produce linker search paths. |
| 32 |
cmake_policy(SET CMP0003 NEW) |
| 33 |
|
| 34 |
# Don't to link executables to qtmain.lib automatically when they link to the QtCore IMPORTED target |
| 35 |
if(POLICY CMP0020) |
| 36 |
cmake_policy(SET CMP0020 OLD) |
| 37 |
endif(POLICY CMP0020) |
| 38 |
|
| 39 |
# ignore MACOSX_RPATH is not specified for awlplugin |
| 40 |
if(POLICY CMP0042) |
| 41 |
cmake_policy(SET CMP0042 OLD) |
| 42 |
endif(POLICY CMP0042) |
| 43 |
|
| 44 |
# Issue no warning non-existent target argument to get_targer_property() and set the result variable to a -NOTFOUND value rather than issuing a FATAL_ERROR |
| 45 |
if(POLICY CMP0045) |
| 46 |
cmake_policy(SET CMP0045 OLD) |
| 47 |
endif(POLICY CMP0045) |
| 48 |
|
| 49 |
# silently ignore non-existent dependencies (mops1, mops2) |
| 50 |
if(POLICY CMP0046) |
| 51 |
cmake_policy(SET CMP0046 OLD) |
| 52 |
endif(POLICY CMP0046) |
| 53 |
|
| 54 |
# Honor the legacy behavior for variable references and escape sequences |
| 55 |
if(POLICY CMP0053) |
| 56 |
cmake_policy(SET CMP0053 OLD) |
| 57 |
endif(POLICY CMP0053) |
| 58 |
|
| 59 |
# RPATH settings on macOS do not affect install_name |
| 60 |
if(POLICY CMP0068) |
| 61 |
cmake_policy(SET CMP0068 NEW) |
| 62 |
endif(POLICY CMP0068) |
| 63 |
|
| 64 |
# Don't process generated source files with AUTOMOC |
| 65 |
if(POLICY CMP0071) |
| 66 |
cmake_policy(SET CMP0071 OLD) |
| 67 |
endif(POLICY CMP0071) |
| 68 |
|
| 69 |
include (${PROJECT_SOURCE_DIR}/build/ECMQt4To5Porting.cmake) |
| 70 |
include (${PROJECT_SOURCE_DIR}/build/FindQt5Transitional.cmake) |
| 71 |
|
| 72 |
#include modules |
| 73 |
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/build" ${CMAKE_MODULE_PATH}) |
| 74 |
include (UsePkgConfig1) #defines MACRO(PKGCONFIG1 _package _minVersion _include_DIR _link_DIR _link_FLAGS _cflags) |
| 75 |
include (TargetDoc) |
| 76 |
include (FindPulseAudio) |
| 77 |
include (GetCompilerVersion) |
| 78 |
include (CreatePrecompiledHeader) |
| 79 |
|
| 80 |
# for debugging the make system uncomment next line: |
| 81 |
# set(CMAKE_VERBOSE_MAKEFILE ON) |
| 82 |
|
| 83 |
set (CMAKE_AUTOMOC TRUE) |
| 84 |
|
| 85 |
set(MSCORE_UNSTABLE FALSE) # mark as unstable |
| 86 |
|
| 87 |
set(USE_SSE TRUE) |
| 88 |
set(SCRIPT_INTERFACE TRUE) |
| 89 |
|
| 90 |
# Disable components not supported on Windows |
| 91 |
if (MINGW) |
| 92 |
set(WIN_NOT_AVAIL "not available on Windows") |
| 93 |
option(BUILD_PULSEAUDIO ${WIN_NOT_AVAIL} OFF) |
| 94 |
option(BUILD_ALSA ${WIN_NOT_AVAIL} OFF) |
| 95 |
endif (MINGW) |
| 96 |
|
| 97 |
# Disable components not supported on Mac |
| 98 |
if (APPLE) |
| 99 |
set(MAC_NOT_AVAIL "not available on Mac") |
| 100 |
option(BUILD_PULSEAUDIO ${MAC_NOT_AVAIL} OFF) |
| 101 |
option(BUILD_ALSA ${MAC_NOT_AVAIL} OFF) |
| 102 |
endif (APPLE) |
| 103 |
|
| 104 |
# Disable components not supported on Linux/BSD |
| 105 |
if (NOT APPLE AND NOT MINGW) |
| 106 |
set(NIX_NOT_AVAIL "Not available on Linux/BSD") |
| 107 |
#option(BUILD_PORTMIDI "PortMidi disabled on Linux. (It uses ALSA but it's better to use ALSA directly)" OFF) |
| 108 |
endif (NOT APPLE AND NOT MINGW) |
| 109 |
|
| 110 |
option(AEOLUS "enable pipe organ synthesizer" OFF) |
| 111 |
option(ZERBERUS "enable experimental sfz sampler" ON) |
| 112 |
option(OSC "enable OSC remote control protocol" ON) |
| 113 |
option(OMR "enable PDF import" OFF) # OMR - optical music recognition |
| 114 |
# for installation see: http://ubuntuforums.org/showthread.php?t=1647350 |
| 115 |
option(OCR "enable OCR, requires OMR" OFF) # requires tesseract 3.0, needs work on mac/win |
| 116 |
option(SOUNDFONT3 "ogg vorbis compressed fonts" ON) # enable ogg vorbis compressed fonts, require ogg & vorbis |
| 117 |
option(HAS_AUDIOFILE "enable audio export" ON) # requires libsndfile |
| 118 |
option(USE_SYSTEM_QTSINGLEAPPLICATION "Use system QtSingleApplication" OFF) |
| 119 |
option(USE_SYSTEM_FREETYPE "Use system FreeType" OFF) # requires freetype >= 2.5.2, does not work on win |
| 120 |
option(BUILD_LAME "enable mp3 export" ON) # requires libmp3lame (non-free), call CMake with -DBUILD_LAME="OFF" to disable |
| 121 |
option(DOWNLOAD_SOUNDFONT "Download the latest soundfont version as part of the build process" ON) |
| 122 |
|
| 123 |
SET(JACK_LONGNAME "jack (jack audio connection kit)") |
| 124 |
SET(JACK_MIN_VERSION "0.98.0") |
| 125 |
option(BUILD_JACK "Build with support for ${JACK_LONGNAME} audio backend. jack >= ${JACK_MIN_VERSION} will be needed." ON) |
| 126 |
option(BUILD_PULSEAUDIO "Build with support for Pulseaudio audio backend." ON) |
| 127 |
option(BUILD_ALSA "Build with support for ALSA audio backend." ON) |
| 128 |
option(BUILD_PORTAUDIO "Build with support for Portaudio audio backend." ON) |
| 129 |
option(BUILD_PORTMIDI "Build with support for PortAudio's MIDI features." ${BUILD_PORTAUDIO}) # PortAudio required |
| 130 |
option(BUILD_WEBKIT "Built in webkit support" ON) |
| 131 |
option(BUILD_PCH "Build using precompiled headers." OFF) |
| 132 |
option(BUILD_FOR_WINSTORE "Build for the Windows Store." OFF) |
| 133 |
|
| 134 |
if (APPLE) |
| 135 |
set (CMAKE_CXX_COMPILER clang++) |
| 136 |
set (CMAKE_CXX_COMPILER_ID "Clang") |
| 137 |
# Currently, just 'ppc', 'i386' or 'ppc i386' are useful architectures, |
| 138 |
# because the Flash-Player is not yet available as a 64-bit version. |
| 139 |
# Flash is required for displaying the videos of MuseScore-Connect. |
| 140 |
# See http://qt.gitorious.org/qt/pages/Qt470KnownIssues |
| 141 |
# Since 10.6+ only runs on intel, just set it to i386. |
| 142 |
set(CMAKE_OSX_ARCHITECTURES x86_64) |
| 143 |
|
| 144 |
# Adjust and uncomment this variable, if you target a different version |
| 145 |
# of MacOSX. |
| 146 |
# set(CMAKE_OSX_SYSROOT /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk) |
| 147 |
|
| 148 |
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.7) #min version required |
| 149 |
set(HAS_AUDIOFILE TRUE) # requires libsndfile |
| 150 |
|
| 151 |
find_library(AudioToolboxFW NAMES AudioToolbox) |
| 152 |
find_library(AudioUnitFW NAMES AudioUnit) |
| 153 |
find_library(CoreAudioFW NAMES CoreAudio) |
| 154 |
find_library(CoreMidiFW NAMES CoreMIDI) |
| 155 |
find_library(SystemConfigurationFW NAMES SystemConfiguration) |
| 156 |
find_library(CoreServicesFW NAMES CoreServices) |
| 157 |
find_library(AppKit NAMES AppKit) |
| 158 |
set(OsxFrameworks ${AudioToolboxFW} ${AudioUnitFW} ${CoreAudioFW} ${CoreMidiFW} ${SystemConfigurationFW} ${CoreServicesFW} ${AppKit}) |
| 159 |
endif (APPLE) |
| 160 |
|
| 161 |
# |
| 162 |
# Check for gcc compiler >= 4.8 |
| 163 |
# |
| 164 |
if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") |
| 165 |
if (${CMAKE_CXX_COMPILER_MAJOR} LESS 4 |
| 166 |
OR ((${CMAKE_CXX_COMPILER_MAJOR} EQUAL 4) AND (${CMAKE_CXX_COMPILER_MINOR} LESS 8))) |
| 167 |
message(FATAL_ERROR "bad gcc compiler version " ${CMAKE_CXX_COMPILER_VERSION} |
| 168 |
" >= 4.8 required") |
| 169 |
endif() |
| 170 |
endif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") |
| 171 |
|
| 172 |
set(CMAKE_CXX_FLAGS_DEBUG "-g") |
| 173 |
set(CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG -DQT_NO_DEBUG") |
| 174 |
|
| 175 |
if (APPLE) |
| 176 |
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fPIC -stdlib=libc++ -Wno-inconsistent-missing-override") |
| 177 |
else (APPLE) |
| 178 |
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11") |
| 179 |
if (MINGW) |
| 180 |
# -mno-ms-bitfields see #22048 |
| 181 |
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mno-ms-bitfields") |
| 182 |
set(CMAKE_EXE_LINKER_FLAGS "-Wl,--large-address-aware") |
| 183 |
else (MINGW) |
| 184 |
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC") |
| 185 |
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fno-inline") |
| 186 |
endif (MINGW) |
| 187 |
endif(APPLE) |
| 188 |
|
| 189 |
set(CMAKE_INCLUDE_CURRENT_DIR TRUE) |
| 190 |
set(CMAKE_BUILD_WITH_INSTALL_RPATH ON) # Call CMake with option -DCMAKE_SKIP_RPATH to not set RPATH (Debian packaging requirement) |
| 191 |
set(CMAKE_SKIP_RULE_DEPENDENCY TRUE) |
| 192 |
|
| 193 |
# The Mscore version number. |
| 194 |
SET(MUSESCORE_NAME "MuseScore") |
| 195 |
SET(MUSESCORE_VERSION_MAJOR "2") |
| 196 |
SET(MUSESCORE_VERSION_MINOR "3") |
| 197 |
SET(MUSESCORE_VERSION_PATCH "2") |
| 198 |
SET(MUSESCORE_VERSION "${MUSESCORE_VERSION_MAJOR}.${MUSESCORE_VERSION_MINOR}") |
| 199 |
SET(MUSESCORE_NAME_VERSION "${MUSESCORE_NAME} ${MUSESCORE_VERSION_MAJOR}") |
| 200 |
# |
| 201 |
# version schema x.x.x is hardcoded in source |
| 202 |
# |
| 203 |
SET(MUSESCORE_VERSION_FULL "${MUSESCORE_VERSION}.${MUSESCORE_VERSION_PATCH}") |
| 204 |
|
| 205 |
if (MUSESCORE_LABEL) |
| 206 |
SET (MUSESCORE_NAME_VERSION "${MUSESCORE_NAME_VERSION} ${MUSESCORE_LABEL}") |
| 207 |
endif (MUSESCORE_LABEL) |
| 208 |
|
| 209 |
if (MSCORE_UNSTABLE) |
| 210 |
SET (MUSESCORE_NAME_VERSION "${MUSESCORE_NAME_VERSION} (${MUSESCORE_VERSION_FULL} unstable)") |
| 211 |
endif (MSCORE_UNSTABLE) |
| 212 |
|
| 213 |
if (MINGW OR APPLE) |
| 214 |
if(MINGW) |
| 215 |
SET(Mscore_INSTALL_NAME "") |
| 216 |
SET(Mscore_SHARE_NAME "./") |
| 217 |
else(MINGW) |
| 218 |
SET(Mscore_INSTALL_NAME "Contents/Resources/") |
| 219 |
SET(Mscore_SHARE_NAME "mscore.app/") |
| 220 |
endif(MINGW) |
| 221 |
else (MINGW OR APPLE) |
| 222 |
SET(Mscore_INSTALL_NAME "mscore${MSCORE_INSTALL_SUFFIX}-${MUSESCORE_VERSION}/") |
| 223 |
SET(Mscore_SHARE_NAME "share/") |
| 224 |
endif (MINGW OR APPLE) |
| 225 |
|
| 226 |
# Download MuseScore SoundFont |
| 227 |
if (DOWNLOAD_SOUNDFONT) |
| 228 |
set (SF_VERSION_REMOTE_FILE ${PROJECT_BINARY_DIR}/VERSION) |
| 229 |
set (SF_VERSION_LOCAL_FILE ${PROJECT_SOURCE_DIR}/share/sound/VERSION) |
| 230 |
set (DOWNLOAD_URL_ROOT "http://ftp.osuosl.org/pub/musescore/soundfont/MuseScore_General") |
| 231 |
set (SOUND_DIRECTORY ${PROJECT_SOURCE_DIR}/share/sound) |
| 232 |
|
| 233 |
file(DOWNLOAD ${DOWNLOAD_URL_ROOT}/VERSION ${SF_VERSION_REMOTE_FILE} STATUS SF_VERSION_DL_STATUS_LIST) |
| 234 |
list(GET SF_VERSION_DL_STATUS_LIST 0 SF_VERSION_DL_STATUS) |
| 235 |
|
| 236 |
if(EXISTS ${SF_VERSION_REMOTE_FILE} AND SF_VERSION_DL_STATUS EQUAL 0) |
| 237 |
file (STRINGS ${SF_VERSION_REMOTE_FILE} SF_VERSION_REMOTE) |
| 238 |
|
| 239 |
set(SF_VERSION_LOCAL "0.0") |
| 240 |
if (EXISTS ${SF_VERSION_LOCAL_FILE}) |
| 241 |
file (STRINGS ${SF_VERSION_LOCAL_FILE} SF_VERSION_LOCAL) |
| 242 |
endif () |
| 243 |
|
| 244 |
string(COMPARE LESS ${SF_VERSION_LOCAL} ${SF_VERSION_REMOTE} DO_DOWNLOAD) |
| 245 |
if (DO_DOWNLOAD) |
| 246 |
message("Downloading version ${SF_VERSION_REMOTE} of the MuseScore SoundFont. Version is outdated ${SF_VERSION_LOCAL}.") |
| 247 |
# delete soundfont and download new version |
| 248 |
## TODO check STATUS of downloads |
| 249 |
file (REMOVE ${SOUND_DIRECTORY}/MuseScore_General.sf3 |
| 250 |
${SOUND_DIRECTORY}/MuseScore_General-License.md |
| 251 |
${SOUND_DIRECTORY}/MuseScore_General-changelog.txt) |
| 252 |
file(DOWNLOAD ${DOWNLOAD_URL_ROOT}/MuseScore_General.sf3 ${SOUND_DIRECTORY}/MuseScore_General.sf3 SHOW_PROGRESS STATUS SF_DL_STATUS) |
| 253 |
list(GET SF_DL_STATUS 0 HTTP_STATUS) |
| 254 |
if (NOT HTTP_STATUS EQUAL 0) |
| 255 |
list(GET SF_DL_STATUS 1 HTTP_STATUS_TEXT) |
| 256 |
message(FATAL_ERROR "Cannot download new soundfont. Error: ${HTTP_STATUS_TEXT}") |
| 257 |
endif() |
| 258 |
file(DOWNLOAD ${DOWNLOAD_URL_ROOT}/MuseScore_General-License.md ${SOUND_DIRECTORY}/MuseScore_General-License.md) |
| 259 |
file(DOWNLOAD ${DOWNLOAD_URL_ROOT}/MuseScore_General-changelog.txt ${SOUND_DIRECTORY}/MuseScore_General-changelog.txt) |
| 260 |
# replace VERSION file (in any case, delete VERSION file) |
| 261 |
file (COPY ${SF_VERSION_REMOTE_FILE} DESTINATION ${SOUND_DIRECTORY}) |
| 262 |
file (REMOVE ${SF_VERSION_REMOTE_FILE}) |
| 263 |
else(DO_DOWNLOAD) |
| 264 |
message("MuseScore SoundFont is up to date.") |
| 265 |
endif(DO_DOWNLOAD) |
| 266 |
endif() |
| 267 |
endif(DOWNLOAD_SOUNDFONT) |
| 268 |
|
| 269 |
## |
| 270 |
## look for Qt5 |
| 271 |
SET(QT_MIN_VERSION "5.4.0") |
| 272 |
|
| 273 |
SET(QT_USE_QTXML TRUE) |
| 274 |
SET(QT_USE_QTSVG TRUE) |
| 275 |
SET(QT_USE_QTNETWORK TRUE) |
| 276 |
SET(QT_USE_QTDESIGNER TRUE) |
| 277 |
IF (BUILD_WEBKIT) |
| 278 |
SET(QT_USE_QTWEBKIT TRUE) |
| 279 |
SET(USE_WEBKIT 1) |
| 280 |
ELSE (BUILD_WEBKIT) |
| 281 |
SET(QT_USE_QTWEBKIT FALSE) |
| 282 |
ENDIF (BUILD_WEBKIT) |
| 283 |
SET(QT_USE_QTXMLPATTERNS TRUE) |
| 284 |
SET(QT_USE_QTHELP TRUE) |
| 285 |
|
| 286 |
#find_package(Qt5 COMPONENTS Widgets Xml Svg Network Designer WebKit Declarative) |
| 287 |
|
| 288 |
if (BUILD_FOR_WINSTORE) |
| 289 |
set(FOR_WINSTORE 1) |
| 290 |
endif(BUILD_FOR_WINSTORE) |
| 291 |
|
| 292 |
## |
| 293 |
## freetype2 >= 2.5.2 |
| 294 |
## |
| 295 |
|
| 296 |
if (USE_SYSTEM_FREETYPE) |
| 297 |
if (APPLE) |
| 298 |
PKGCONFIG (freetype2 2.5.2 FREETYPE_INCLUDE_DIRS FREETYPE_LIBDIR FREETYPE_LIBRARIES FREETYPE_CPP) |
| 299 |
if (FREETYPE_INCLUDE_DIRS) |
| 300 |
STRING(REGEX REPLACE "\"" "" FREETYPE_INCLUDE_DIRS ${FREETYPE_INCLUDE_DIRS}) |
| 301 |
STRING(REGEX REPLACE "\"" "" FREETYPE_LIBDIR ${FREETYPE_LIBDIR}) |
| 302 |
message("freetype2 detected ${FREETYPE_INCLUDE_DIRS} ${FREETYPE_LIBDIR} ${FREETYPE_LIBRARIES}") |
| 303 |
else (FREETYPE_INCLUDE_DIRS) |
| 304 |
message(FATAL_ERROR "freetype >= 2.5.2 is required\n") |
| 305 |
endif (FREETYPE_INCLUDE_DIRS) |
| 306 |
else (APPLE) |
| 307 |
find_package(Freetype REQUIRED) |
| 308 |
endif (APPLE) |
| 309 |
endif (USE_SYSTEM_FREETYPE) |
| 310 |
|
| 311 |
## |
| 312 |
## alsa >= 1.0.0 |
| 313 |
## |
| 314 |
|
| 315 |
if (BUILD_ALSA) |
| 316 |
PKGCONFIG1 (alsa 1.0.0 ALSA_INCDIR ALSA_LIBDIR ALSA_LIB ALSA_CPP ) |
| 317 |
if (NOT ALSA_INCDIR) |
| 318 |
message(SEND_ERROR "Error: ALSA support requested (BUILD_ALSA=${BUILD_ALSA}), but ALSA >= 1.0.0 was not found.") |
| 319 |
else (NOT ALSA_INCDIR) |
| 320 |
message("ALSA >= 1.0.0 found. ALSA support enabled. INCDIR ${ALSA_INCDIR}, LIBDIR ${ALSA_LIBDIR}, LIB ${ALSA_LIB}, CPP ${ALSA_CPP}") |
| 321 |
set (USE_ALSA 1) |
| 322 |
endif (NOT ALSA_INCDIR) |
| 323 |
else (BUILD_ALSA) |
| 324 |
message(STATUS "ALSA support disabled") |
| 325 |
endif (BUILD_ALSA) |
| 326 |
|
| 327 |
## |
| 328 |
## MIDI |
| 329 |
## |
| 330 |
|
| 331 |
if (APPLE OR MINGW) |
| 332 |
set (HAS_MIDI 1) |
| 333 |
else (APPLE OR MINGW) |
| 334 |
if (USE_ALSA) |
| 335 |
set (HAS_MIDI 1) |
| 336 |
endif (USE_ALSA) |
| 337 |
endif (APPLE OR MINGW) |
| 338 |
|
| 339 |
## |
| 340 |
## pulseaudio |
| 341 |
## |
| 342 |
|
| 343 |
if (BUILD_PULSEAUDIO) |
| 344 |
if (PULSEAUDIO_FOUND) |
| 345 |
set(USE_PULSEAUDIO 1) |
| 346 |
message("Pulseaudio found. Pulseaudio support enabled.") |
| 347 |
else (PULSEAUDIO_FOUND) |
| 348 |
message(SEND_ERROR "Error: Pulseaudio support requested (BUILD_PULSEAUDIO=${BUILD_PULSEAUDIO}), but Pulseaudio was not found.") |
| 349 |
endif (PULSEAUDIO_FOUND) |
| 350 |
else (BUILD_PULSEAUDIO) |
| 351 |
message(STATUS "Pulseaudio support disabled") |
| 352 |
endif (BUILD_PULSEAUDIO) |
| 353 |
|
| 354 |
## |
| 355 |
## lame |
| 356 |
## |
| 357 |
if (APPLE OR MINGW) |
| 358 |
IF (BUILD_LAME) |
| 359 |
include (FindLame) |
| 360 |
set (USE_LAME 1) |
| 361 |
ENDIF (BUILD_LAME) |
| 362 |
else (APPLE OR MINGW) |
| 363 |
IF (BUILD_LAME) |
| 364 |
include (FindLame) |
| 365 |
IF (LAME_FOUND) |
| 366 |
set(USE_LAME 1) |
| 367 |
MESSAGE("LAME found.") |
| 368 |
ELSE (LAME_FOUND) |
| 369 |
set(USE_LAME 0) |
| 370 |
MESSAGE("LAME not found.") |
| 371 |
ENDIF (LAME_FOUND) |
| 372 |
ELSE (BUILD_LAME) |
| 373 |
MESSAGE(STATUS "LAME mp3 support disabled") |
| 374 |
ENDIF (BUILD_LAME) |
| 375 |
endif (APPLE OR MINGW) |
| 376 |
|
| 377 |
## |
| 378 |
## find jack >= JACK_MIN_VERSION |
| 379 |
## |
| 380 |
|
| 381 |
IF(BUILD_JACK) |
| 382 |
IF(MINGW) |
| 383 |
set (USE_JACK 1) |
| 384 |
IF("$ENV{PROCESSOR_ARCHITEW6432}" STREQUAL "") |
| 385 |
IF("$ENV{PROCESSOR_ARCHITECTURE}" STREQUAL "x86") |
| 386 |
# "pure" 32-bit environment |
| 387 |
set (JACK_INCDIR "$ENV{PROGRAMFILES}/Jack/includes") |
| 388 |
set (JACK_LIB "$ENV{PROGRAMFILES}/Jack/lib/libjack.a") |
| 389 |
ELSE("$ENV{PROCESSOR_ARCHITECTURE}" STREQUAL "x86") |
| 390 |
# "pure" 64-bit environment |
| 391 |
set (JACK_INCDIR "$ENV{PROGRAMFILES(x86)}/Jack/includes") |
| 392 |
set (JACK_LIB "$ENV{PROGRAMFILES(x86)}/Jack/lib/libjack.a") |
| 393 |
ENDIF("$ENV{PROCESSOR_ARCHITECTURE}" STREQUAL "x86") |
| 394 |
ELSE("$ENV{PROCESSOR_ARCHITEW6432}" STREQUAL "") |
| 395 |
IF("$ENV{PROCESSOR_ARCHITECTURE}" STREQUAL "x86") |
| 396 |
# 32-bit program running with an underlying 64-bit environment |
| 397 |
set (JACK_INCDIR "$ENV{PROGRAMFILES(x86)}/Jack/includes") |
| 398 |
set (JACK_LIB "$ENV{PROGRAMFILES(x86)}/Jack/lib/libjack.a") |
| 399 |
ELSE("$ENV{PROCESSOR_ARCHITECTURE}" STREQUAL "x86") |
| 400 |
# theoretically impossible case... |
| 401 |
MESSAGE(SEND_ERROR "Error: Impossible program/environment bitness combination deduced: 64-bit program running in 32-bit environment. This is a programming error. PROCESSOR_ARCHITEW6432=$ENV{PROCESSOR_ARCHITEW6432}. PROCESSOR_ARCHITECTURE=$ENV{PROCESSOR_ARCHITECTURE}") |
| 402 |
ENDIF("$ENV{PROCESSOR_ARCHITECTURE}" STREQUAL "x86") |
| 403 |
ENDIF("$ENV{PROCESSOR_ARCHITEW6432}" STREQUAL "") |
| 404 |
MESSAGE("jack support enabled.") |
| 405 |
ELSE(MINGW) |
| 406 |
PKGCONFIG1 (jack ${JACK_MIN_VERSION} JACK_INCDIR JACK_LIBDIR JACK_LIB JACK_CPP) |
| 407 |
IF(JACK_INCDIR) |
| 408 |
MESSAGE(STATUS "${JACK_LONGNAME} >= ${JACK_MIN_VERSION} found. jack support enabled.") |
| 409 |
SET(USE_JACK 1) |
| 410 |
ELSE(JACK_INCDIR) |
| 411 |
MESSAGE(STATUS "${JACK_LONGNAME} >= ${JACK_MIN_VERSION} not found") |
| 412 |
MESSAGE(SEND_ERROR "Error: jack support requested (BUILD_JACK=${BUILD_JACK}), but jack was not found") |
| 413 |
ENDIF(JACK_INCDIR) |
| 414 |
ENDIF(MINGW) |
| 415 |
ELSE(BUILD_JACK) |
| 416 |
MESSAGE(STATUS "${JACK_LONGNAME} support disabled") |
| 417 |
ENDIF(BUILD_JACK) |
| 418 |
|
| 419 |
|
| 420 |
## |
| 421 |
## portaudio |
| 422 |
## |
| 423 |
|
| 424 |
if (BUILD_PORTAUDIO) |
| 425 |
if (MINGW) |
| 426 |
set ( USE_PORTAUDIO 1 ) |
| 427 |
else (MINGW) |
| 428 |
PKGCONFIG1 (portaudio-2.0 19 PORTAUDIO_INCDIR PORTAUDIO_LIBDIR PORTAUDIO_LIB PORTAUDIO_CPP) |
| 429 |
if (PORTAUDIO_INCDIR) |
| 430 |
message("PortAudio found. PortAudio support enabled. INCDIR ${PORTAUDIO_INCDIR}, LIBDIR ${PORTAUDIO_LIBDIR}, LIB ${PORTAUDIO_LIB}") |
| 431 |
set ( USE_PORTAUDIO 1 ) |
| 432 |
else (PORTAUDIO_INCDIR) |
| 433 |
message(SEND_ERROR "Error: Portaudio support requested (BUILD_PORTAUDIO=${BUILD_PORTAUDIO}), but portaudio-2.0 Version 19 was not found (package portaudio19-dev)") |
| 434 |
endif (PORTAUDIO_INCDIR) |
| 435 |
endif (MINGW) |
| 436 |
else (BUILD_PORTAUDIO) |
| 437 |
message(STATUS "Portaudio support disabled") |
| 438 |
endif (BUILD_PORTAUDIO) |
| 439 |
|
| 440 |
## |
| 441 |
## PortMidi |
| 442 |
## |
| 443 |
|
| 444 |
if (BUILD_PORTMIDI) |
| 445 |
if (NOT BUILD_PORTAUDIO) |
| 446 |
message(SEND_ERROR "Error: PortMidi support requested (BUILD_PORTMIDI=${BUILD_PORTMIDI}), but PortAudio support is disabled (BUILD_PORTAUDIO=${BUILD_PORTAUDIO}). PortMidi requires PortAudio.") |
| 447 |
endif (NOT BUILD_PORTAUDIO) |
| 448 |
set (USE_PORTMIDI 1) |
| 449 |
else (BUILD_PORTMIDI) |
| 450 |
message(STATUS "PortMidi support disabled") |
| 451 |
endif (BUILD_PORTMIDI) |
| 452 |
|
| 453 |
if (APPLE) |
| 454 |
if(SOUNDFONT3) |
| 455 |
## |
| 456 |
## libvorbis |
| 457 |
## |
| 458 |
|
| 459 |
PKGCONFIG1 (vorbis 1.3.3 VORBIS_INCDIR VORBIS_LIBDIR VORBIS_LIB VORBIS_CPP) |
| 460 |
if (VORBIS_INCDIR) |
| 461 |
message("libvorbis detected ${VORBIS_INCDIR} ${VORBIS_LIBDIR} ${VORBIS_LIB}") |
| 462 |
else (VORBIS_INCDIR) |
| 463 |
message("libvorbis not found\n") |
| 464 |
endif (VORBIS_INCDIR) |
| 465 |
|
| 466 |
|
| 467 |
## |
| 468 |
## libogg |
| 469 |
## |
| 470 |
|
| 471 |
PKGCONFIG1 (ogg 1.3.0 OGG_INCDIR OGG_LIBDIR OGG_LIB OGG_CPP) |
| 472 |
if (OGG_INCDIR) |
| 473 |
message("libogg detected ${OGG_INCDIR} ${OGG_LIBDIR} ${OGG_LIB}") |
| 474 |
else (OGG_INCDIR) |
| 475 |
message("libogg not found\n") |
| 476 |
endif (OGG_INCDIR) |
| 477 |
endif(SOUNDFONT3) |
| 478 |
|
| 479 |
if(HAS_AUDIOFILE) |
| 480 |
## |
| 481 |
## libsndfile |
| 482 |
## |
| 483 |
|
| 484 |
PKGCONFIG1 (sndfile 1.0.25 SNDFILE_INCDIR SNDFILE_LIBDIR SNDFILE_LIB SNDFILE_CPP) |
| 485 |
if (SNDFILE_INCDIR) |
| 486 |
message("libsndfile detected ${SNDFILE_INCDIR} ${SNDFILE_LIBDIR} ${SNDFILE_LIB}") |
| 487 |
else (SNDFILE_INCDIR) |
| 488 |
message("libsndfile not found\n") |
| 489 |
endif (SNDFILE_INCDIR) |
| 490 |
endif(HAS_AUDIOFILE) |
| 491 |
else(APPLE) |
| 492 |
if(MINGW) |
| 493 |
set(SNDFILE_LIB sndfile-1) |
| 494 |
else(MINGW) |
| 495 |
set(SNDFILE_LIB sndfile) |
| 496 |
endif(MINGW) |
| 497 |
set(OGG_LIB ogg) |
| 498 |
set(VORBIS_LIB vorbis) |
| 499 |
endif(APPLE) |
| 500 |
|
| 501 |
## |
| 502 |
## QtSingleApplication |
| 503 |
## |
| 504 |
|
| 505 |
if (USE_SYSTEM_QTSINGLEAPPLICATION) |
| 506 |
find_path(QTSINGLEAPPLICATION_INCLUDE_DIRS qtsingleapplication.h PATH_SUFFIXES QtSolutions) |
| 507 |
find_library(QTSINGLEAPPLICATION_LIBRARIES QtSolutions_SingleApplication-2.6) |
| 508 |
else(USE_SYSTEM_QTSINGLEAPPLICATION) |
| 509 |
subdirs (thirdparty/singleapp) |
| 510 |
set(QTSINGLEAPPLICATION_INCLUDE_DIRS ${PROJECT_SOURCE_DIR}/singleapp/src) |
| 511 |
set(QTSINGLEAPPLICATION_LIBRARIES qtsingleapp) |
| 512 |
endif(USE_SYSTEM_QTSINGLEAPPLICATION) |
| 513 |
|
| 514 |
## |
| 515 |
## produce config.h file |
| 516 |
## |
| 517 |
configure_file ( |
| 518 |
${PROJECT_SOURCE_DIR}/build/config.h.in |
| 519 |
${PROJECT_BINARY_DIR}/config.h |
| 520 |
) |
| 521 |
configure_file ( |
| 522 |
${PROJECT_SOURCE_DIR}/build/Doxyfile.in |
| 523 |
${PROJECT_BINARY_DIR}/Doxyfile |
| 524 |
) |
| 525 |
configure_file ( |
| 526 |
${PROJECT_SOURCE_DIR}/build/Doxyfile-LibMscore.in |
| 527 |
${PROJECT_BINARY_DIR}/Doxyfile-LibMscore |
| 528 |
) |
| 529 |
|
| 530 |
if (NOT MINGW AND NOT APPLE) |
| 531 |
#### PACKAGING for Linux and BSD based systems (more in mscore/CMakeLists.txt) #### |
| 532 |
# |
| 533 |
# set library search path for runtime linker to load the same |
| 534 |
# qt libraries as we used at compile time |
| 535 |
# |
| 536 |
SET(CMAKE_INSTALL_RPATH "${_qt5Core_install_prefix}/lib") # ignored if CMAKE_SKIP_RPATH="TRUE" |
| 537 |
string(TOUPPER "mscore${MSCORE_INSTALL_SUFFIX}" MAN_MSCORE_UPPER) # Command name shown in uppercase in man pages by convention |
| 538 |
if (${MSCORE_INSTALL_SUFFIX} MATCHES "portable") # Note: "-portable-anything" would match |
| 539 |
# Build portable AppImage as per https://github.com/probonopd/AppImageKit |
| 540 |
if (NOT DEFINED ARCH) |
| 541 |
execute_process(COMMAND arch OUTPUT_VARIABLE ARCH OUTPUT_STRIP_TRAILING_WHITESPACE)# get architecture (strip trailing newline) |
| 542 |
endif (NOT DEFINED ARCH) |
| 543 |
get_filename_component(PORTABLE_INSTALL_PATH ${CMAKE_INSTALL_PREFIX} PATH)# get path (dirname) |
| 544 |
get_filename_component(PORTABLE_INSTALL_NAME ${CMAKE_INSTALL_PREFIX} NAME)# strip path (basename) |
| 545 |
if (NOT MSCORE_UNSTABLE) |
| 546 |
set(PORTABLE_INSTALL_NAME "${PORTABLE_INSTALL_NAME}-${MUSESCORE_VERSION_FULL}") # append version info. |
| 547 |
endif (NOT MSCORE_UNSTABLE) |
| 548 |
set(PORTABLE_INSTALL_NAME "${PORTABLE_INSTALL_NAME}-${ARCH}") # append system architecture. |
| 549 |
set(CMAKE_INSTALL_PREFIX ${PORTABLE_INSTALL_PATH}/${PORTABLE_INSTALL_NAME}.AppDir) # e.g. "MuseScore-X.Y.Z-x86_64.AppDir" |
| 550 |
execute_process(COMMAND echo ${CMAKE_INSTALL_PREFIX} OUTPUT_FILE PREFIX.txt) |
| 551 |
# Prepare portable scripts: |
| 552 |
configure_file(build/Linux+BSD/portable/AppRun.in AppRun @ONLY) |
| 553 |
configure_file(build/Linux+BSD/portable/portable-utils.in portable-utils @ONLY) |
| 554 |
set(SCRIPT_PERMS PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ WORLD_READ) |
| 555 |
install(PROGRAMS ${PROJECT_BINARY_DIR}/AppRun DESTINATION . COMPONENT portable ${SCRIPT_PERMS}) |
| 556 |
install(PROGRAMS ${PROJECT_BINARY_DIR}/portable-utils |
| 557 |
build/Linux+BSD/portable/ldd-recursive |
| 558 |
build/rm-empty-dirs DESTINATION bin COMPONENT portable ${SCRIPT_PERMS}) |
| 559 |
install(FILES build/Linux+BSD/portable/qt.conf DESTINATION bin COMPONENT portable) |
| 560 |
else (${MSCORE_INSTALL_SUFFIX} MATCHES "portable") |
| 561 |
set(MAN_PORTABLE .\\\") # comment out lines in man page that are only relevent to the portable version |
| 562 |
endif (${MSCORE_INSTALL_SUFFIX} MATCHES "portable") |
| 563 |
# install desktop file (perform variable substitution first) |
| 564 |
configure_file(build/Linux+BSD/mscore.desktop.in mscore${MSCORE_INSTALL_SUFFIX}.desktop) |
| 565 |
install( FILES ${PROJECT_BINARY_DIR}/mscore${MSCORE_INSTALL_SUFFIX}.desktop DESTINATION share/applications) |
| 566 |
# substitute variables within man pages |
| 567 |
set(MAN_NAME mscore) |
| 568 |
set(MAN_ALIAS musescore) |
| 569 |
set(MAN_EXTENSION .1) |
| 570 |
set(MAN_FULL_NAME ${MAN_NAME}${MSCORE_INSTALL_SUFFIX}${MAN_EXTENSION}) |
| 571 |
set(MAN_FULL_ALIAS ${MAN_ALIAS}${MSCORE_INSTALL_SUFFIX}${MAN_EXTENSION}) |
| 572 |
set(MAN_TARGET ${PROJECT_SOURCE_DIR}/build/Linux+BSD/${MAN_NAME}${MAN_EXTENSION}.in) |
| 573 |
set(MAN_BUILD ${PROJECT_BINARY_DIR}/${MAN_FULL_NAME}) |
| 574 |
configure_file(${MAN_TARGET} ${MAN_BUILD}) |
| 575 |
# compress man pages if gzip is installed (don't on OpenBSD) |
| 576 |
# note: compressing man pages is normal on Linux but not OpenBSD |
| 577 |
find_program( GZIP_EXECUTABLE gzip DOC "A tool for compressing manpages (optional)." ) |
| 578 |
if (GZIP_EXECUTABLE AND NOT CMAKE_SYSTEM_NAME MATCHES "OpenBSD") |
| 579 |
message(STATUS "Found gzip. Man pages will be compressed.") |
| 580 |
set(MAN_TARGET ${MAN_BUILD}) |
| 581 |
set(MAN_EXTENSION ${MAN_EXTENSION}.gz) |
| 582 |
set(MAN_FULL_NAME ${MAN_NAME}${MSCORE_INSTALL_SUFFIX}${MAN_EXTENSION}) |
| 583 |
set(MAN_FULL_ALIAS ${MAN_ALIAS}${MSCORE_INSTALL_SUFFIX}${MAN_EXTENSION}) |
| 584 |
set(MAN_BUILD ${PROJECT_BINARY_DIR}/${MAN_FULL_NAME}) |
| 585 |
add_custom_command( |
| 586 |
OUTPUT ${MAN_BUILD} |
| 587 |
DEPENDS ${MAN_TARGET} |
| 588 |
COMMAND ${GZIP_EXECUTABLE} -9 < ${MAN_TARGET} > ${MAN_BUILD} |
| 589 |
) |
| 590 |
add_custom_target(manpages ALL |
| 591 |
DEPENDS ${MAN_BUILD} |
| 592 |
COMMAND echo "Man pages have been compressed ready for installation." |
| 593 |
VERBATIM |
| 594 |
) |
| 595 |
else (GZIP_EXECUTABLE AND NOT CMAKE_SYSTEM_NAME MATCHES "OpenBSD") |
| 596 |
if (CMAKE_SYSTEM_NAME MATCHES "OpenBSD") |
| 597 |
message(STATUS "System is OpenBSD: Man pages will not be compressed.") |
| 598 |
else (CMAKE_SYSTEM_NAME MATCHES "OpenBSD") |
| 599 |
message(STATUS "gzip not found (it is optional). Man pages will not be compressed.") |
| 600 |
endif (CMAKE_SYSTEM_NAME MATCHES "OpenBSD") |
| 601 |
add_custom_target(manpages ALL |
| 602 |
COMMAND echo "Man pages will be installed uncompressed." |
| 603 |
VERBATIM |
| 604 |
) |
| 605 |
endif (GZIP_EXECUTABLE AND NOT CMAKE_SYSTEM_NAME MATCHES "OpenBSD") |
| 606 |
# install man pages in either compressed or uncompressed form |
| 607 |
install( FILES ${MAN_BUILD} DESTINATION share/man/man1 COMPONENT doc) |
| 608 |
# create symlink alias for man pages so `man musescore` = `man mscore` |
| 609 |
find_program( LN_EXECUTABLE ln DOC "A tool for creating symbolic link aliases (optional)." ) |
| 610 |
if (LN_EXECUTABLE) |
| 611 |
message(STATUS "Found ln. Symlink aliases will be created for MuseScore executable and the man pages.") |
| 612 |
add_custom_command( |
| 613 |
TARGET manpages |
| 614 |
COMMAND echo "Creating symlink alias for man pages." |
| 615 |
COMMAND ${LN_EXECUTABLE} -sf "${MAN_FULL_NAME}" "${MAN_FULL_ALIAS}" |
| 616 |
COMMAND echo 'Symlink alias: ${MAN_FULL_ALIAS} -> ${MAN_FULL_NAME}' |
| 617 |
) |
| 618 |
install( FILES ${PROJECT_BINARY_DIR}/${MAN_FULL_ALIAS} DESTINATION share/man/man1 COMPONENT doc) |
| 619 |
else (LN_EXECUTABLE) |
| 620 |
message(STATUS "ln not found (it is optional). No symlink aliases will be created.") |
| 621 |
endif (LN_EXECUTABLE) |
| 622 |
# add .MSCZ and .MSCX to MIME database (informs system that filetypes .MSCZ & .MSCX are MuseScore files) |
| 623 |
configure_file(build/Linux+BSD/musescore.xml.in musescore${MSCORE_INSTALL_SUFFIX}.xml) |
| 624 |
install( FILES ${PROJECT_BINARY_DIR}/musescore${MSCORE_INSTALL_SUFFIX}.xml DESTINATION share/mime/packages COMPONENT doc) |
| 625 |
# Note: must now run "update-mime-database" to apply changes. This is done in the Makefile. |
| 626 |
endif (NOT MINGW AND NOT APPLE) |
| 627 |
|
| 628 |
# |
| 629 |
# create precompiled header file |
| 630 |
# |
| 631 |
|
| 632 |
# all.h is expected in PROJECT_BINARY_DIR by subdirs |
| 633 |
execute_process( |
| 634 |
COMMAND ${CMAKE_COMMAND} -E copy ${PROJECT_SOURCE_DIR}/all.h ${PROJECT_BINARY_DIR}/all.h |
| 635 |
WORKING_DIRECTORY ${PROJECT_BINARY_DIR} |
| 636 |
) |
| 637 |
if (NOT MINGW) |
| 638 |
set(BUILD_PCH true) |
| 639 |
endif(NOT MINGW) |
| 640 |
|
| 641 |
precompiled_header(QT_INCLUDES all ${BUILD_PCH}) |
| 642 |
|
| 643 |
ADD_CUSTOM_TARGET(mops1 DEPENDS ${PROJECT_BINARY_DIR}/all.h) |
| 644 |
ADD_CUSTOM_TARGET(mops2 DEPENDS ${PCH}) |
| 645 |
|
| 646 |
## |
| 647 |
## add subdirs |
| 648 |
## |
| 649 |
subdirs( |
| 650 |
mscore awl bww2mxml share midi audiofile fluid mstyle libmscore synthesizer |
| 651 |
effects thirdparty/rtf2html thirdparty/diff thirdparty/beatroot |
| 652 |
thirdparty/xmlstream thirdparty/qzip thirdparty/kQOAuth |
| 653 |
) |
| 654 |
string(TOUPPER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE) |
| 655 |
if (APPLE AND CMAKE_BUILD_TYPE MATCHES "DEBUG") |
| 656 |
#with xcode, we need to have all the targets in the same project |
| 657 |
add_subdirectory(mtest) |
| 658 |
else(APPLE AND CMAKE_BUILD_TYPE MATCHES "DEBUG") |
| 659 |
add_subdirectory(mtest EXCLUDE_FROM_ALL) |
| 660 |
endif(APPLE AND CMAKE_BUILD_TYPE MATCHES "DEBUG") |
| 661 |
|
| 662 |
add_subdirectory(rdoc EXCLUDE_FROM_ALL) |
| 663 |
add_subdirectory(miditools EXCLUDE_FROM_ALL) |
| 664 |
add_subdirectory(fonttools EXCLUDE_FROM_ALL) |
| 665 |
add_subdirectory(manual) |
| 666 |
add_subdirectory(demos) |
| 667 |
|
| 668 |
if (USE_PORTMIDI AND (MINGW OR APPLE)) |
| 669 |
subdirs (thirdparty/portmidi) |
| 670 |
endif (USE_PORTMIDI AND (MINGW OR APPLE)) |
| 671 |
|
| 672 |
if (AEOLUS) |
| 673 |
subdirs (aeolus) |
| 674 |
endif (AEOLUS) |
| 675 |
|
| 676 |
if (ZERBERUS) |
| 677 |
subdirs (zerberus) |
| 678 |
endif (ZERBERUS) |
| 679 |
|
| 680 |
if (OMR) |
| 681 |
subdirs (omr) |
| 682 |
endif (OMR) |
| 683 |
|
| 684 |
if (OSC) |
| 685 |
subdirs (thirdparty/ofqf) |
| 686 |
endif (OSC) |
| 687 |
|
| 688 |
if (NOT USE_SYSTEM_FREETYPE) |
| 689 |
subdirs (thirdparty/freetype) |
| 690 |
endif (NOT USE_SYSTEM_FREETYPE) |
| 691 |
|
| 692 |
|
| 693 |
## |
| 694 |
## includes |
| 695 |
## |
| 696 |
include_directories( |
| 697 |
${PROJECT_SOURCE_DIR} |
| 698 |
${PROJECT_BINARY_DIR} |
| 699 |
${ALSA_INCDIR} |
| 700 |
${JACK_INCDIR} |
| 701 |
${PORTAUDIO_INCDIR} |
| 702 |
${OGG_INCDIR} |
| 703 |
${VORBIS_INCDIR} |
| 704 |
${SNDFILE_INCDIR} |
| 705 |
${LAME_INCLUDE_DIR} |
| 706 |
) |
| 707 |
|
| 708 |
if (USE_SYSTEM_FREETYPE) |
| 709 |
include_directories(${FREETYPE_INCLUDE_DIRS}) |
| 710 |
else (USE_SYSTEM_FREETYPE) |
| 711 |
include_directories(${PROJECT_SOURCE_DIR}/thirdparty/freetype/include) |
| 712 |
endif (USE_SYSTEM_FREETYPE) |
| 713 |
|
| 714 |
## |
| 715 |
## Include packaging |
| 716 |
## |
| 717 |
|
| 718 |
include(Packaging) |
| 719 |
|
| 720 |
## |
| 721 |
## custom target for translation generation |
| 722 |
## |
| 723 |
|
| 724 |
add_custom_target(lupdate |
| 725 |
COMMAND ${PROJECT_SOURCE_DIR}/build/gen-qt-projectfile ${PROJECT_SOURCE_DIR} > mscore.pro |
| 726 |
COMMAND ${QT_LUPDATE_EXECUTABLE} ${PROJECT_BINARY_DIR}/mscore.pro |
| 727 |
COMMAND ${PROJECT_SOURCE_DIR}/build/gen-instruments-projectfile ${PROJECT_SOURCE_DIR}/share/instruments > instruments.pro |
| 728 |
COMMAND ${QT_LUPDATE_EXECUTABLE} ${PROJECT_BINARY_DIR}/instruments.pro |
| 729 |
WORKING_DIRECTORY ${PROJECT_BINARY_DIR} |
| 730 |
) |
| 731 |
|
| 732 |
add_custom_target(lrelease |
| 733 |
COMMAND ${QT_LRELEASE_EXECUTABLE} ${PROJECT_SOURCE_DIR}/share/locale/*.ts |
| 734 |
WORKING_DIRECTORY ${PROJECT_BINARY_DIR} |
| 735 |
) |
| 736 |
|
| 737 |
|
| 738 |
## |
| 739 |
## create and install the plugin framework manual |
| 740 |
## |
| 741 |
|
| 742 |
add_custom_command(OUTPUT ${PROJECT_BINARY_DIR}/plugins |
| 743 |
COMMAND genManual ${PROJECT_SOURCE_DIR} ${PROJECT_BINARY_DIR} |
| 744 |
DEPENDS genManual |
| 745 |
) |
| 746 |
|