summaryrefslogtreecommitdiff
blob: b0db38a0e8a11d949a2ffd0e1632f623262cf5d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
From 059ee0e091f1c658c20202a9123bdf90fc7fa307 Mon Sep 17 00:00:00 2001
From: RichardTea <31507749+RichardTea@users.noreply.github.com>
Date: Fri, 11 Oct 2019 16:28:14 +0100
Subject: [PATCH] Update assimp legal and version

Will now report the major and minor versions specified in cmakelists
---
 code/Common/Version.cpp | 14 +++++---------
 test/unit/utVersion.cpp |  2 +-
 2 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/code/Common/Version.cpp b/code/Common/Version.cpp
index 868cfb06af..cf1da7d5ba 100644
--- a/code/Common/Version.cpp
+++ b/code/Common/Version.cpp
@@ -46,8 +46,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include <assimp/scene.h>
 #include "ScenePrivate.h"
 
-static const unsigned int MajorVersion = 5;
-static const unsigned int MinorVersion = 0;
+#include "revision.h"
 
 // --------------------------------------------------------------------------------
 // Legal information string - don't remove this.
@@ -56,9 +55,9 @@ static const char* LEGAL_INFORMATION =
 "Open Asset Import Library (Assimp).\n"
 "A free C/C++ library to import various 3D file formats into applications\n\n"
 
-"(c) 2008-2020, assimp team\n"
+"(c) 2006-2020, assimp team\n"
 "License under the terms and conditions of the 3-clause BSD license\n"
-"https://github.com/assimp/assimp\n"
+"http://assimp.org\n"
 ;
 
 // ------------------------------------------------------------------------------------------------
@@ -70,13 +69,13 @@ ASSIMP_API const char*  aiGetLegalString  ()    {
 // ------------------------------------------------------------------------------------------------
 // Get Assimp minor version
 ASSIMP_API unsigned int aiGetVersionMinor ()    {
-    return MinorVersion;
+    return VER_MINOR;
 }
 
 // ------------------------------------------------------------------------------------------------
 // Get Assimp major version
 ASSIMP_API unsigned int aiGetVersionMajor ()    {
-    return MajorVersion;
+    return VER_MAJOR;
 }
 
 // ------------------------------------------------------------------------------------------------
@@ -104,9 +103,6 @@ ASSIMP_API unsigned int aiGetCompileFlags ()    {
     return flags;
 }
 
-// include current build revision, which is even updated from time to time -- :-)
-#include "revision.h"
-
 // ------------------------------------------------------------------------------------------------
 ASSIMP_API unsigned int aiGetVersionRevision() {
     return GitVersion;
diff --git a/test/unit/utVersion.cpp b/test/unit/utVersion.cpp
index 233b2fb0b2..66e832baae 100644
--- a/test/unit/utVersion.cpp
+++ b/test/unit/utVersion.cpp
@@ -48,7 +48,7 @@ TEST_F( utVersion, aiGetLegalStringTest ) {
     EXPECT_NE( lv, nullptr );
     std::string text( lv );
 
-    size_t pos( text.find( std::string( "2017" ) ) );
+    size_t pos( text.find( std::string( "2019" ) ) );
     EXPECT_NE( pos, std::string::npos );
 }