Skip to content

Commit

Permalink
fix #280651: unbreak building without QtWebEngine
Browse files Browse the repository at this point in the history
Shuffle a few things around so we can use the simplified definition
of USE_WEBENGINE everywhere, instead of duplicating the MinGW check.
  • Loading branch information
mirabilos committed Jan 11, 2019
1 parent c1a5e4c commit 829df4e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 deletions.
24 changes: 13 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,19 @@ if (MSVC)
set (MINGW false)
endif (MSVC)

# We need this early, before FindQt5
option(BUILD_WEBENGINE "Built in webengine support" ON)

if (BUILD_WEBENGINE)
if (MINGW)
SET (USE_WEBENGINE 0)
else (MINGW)
SET (USE_WEBENGINE 1)
endif(MINGW)
else (BUILD_WEBENGINE)
SET (USE_WEBENGINE 0)
endif (BUILD_WEBENGINE)

# Look for Qt5
SET(QT_MIN_VERSION "5.8.0")
# Include modules
Expand Down Expand Up @@ -124,7 +137,6 @@ option(BUILD_PULSEAUDIO "Build with support for PulseAudio audio backend." ON)
option(BUILD_ALSA "Build with support for ALSA audio backend." ON)
option(BUILD_PORTAUDIO "Build with support for PortAudio audio backend." ON)
option(BUILD_PORTMIDI "Build with support for PortAudio's MIDI features." ${BUILD_PORTAUDIO}) # PortAudio required
option(BUILD_WEBENGINE "Built in webengine support" ON)
option(BUILD_PCH "Build using precompiled headers." ON)
option(BUILD_FOR_WINSTORE "Build for the Windows Store." OFF)
option(COVERAGE "Build with instrumentation to record code coverage." OFF)
Expand Down Expand Up @@ -264,16 +276,6 @@ SET(MUSESCORE_NAME_VERSION "${MUSESCORE_NAME} ${MUSESCORE_VERSION_MAJOR}")
#
SET(MUSESCORE_VERSION_FULL "${MUSESCORE_VERSION}.${MUSESCORE_VERSION_PATCH}")

if (BUILD_WEBENGINE)
if (MINGW)
SET (USE_WEBENGINE 0)
else (MINGW)
SET (USE_WEBENGINE 1)
endif(MINGW)
else (BUILD_WEBENGINE)
SET (USE_WEBENGINE 0)
endif (BUILD_WEBENGINE)

if (MUSESCORE_LABEL)
SET (MUSESCORE_NAME_VERSION "${MUSESCORE_NAME_VERSION} ${MUSESCORE_LABEL}")
endif (MUSESCORE_LABEL)
Expand Down
4 changes: 2 additions & 2 deletions build/FindQt5.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ set(_components
LinguistTools
Help
)
if (NOT MINGW)
if (USE_WEBENGINE)
set(_components
${_components}
WebEngine
WebEngineCore
WebEngineWidgets
)
endif(NOT MINGW)
endif(USE_WEBENGINE)
foreach(_component ${_components})
find_package(Qt5${_component})
list(APPEND QT_LIBRARIES ${Qt5${_component}_LIBRARIES})
Expand Down

0 comments on commit 829df4e

Please sign in to comment.