/src/assimp/code/Common/Version.cpp
Line | Count | Source (jump to first uncovered line) |
1 | | /* |
2 | | --------------------------------------------------------------------------- |
3 | | Open Asset Import Library (assimp) |
4 | | --------------------------------------------------------------------------- |
5 | | |
6 | | Copyright (c) 2006-2024, assimp team |
7 | | |
8 | | All rights reserved. |
9 | | |
10 | | Redistribution and use of this software in source and binary forms, |
11 | | with or without modification, are permitted provided that the following |
12 | | conditions are met: |
13 | | |
14 | | * Redistributions of source code must retain the above |
15 | | copyright notice, this list of conditions and the |
16 | | following disclaimer. |
17 | | |
18 | | * Redistributions in binary form must reproduce the above |
19 | | copyright notice, this list of conditions and the |
20 | | following disclaimer in the documentation and/or other |
21 | | materials provided with the distribution. |
22 | | |
23 | | * Neither the name of the assimp team, nor the names of its |
24 | | contributors may be used to endorse or promote products |
25 | | derived from this software without specific prior |
26 | | written permission of the assimp team. |
27 | | |
28 | | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
29 | | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
30 | | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
31 | | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
32 | | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
33 | | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
34 | | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
35 | | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
36 | | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
37 | | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
38 | | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
39 | | --------------------------------------------------------------------------- |
40 | | */ |
41 | | |
42 | | // Actually just a dummy, used by the compiler to build the pre-compiled header. |
43 | | |
44 | | #include "ScenePrivate.h" |
45 | | #include <assimp/scene.h> |
46 | | #include <assimp/version.h> |
47 | | #include <assimp/revision.h> |
48 | | |
49 | | // -------------------------------------------------------------------------------- |
50 | | // Legal information string - don't remove this. |
51 | | static constexpr char LEGAL_INFORMATION[] = |
52 | | "Open Asset Import Library (Assimp).\n" |
53 | | "A free C/C++ library to import various 3D file formats into applications\n\n" |
54 | | "(c) 2006-2024, Assimp team\n" |
55 | | "License under the terms and conditions of the 3-clause BSD license\n" |
56 | | "https://www.assimp.org\n"; |
57 | | |
58 | | // ------------------------------------------------------------------------------------------------ |
59 | | // Get legal string |
60 | 0 | ASSIMP_API const char *aiGetLegalString() { |
61 | 0 | return LEGAL_INFORMATION; |
62 | 0 | } |
63 | | |
64 | | // ------------------------------------------------------------------------------------------------ |
65 | | // Get Assimp patch version |
66 | 0 | ASSIMP_API unsigned int aiGetVersionPatch() { |
67 | 0 | return VER_PATCH; |
68 | 0 | } |
69 | | |
70 | | // ------------------------------------------------------------------------------------------------ |
71 | | // Get Assimp minor version |
72 | 63 | ASSIMP_API unsigned int aiGetVersionMinor() { |
73 | 63 | return VER_MINOR; |
74 | 63 | } |
75 | | |
76 | | // ------------------------------------------------------------------------------------------------ |
77 | | // Get Assimp major version |
78 | 63 | ASSIMP_API unsigned int aiGetVersionMajor() { |
79 | 63 | return VER_MAJOR; |
80 | 63 | } |
81 | | |
82 | | // ------------------------------------------------------------------------------------------------ |
83 | | // Get flags used for compilation |
84 | 63 | ASSIMP_API unsigned int aiGetCompileFlags() { |
85 | | |
86 | 63 | unsigned int flags = 0; |
87 | | |
88 | | #ifdef ASSIMP_BUILD_BOOST_WORKAROUND |
89 | | flags |= ASSIMP_CFLAGS_NOBOOST; |
90 | | #endif |
91 | 63 | #ifdef ASSIMP_BUILD_SINGLETHREADED |
92 | 63 | flags |= ASSIMP_CFLAGS_SINGLETHREADED; |
93 | 63 | #endif |
94 | 63 | #ifdef ASSIMP_BUILD_DEBUG |
95 | 63 | flags |= ASSIMP_CFLAGS_DEBUG; |
96 | 63 | #endif |
97 | | #ifdef ASSIMP_BUILD_DLL_EXPORT |
98 | | flags |= ASSIMP_CFLAGS_SHARED; |
99 | | #endif |
100 | | #ifdef _STLPORT_VERSION |
101 | | flags |= ASSIMP_CFLAGS_STLPORT; |
102 | | #endif |
103 | | #ifdef ASSIMP_DOUBLE_PRECISION |
104 | | flags |= ASSIMP_CFLAGS_DOUBLE_SUPPORT; |
105 | | #endif |
106 | | |
107 | 63 | return flags; |
108 | 63 | } |
109 | | |
110 | | // ------------------------------------------------------------------------------------------------ |
111 | 63 | ASSIMP_API unsigned int aiGetVersionRevision() { |
112 | 63 | return GitVersion; |
113 | 63 | } |
114 | | |
115 | | // ------------------------------------------------------------------------------------------------ |
116 | 0 | ASSIMP_API const char *aiGetBranchName() { |
117 | 0 | return GitBranch; |
118 | 0 | } |
119 | | |