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

CONFIG += c++17 breaks 'LeoCAD requires Qt 5.4 or later' requirement #958

Open
trevorsandy opened this issue Nov 11, 2024 · 0 comments
Open

Comments

@trevorsandy
Copy link
Contributor

CONFIG += precompile_header incremental c++17 force_debug_info

CONFIG += c++17 was introduced in Qt 5.11.3 so LeoCAD will require Qt 5.11.3 or later to compile successfully.

To honour LeoCAD requiring Qt 5.4 or later, lines 9 - 26 of leocad.pro could look like this:

equals(QT_MAJOR_VERSION, 5) {
        lessThan(QT_MINOR_VERSION, 4) {
                error("LeoCAD requires Qt5.4 or later.")
        } else:win32-msvc* {
                QMAKE_CXXFLAGS += /std:c++17
        } else:unix {
                greaterThan(QT_MINOR_VERSION, 11) {
                        CONFIG += c++17
                } else {
                        QMAKE_CXXFLAGS += -std=c++17
                }
        }
}

greaterThan(QT_MAJOR_VERSION, 5) {
	QT += openglwidgets
	win32-msvc* {
		QMAKE_CXXFLAGS += /std:c++17
        } else {
                CONFIG += c++17
        }
}

qtHaveModule(gamepad) {
	QT += gamepad
	DEFINES += LC_ENABLE_GAMEPAD
}

INCLUDEPATH += qt common
CONFIG += precompile_header incremental force_debug_info

Cheers,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant