Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update OS X build-from-source doc to using Qt6 by default #2800

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ endif()

set(CMAKE_AUTOMOC ON)

OPTION(WITH_QT6 "Enable Qt 6" OFF)
OPTION(WITH_QT6 "Enable Qt 6" ON)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This changes using Qt 6 by default everywhere and would break a couple of builds for Linux distros.

Would it be possible to make this automatic? Specifically:

  • By default if the option is not overridden, pick Qt 6 preferably and if not found fallback to Qt 5.
  • If set to ON by user, require Qt 6.
  • If set to OFF by user, require Qt 5.

if (WITH_QT6)
set(QT_DEFAULT_MAJOR_VERSION 6)
find_package(Qt6Widgets 6.1.0 REQUIRED)
Expand Down
14 changes: 12 additions & 2 deletions docs/build-source-code.rst
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ In older versions, create solution manually by running ``cmake -G "Visual Studio
Building and Packaging for OS X
-------------------------------

On OS X, required Qt 5 libraries and utilities can be easily installed with `Homebrew <https://brew.sh/>`__.
On OS X, required Qt 6 libraries and utilities can be easily installed with `Homebrew <https://brew.sh/>`__.

::

Expand All @@ -164,10 +164,20 @@ Build with the following commands:

::

cmake -DCMAKE_PREFIX_PATH="$(brew --prefix qt5)" .
cmake -DCMAKE_PREFIX_PATH="$(brew --prefix qt6)" .
cmake --build .
cpack

To build with Qt 5 (make sure to install qt@5 yourself):

::


cmake -DCMAKE_PREFIX_PATH="$(brew --prefix qt5)" -DWITH_QT6=OFF .
cmake --build .
cpack


This will produce a self-contained application bundle ``CopyQ.app``
which can then be copied or moved into ``/Applications``.

Expand Down