From 9076772cf600def6f735e4e2d2d3dc6928e5d153 Mon Sep 17 00:00:00 2001 From: Dan Paulat Date: Sun, 13 Jul 2025 14:31:25 -0500 Subject: [PATCH 1/5] Remove GLEW as a dependency (cherry picked from commit 1b404d8b9ff95baaa0d7ee11089e79d6d5e65ff9) --- conanfile.py | 1 - scwx-qt/scwx-qt.cmake | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/conanfile.py b/conanfile.py index 908aab88..8ed594d3 100644 --- a/conanfile.py +++ b/conanfile.py @@ -11,7 +11,6 @@ class SupercellWxConan(ConanFile): "freetype/2.13.2", "geographiclib/2.4", "geos/3.13.0", - "glew/2.2.0", "glm/1.0.1", "gtest/1.16.0", "libcurl/8.12.1", diff --git a/scwx-qt/scwx-qt.cmake b/scwx-qt/scwx-qt.cmake index e96e828a..e4a392b3 100644 --- a/scwx-qt/scwx-qt.cmake +++ b/scwx-qt/scwx-qt.cmake @@ -17,8 +17,8 @@ find_package(Boost) find_package(Fontconfig) find_package(geographiclib) find_package(geos) -find_package(GLEW) find_package(glm) +find_package(OpenGL) find_package(Python COMPONENTS Interpreter) find_package(SQLite3) @@ -746,9 +746,9 @@ target_link_libraries(scwx-qt PUBLIC Qt${QT_VERSION_MAJOR}::Widgets GEOS::geos GEOS::geos_cxx_flags glad_gl_core_33 - GLEW::GLEW glm::glm imgui + OpenGL::GLU qt6ct-common qt6ct-widgets SQLite::SQLite3 From 9ac941686b75821ac3e43cb0e4a85b1fa1d4fb30 Mon Sep 17 00:00:00 2001 From: Dan Paulat Date: Sun, 13 Jul 2025 17:17:09 -0500 Subject: [PATCH 2/5] GL_SILENCE_DEPRECATION is required for macOS (cherry picked from commit e0d1379423e688c27931e28aef17f4b066e8ac68) --- scwx-qt/scwx-qt.cmake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scwx-qt/scwx-qt.cmake b/scwx-qt/scwx-qt.cmake index e4a392b3..d013bfb8 100644 --- a/scwx-qt/scwx-qt.cmake +++ b/scwx-qt/scwx-qt.cmake @@ -662,6 +662,11 @@ if (LINUX) target_compile_definitions(supercell-wx PRIVATE QT_NO_EMIT) endif() +if (APPLE) + target_compile_definitions(scwx-qt PRIVATE GL_SILENCE_DEPRECATION) + target_compile_definitions(supercell-wx PRIVATE GL_SILENCE_DEPRECATION) +endif() + target_include_directories(scwx-qt PUBLIC ${scwx-qt_SOURCE_DIR}/source ${FTGL_INCLUDE_DIR} ${IMGUI_INCLUDE_DIRS} From f387e1e5258fbcb255e469b203c82cbda3124b89 Mon Sep 17 00:00:00 2001 From: Dan Paulat Date: Sun, 13 Jul 2025 17:31:25 -0500 Subject: [PATCH 3/5] Add mesa-glu requirement for Linux - Remove onetbb for macOS (cherry picked from commit 7a4ce740cd6a6f46bf1df212cd32617c3f55d487) --- conanfile.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/conanfile.py b/conanfile.py index 8ed594d3..ca2dfbd2 100644 --- a/conanfile.py +++ b/conanfile.py @@ -41,8 +41,7 @@ class SupercellWxConan(ConanFile): def requirements(self): if self.settings.os == "Linux": - self.requires("onetbb/2022.0.0") - elif self.settings.os == "Macos": + self.requires("mesa-glu/9.0.3") self.requires("onetbb/2022.0.0") def generate(self): From ad8569532a2341fec513e76c3aacbfd46c5d8f9f Mon Sep 17 00:00:00 2001 From: Dan Paulat Date: Sun, 13 Jul 2025 23:12:47 -0500 Subject: [PATCH 4/5] Ensure the mesa-glu::mesa-glu target is used on Linux instead of OpenGL::GLU (cherry picked from commit b0a8c6576dc29f46f3cea26fbd06966b713fb4e7) --- scwx-qt/scwx-qt.cmake | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scwx-qt/scwx-qt.cmake b/scwx-qt/scwx-qt.cmake index d013bfb8..194601e9 100644 --- a/scwx-qt/scwx-qt.cmake +++ b/scwx-qt/scwx-qt.cmake @@ -734,6 +734,13 @@ if (LINUX) target_link_libraries(scwx-qt PUBLIC Qt${QT_VERSION_MAJOR}::WaylandClient) endif() +if (LINUX) + find_package(mesa-glu REQUIRED) + target_link_libraries(scwx-qt PUBLIC mesa-glu::mesa-glu) +else() + target_link_libraries(scwx-qt PUBLIC OpenGL::GLU) +endif() + target_link_libraries(scwx-qt PUBLIC Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::OpenGLWidgets Qt${QT_VERSION_MAJOR}::Multimedia @@ -753,7 +760,6 @@ target_link_libraries(scwx-qt PUBLIC Qt${QT_VERSION_MAJOR}::Widgets glad_gl_core_33 glm::glm imgui - OpenGL::GLU qt6ct-common qt6ct-widgets SQLite::SQLite3 From 2ffc1ca9b034c37074496d3957869417b6834e80 Mon Sep 17 00:00:00 2001 From: Dan Paulat Date: Tue, 15 Jul 2025 23:35:44 -0500 Subject: [PATCH 5/5] Update acknowledgements for Mesa instead of GLEW --- ACKNOWLEDGEMENTS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ACKNOWLEDGEMENTS.md b/ACKNOWLEDGEMENTS.md index b0225bbe..1608b2ae 100644 --- a/ACKNOWLEDGEMENTS.md +++ b/ACKNOWLEDGEMENTS.md @@ -24,7 +24,6 @@ Supercell Wx uses code from the following dependencies: | [GeographicLib](https://geographiclib.sourceforge.io/) | [MIT License](https://spdx.org/licenses/MIT.html) | | [geos](https://libgeos.org/) | [GNU Lesser General Public License v2.1 or later](https://spdx.org/licenses/LGPL-2.1-or-later.html) | | [GLAD](https://github.com/Dav1dde/glad) | [MIT License](https://spdx.org/licenses/MIT.html) | -| [GLEW](https://www.opengl.org/sdk/libs/GLEW/) | [MIT License](https://spdx.org/licenses/MIT.html) | | [GLM](https://github.com/g-truc/glm) | [MIT License](https://spdx.org/licenses/MIT.html) | | [GoogleTest](https://google.github.io/googletest/) | [BSD 3-Clause "New" or "Revised" License](https://spdx.org/licenses/BSD-3-Clause.html) | | [HSLuv](https://www.hsluv.org/) | [MIT License](https://spdx.org/licenses/MIT.html) | @@ -33,6 +32,7 @@ Supercell Wx uses code from the following dependencies: | [libpng](http://libpng.org/pub/png/libpng.html) | [PNG Reference Library version 2](https://spdx.org/licenses/libpng-2.0.html) | | [libxml2](http://xmlsoft.org/) | [MIT License](https://spdx.org/licenses/MIT.html) | | [MapLibre Native](https://maplibre.org/projects/maplibre-native/) | [BSD 2-Clause "Simplified" License](https://spdx.org/licenses/BSD-2-Clause.html) | +| [Mesa 3D](https://mesa3d.org/) | [MIT License](https://spdx.org/licenses/MIT.html) | | [nunicode](https://bitbucket.org/alekseyt/nunicode/src/master/) | [MIT License](https://spdx.org/licenses/MIT.html) | Modified for MapLibre Native | | [OpenSSL](https://www.openssl.org/) | [OpenSSL License](https://spdx.org/licenses/OpenSSL.html) | | [Qt](https://www.qt.io/) | [GNU Lesser General Public License v3.0 only](https://spdx.org/licenses/LGPL-3.0-only.html) | Qt Core, Qt GUI, Qt Multimedia, Qt Network, Qt OpenGL, Qt Positioning, Qt Serial Port, Qt SQL, Qt SVG, Qt Widgets
Additional Licenses: https://doc.qt.io/qt-6/licenses-used-in-qt.html |