Skip to content

Commit

Permalink
Skybolt compiles visual studio 2022
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Reid committed Apr 6, 2024
1 parent 61dd843 commit 3c4b28c
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 45 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,9 @@ jobs:
run: |
python3 -m pip install --upgrade pip
pip3 install "conan>=1.55,<2"
- name: Add conan remotes
- name: Configure conan
run: |
conan config set general.revisions_enabled=1
conan remote add prograda-conan https://prograda.jfrog.io/artifactory/api/conan/prograda-conan
- name: Enable C++11
run: |
conan profile new default --detect
Expand Down
22 changes: 11 additions & 11 deletions Conan/Recipes/openscenegraph-mr/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,18 +124,18 @@ def requirements(self):
self.requires("opengl/system")

if self.options.use_fontconfig:
self.requires("fontconfig/2.13.93")
self.requires("fontconfig/2.14.2")

if self.options.get_safe("with_asio", False):
# Should these be private requires?
self.requires("asio/1.22.1")
self.requires("boost/1.79.0")
self.requires("boost/1.81.0")
if self.options.with_curl:
self.requires("libcurl/7.83.1")
self.requires("libcurl/8.0.1")
if self.options.get_safe("with_dcmtk"):
self.requires("dcmtk/3.6.6")
if self.options.with_freetype:
self.requires("freetype/2.12.1")
self.requires("freetype/2.13.0")
if self.options.with_gdal:
self.requires("gdal/3.4.3")
if self.options.get_safe("with_gif"):
Expand All @@ -147,11 +147,11 @@ def requirements(self):
if self.options.get_safe("with_jpeg"):
self.requires("libjpeg/9e")
if self.options.get_safe("with_openexr"):
self.requires("openexr/3.1.5")
self.requires("openexr/3.1.7")
if self.options.get_safe("with_png"):
self.requires("libpng/1.6.37")
self.requires("libpng/1.6.40")
if self.options.with_tiff:
self.requires("libtiff/4.3.0")
self.requires("libtiff/4.5.1")
if self.options.with_zlib:
self.requires("zlib/1.2.13")

Expand Down Expand Up @@ -483,16 +483,16 @@ def setup_library(lib):
# with_directshow
# setup_plugin("directshow")

if tools.is_apple_os(self.settings.os):
if is_apple_os(self):
setup_plugin("imageio").frameworks = ["Accelerate"]

if ((self.settings.os == "Macos" and self.settings.os.version and tools.Version(self.settings.os.version) >= "10.8")
or (self.settings.os == "iOS" and tools.Version(self.settings.os.version) >= "6.0")):
if ((self.settings.os == "Macos" and self.settings.os.version and Version(self.settings.os.version) >= "10.8")
or (self.settings.os == "iOS" and Version(self.settings.os.version) >= "6.0")):
plugin = setup_plugin("avfoundation")
plugin.requires.append("osgViewer")
plugin.frameworks = ["AVFoundation", "Cocoa", "CoreVideo", "CoreMedia", "QuartzCore"]

if self.settings.os == "Macos" and self.settings.os.version and tools.Version(self.settings.os.version) <= "10.6" and self.settings.arch == "x86":
if self.settings.os == "Macos" and self.settings.os.version and Version(self.settings.os.version) <= "10.6" and self.settings.arch == "x86":
setup_plugin("qt").frameworks = ["QuickTime"]

if self.settings.os == "Macos" and self.settings.arch == "x86":
Expand Down
31 changes: 14 additions & 17 deletions conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,14 @@ class SkyboltConan(ConanFile):
no_copy_source = True

requires = [
"boost/1.75.0@_/_",
"catch2/2.13.8@_/_",
"cpp-httplib/0.10.1@_/_",
"earcut/2.2.3@_/_",
"glm/0.9.9.8@_/_",
"nlohmann_json/3.10.5@_/_",
"zlib/1.2.13@_/_", # Indirect dependency. Specified to resolve version clash between qt and openscenegraph.
"libjpeg/9e@_/_", # Indirect dependency. Specified to resolve version clash between qt and openscenegraph.
"zstd/1.5.4" # Indirect dependency. Specified to resolve version clash between libtiff and libmysqlclient.
"boost/1.75.0@_/_#989077de56cb85b727be210b5827d52f",
"catch2/2.13.8@_/_#ac821c6881627aece6c7063bd5aa73ea",
"cpp-httplib/0.10.1@_/_#5078af8ecb0001ebdc8c799d38ac9b16",
"earcut/2.2.3@_/_#7c612e8a3119c4cbf446b7096ecf2831",
"expat/2.5.0@_/_#91e43e4544923e4c934bfad1fa4306f9", # Indirect dependency to resolve version conflict between readosm and fontconfig
"glm/0.9.9.8@_/_#550ca1927ce2617e53b4514cff326923",
"nlohmann_json/3.10.5@_/_#1ebcf334c3f52d96e057d5aba398c491",
"zlib/1.2.13@_/_#97d5730b529b4224045fe7090592d4c1" # Indirect dependency to resolve version conflict between libpng and boost
]

def include_package(self, name, version, subfolder=None):
Expand All @@ -68,7 +67,7 @@ def requirements(self):
self.include_package("openscenegraph-mr", "3.7.0", "all")

if self.options.enable_bullet:
self.requires("bullet3/3.22a@_/_")
self.requires("bullet3/3.22a@_/_#29b44d5d03e941af7f47285c379fef16")

if self.options.enable_cigi:
self.include_package("cigicl", "4.0.6a")
Expand All @@ -78,17 +77,15 @@ def requirements(self):
self.include_package("xsimd", "7.4.10")

if self.options.enable_map_features_converter:
self.requires("readosm/1.1.0a@_/_")
self.requires("readosm/1.1.0a@_/_#23e27a65a8846ce66e7f151d95c9229f")

if self.options.enable_python:
self.requires("pybind11/2.9.1@_/_")
self.requires("pybind11/2.9.1@_/_#017b6606f856caa02c085b034720791e")

if self.options.enable_sprocket:
self.requires("expat/2.4.8@_/_") # Indirect dependency. Specified to resolve version clash between wayland (used by Qt) and fontconfig (used by OSG)
self.requires("openssl/1.1.1s@_/_") # Indirect dependency. Specified to resolve version clash between qt/5.15.3 and libcurl/7.83.1
self.requires("ois/1.5@_/_")
self.requires("qt/5.15.3@_/_")
self.requires("qwt/6.1.6@_/_")
self.requires("ois/1.5@_/_#9b0cf516bb04e6393b37e088d6f6d83e")
self.requires("qt/5.15.11@_/_#64fc18b0c5ab189f347993a9853144ad")
self.requires("qwt/6.2.0@_/_#8534a295b1e8c7ca6915f52601fb56b7")
self.include_package("toolwindowmanager", "1.0.0")

def build(self):
Expand Down
10 changes: 6 additions & 4 deletions src/Skybolt/MapFeaturesConverter/FeaturesConverter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@
#include <SkyboltVis/Renderable/Planet/Features/PlanetFeaturesHelpers.h>
#include <SkyboltCommon/Exception.h>
#include <SkyboltCommon/Math/MathUtility.h>

#include <readosm.h>
#include <sstream>

#include <cmath>
#include <iostream>
#include <map>
#include <set>
#include <iostream>
#include <boost/algorithm/string.hpp>
#include <boost/lexical_cast.hpp>
#include <sstream>
#include <boost/algorithm/string.hpp>

using namespace skybolt::math;
using skybolt::sim::LatLon;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#pragma once

#include "btBulletDynamicsCommon.h"
#include <memory>

namespace skybolt {
namespace sim {
Expand Down
4 changes: 2 additions & 2 deletions src/Skybolt/SkyboltVis/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ include_directories(${OSG_INCLUDE_DIR})
find_package(OpenThreads)

find_package(cxxtimer REQUIRED)
find_package(earcut REQUIRED)
find_package(earcut_hpp REQUIRED)
find_package(httplib REQUIRED)
find_package(px_sched REQUIRED)

Expand All @@ -47,7 +47,7 @@ set(LIBRARIES
${OPENTHREADS_LIBRARIES}
${muFFT_LIBRARIES}
cxxtimer::cxxtimer
earcut::earcut
earcut_hpp::earcut_hpp
httplib::httplib
px_sched::px_sched
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace skybolt {
HelpDisplayToggleEventListener::HelpDisplayToggleEventListener(const osg::ref_ptr<HelpDisplayRenderOperation>& helpDisplay) :
mHelpDisplay(helpDisplay)
{
assert(mHelpDisplaySystem);
assert(mHelpDisplay);
}

void HelpDisplayToggleEventListener::onEvent(const Event& event)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,40 +94,40 @@ class CurveData : public QwtArraySeriesData<QPointF>
if (dirtyBounds)
{
dirtyBounds = false;
d_boundingRect = qwtBoundingRect(*this);
cachedBoundingRect = qwtBoundingRect(*this);
}

return d_boundingRect;
return cachedBoundingRect;
}

inline void append(const QPointF &point)
{
d_samples += point;
m_samples += point;
dirtyBounds = true;
}

inline void remove(int i)
{
d_samples.erase(d_samples.begin() + i);
m_samples.erase(m_samples.begin() + i);
dirtyBounds = true;
}

inline void replace(int i, const QPointF &point)
{
d_samples[i] = point;
m_samples[i] = point;
dirtyBounds = true;
}

inline void insert(int i, const QPointF &point)
{
d_samples.insert(i, point);
m_samples.insert(i, point);
dirtyBounds = true;
}

void clear()
{
d_samples.clear();
d_samples.squeeze();
m_samples.clear();
m_samples.squeeze();
dirtyBounds = true;
}
private:
Expand Down

0 comments on commit 3c4b28c

Please sign in to comment.