[libqglviewer] Fix error C2039 when build port with VS2019 (#36489)

This commit is contained in:
Cheney Wang 2024-02-03 05:37:58 +08:00 committed by GitHub
parent 1aef44f1c4
commit f9a5556237
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 62 additions and 8 deletions

View File

@ -0,0 +1,52 @@
diff --git a/QGLViewer/VRender/NVector3.h b/QGLViewer/VRender/NVector3.h
index 40b7f98..f2d8305 100644
--- a/QGLViewer/VRender/NVector3.h
+++ b/QGLViewer/VRender/NVector3.h
@@ -7,6 +7,8 @@
namespace vrender
{
class Vector3;
+ class NVector3;
+ std::ostream& operator<<(std::ostream &out,const NVector3 &u);
class NVector3
{
diff --git a/QGLViewer/VRender/Primitive.h b/QGLViewer/VRender/Primitive.h
index 88ab11d..d38470d 100644
--- a/QGLViewer/VRender/Primitive.h
+++ b/QGLViewer/VRender/Primitive.h
@@ -21,6 +21,7 @@ namespace vrender
{
class Feedback3DColor ;
class Primitive ;
+ std::ostream& operator<<(std::ostream&, const Feedback3DColor&) ;
#define EPS_SMOOTH_LINE_FACTOR 0.06 /* Lower for better smooth lines. */
diff --git a/QGLViewer/VRender/Vector2.h b/QGLViewer/VRender/Vector2.h
index f6aaaf3..7b9b82a 100644
--- a/QGLViewer/VRender/Vector2.h
+++ b/QGLViewer/VRender/Vector2.h
@@ -6,7 +6,9 @@
namespace vrender
{
+ class Vector2;
class Vector3;
+ std::ostream& operator<< (std::ostream&,const Vector2&);
class Vector2
{
diff --git a/QGLViewer/VRender/Vector3.h b/QGLViewer/VRender/Vector3.h
index 32597e8..f6d5099 100644
--- a/QGLViewer/VRender/Vector3.h
+++ b/QGLViewer/VRender/Vector3.h
@@ -10,6 +10,8 @@
namespace vrender
{
class NVector3;
+ class Vector3;
+ std::ostream& operator<< (std::ostream&, const Vector3&);
class Vector3
{

View File

@ -1,10 +1,11 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO GillesDebunne/libQGLViewer
REF v2.9.1
REF "v${VERSION}"
SHA512 09bfc5c0f07e51625a9af0094b83f40f84ead55a67c6e492c9702521f58c6b461bc840382fb73b64d16ad71a0a2a75d04aa12a77a78ced0a19e0e784e8d36bd7
PATCHES
Add-compile-definitions.patch
Fix-error-c2039.patch #https://github.com/GillesDebunne/libQGLViewer/pull/80
)
vcpkg_cmake_configure(
@ -17,4 +18,4 @@ vcpkg_fixup_pkgconfig()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(INSTALL ${SOURCE_PATH}/LICENCE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libqglviewer RENAME copyright)
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENCE")

View File

@ -1,7 +1,7 @@
{
"name": "libqglviewer",
"version": "2.9.1",
"port-version": 1,
"port-version": 2,
"description": "libQGLViewer is an open source C++ library based on Qt that eases the creation of OpenGL 3D viewers.",
"homepage": "http://libqglviewer.com/",
"license": "GPL-2.0-or-later",
@ -14,10 +14,6 @@
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}

View File

@ -4750,7 +4750,7 @@
},
"libqglviewer": {
"baseline": "2.9.1",
"port-version": 1
"port-version": 2
},
"libqrencode": {
"baseline": "4.1.1",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "bfaae9deb95ec0d71a5d9ba8342fd3c83c8871fa",
"version": "2.9.1",
"port-version": 2
},
{
"git-tree": "fb8cb610ce82055671ffb7e84836da4a02cc3127",
"version": "2.9.1",