From 433be0a46d51011af88067d4aeed6401013f7ead Mon Sep 17 00:00:00 2001 From: Skarn Date: Thu, 27 Jan 2022 15:51:23 +0300 Subject: [PATCH] fix build issues on Mac OS --- CMakeLists.txt | 4 ++-- src/math/ray.cpp | 1 + src/noggit/ModelInstance.cpp | 2 ++ src/noggit/Selection.cpp | 2 ++ src/noggit/WMOInstance.cpp | 2 ++ .../ui/tools/NodeEditor/Nodes/Logic/LogicReturnNode.cpp | 1 + .../windows/projectCreation/NoggitProjectCreationDialog.cpp | 4 ++-- src/opengl/scoped.ipp | 2 +- 8 files changed, 13 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 49a8ce0c..2a72186d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -366,8 +366,8 @@ add_custom_command(TARGET noggit POST_BUILD SET_PROPERTY(TARGET noggit PROPERTY AUTOMOC ON) IF(APPLE) - TARGET_INCLUDE_DIRECTORIES(noggit PRIVATE /usr/local/Cellar/llvm/12.0.1/include/c++/v1/) - TARGET_LINK_LIBRARIES(noggit /usr/local/Cellar/llvm/12.0.1/lib/libc++.1.0.dylib) + TARGET_INCLUDE_DIRECTORIES(noggit PRIVATE /usr/local/Cellar/llvm/13.0.0_2/include/c++/v1/) + TARGET_LINK_LIBRARIES(noggit /usr/local/Cellar/llvm/13.0.0_2/lib/libc++.1.0.dylib) ENDIF() SET(_noggit_revision_output_dir "${CMAKE_BINARY_DIR}/revision_output") diff --git a/src/math/ray.cpp b/src/math/ray.cpp index 78d4c665..04e71313 100644 --- a/src/math/ray.cpp +++ b/src/math/ray.cpp @@ -3,6 +3,7 @@ #include #include +#include namespace math { diff --git a/src/noggit/ModelInstance.cpp b/src/noggit/ModelInstance.cpp index ae7d71b5..4fa8c079 100644 --- a/src/noggit/ModelInstance.cpp +++ b/src/noggit/ModelInstance.cpp @@ -13,6 +13,8 @@ #include #include +#include + ModelInstance::ModelInstance(BlizzardArchive::Listfile::FileKey const& file_key , Noggit::NoggitRenderContext context) : SceneObject(SceneObjectTypes::eMODEL, context) diff --git a/src/noggit/Selection.cpp b/src/noggit/Selection.cpp index a0d9ec10..5885a25e 100644 --- a/src/noggit/Selection.cpp +++ b/src/noggit/Selection.cpp @@ -2,6 +2,8 @@ #include #include +#include + void selected_chunk_type::updateDetails(Noggit::Ui::detail_infos* detail_widget) { diff --git a/src/noggit/WMOInstance.cpp b/src/noggit/WMOInstance.cpp index c3e5cbb4..b7e2bd16 100644 --- a/src/noggit/WMOInstance.cpp +++ b/src/noggit/WMOInstance.cpp @@ -11,6 +11,8 @@ #include #include +#include + WMOInstance::WMOInstance(BlizzardArchive::Listfile::FileKey const& file_key, ENTRY_MODF const* d, Noggit::NoggitRenderContext context) : SceneObject(SceneObjectTypes::eWMO, context) , wmo(file_key, context) diff --git a/src/noggit/ui/tools/NodeEditor/Nodes/Logic/LogicReturnNode.cpp b/src/noggit/ui/tools/NodeEditor/Nodes/Logic/LogicReturnNode.cpp index 615ec834..331c5f2c 100644 --- a/src/noggit/ui/tools/NodeEditor/Nodes/Logic/LogicReturnNode.cpp +++ b/src/noggit/ui/tools/NodeEditor/Nodes/Logic/LogicReturnNode.cpp @@ -6,6 +6,7 @@ #include #include +#include using namespace Noggit::Ui::Tools::NodeEditor::Nodes; diff --git a/src/noggit/ui/windows/projectCreation/NoggitProjectCreationDialog.cpp b/src/noggit/ui/windows/projectCreation/NoggitProjectCreationDialog.cpp index 9e3a4b18..e8ce2917 100644 --- a/src/noggit/ui/windows/projectCreation/NoggitProjectCreationDialog.cpp +++ b/src/noggit/ui/windows/projectCreation/NoggitProjectCreationDialog.cpp @@ -34,13 +34,13 @@ NoggitProjectCreationDialog::NoggitProjectCreationDialog(ProjectInformation& pro ); QObject::connect(ui->projectPathField_browse, &QPushButton::clicked - , [&] + , [this] { QSettings settings; auto defaultPath = settings.value("project/game_path").toString(); ui->projectPathField->setText(defaultPath); - QString folderName = QFileDialog::getExistingDirectory(parent, "Select Client Directory", defaultPath, QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks); + QString folderName = QFileDialog::getExistingDirectory(this, "Select Client Directory", defaultPath, QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks); ui->projectPathField->setText(folderName); } ); diff --git a/src/opengl/scoped.ipp b/src/opengl/scoped.ipp index c2e56971..5b301b27 100644 --- a/src/opengl/scoped.ipp +++ b/src/opengl/scoped.ipp @@ -106,7 +106,7 @@ namespace OpenGL //: type == GL_SHADER_STORAGE_BUFFER ? GL_SHADER_STORAGE_BUFFER_BINDING : type == GL_TRANSFORM_FEEDBACK_BUFFER ? GL_TRANSFORM_FEEDBACK_BUFFER_BINDING : type == GL_UNIFORM_BUFFER ? GL_UNIFORM_BUFFER_BINDING - : type == GL_TEXTURE_BUFFER ? GL_TEXTURE_BUFFER_BINDING + : type == GL_TEXTURE_BUFFER ? GL_TEXTURE_BINDING_BUFFER : throw std::logic_error ("bad bind target") , reinterpret_cast (&_old) );