new stuff
This commit is contained in:
parent
8998bc3936
commit
64c8492e5c
6907 changed files with 3401899 additions and 0 deletions
5
.gitattributes
vendored
Normal file
5
.gitattributes
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
*.jpg filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.png filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.fbx filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.blend filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.obj filter=lfs diff=lfs merge=lfs -text
|
||||||
BIN
assets/DefaultTexture.jpg
(Stored with Git LFS)
Normal file
BIN
assets/DefaultTexture.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 130 B |
BIN
assets/container2.png
(Stored with Git LFS)
Normal file
BIN
assets/container2.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/container2_specular.png
(Stored with Git LFS)
Normal file
BIN
assets/container2_specular.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/models/gradient.png
(Stored with Git LFS)
Normal file
BIN
assets/models/gradient.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/models/monkey.fbx
(Stored with Git LFS)
Normal file
BIN
assets/models/monkey.fbx
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/models/plane/Untitled.blend
(Stored with Git LFS)
Normal file
BIN
assets/models/plane/Untitled.blend
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/models/plane/Untitled.blend1
Normal file
BIN
assets/models/plane/Untitled.blend1
Normal file
Binary file not shown.
BIN
assets/models/plane/plane.fbx
(Stored with Git LFS)
Normal file
BIN
assets/models/plane/plane.fbx
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/models/plane/test.png
(Stored with Git LFS)
Normal file
BIN
assets/models/plane/test.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/models/plane/tileset.png
(Stored with Git LFS)
Normal file
BIN
assets/models/plane/tileset.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/models/sponza/10381718147657362067.jpg
(Stored with Git LFS)
Normal file
BIN
assets/models/sponza/10381718147657362067.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/models/sponza/10388182081421875623.jpg
(Stored with Git LFS)
Normal file
BIN
assets/models/sponza/10388182081421875623.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/models/sponza/11474523244911310074.jpg
(Stored with Git LFS)
Normal file
BIN
assets/models/sponza/11474523244911310074.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/models/sponza/11490520546946913238.jpg
(Stored with Git LFS)
Normal file
BIN
assets/models/sponza/11490520546946913238.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/models/sponza/11872827283454512094.jpg
(Stored with Git LFS)
Normal file
BIN
assets/models/sponza/11872827283454512094.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/models/sponza/11968150294050148237.jpg
(Stored with Git LFS)
Normal file
BIN
assets/models/sponza/11968150294050148237.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/models/sponza/1219024358953944284.jpg
(Stored with Git LFS)
Normal file
BIN
assets/models/sponza/1219024358953944284.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/models/sponza/12501374198249454378.jpg
(Stored with Git LFS)
Normal file
BIN
assets/models/sponza/12501374198249454378.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/models/sponza/13196865903111448057.jpg
(Stored with Git LFS)
Normal file
BIN
assets/models/sponza/13196865903111448057.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/models/sponza/13824894030729245199.jpg
(Stored with Git LFS)
Normal file
BIN
assets/models/sponza/13824894030729245199.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/models/sponza/13982482287905699490.jpg
(Stored with Git LFS)
Normal file
BIN
assets/models/sponza/13982482287905699490.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/models/sponza/14118779221266351425.jpg
(Stored with Git LFS)
Normal file
BIN
assets/models/sponza/14118779221266351425.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/models/sponza/14170708867020035030.jpg
(Stored with Git LFS)
Normal file
BIN
assets/models/sponza/14170708867020035030.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/models/sponza/14267839433702832875.jpg
(Stored with Git LFS)
Normal file
BIN
assets/models/sponza/14267839433702832875.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/models/sponza/14650633544276105767.jpg
(Stored with Git LFS)
Normal file
BIN
assets/models/sponza/14650633544276105767.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/models/sponza/15295713303328085182.jpg
(Stored with Git LFS)
Normal file
BIN
assets/models/sponza/15295713303328085182.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/models/sponza/15722799267630235092.jpg
(Stored with Git LFS)
Normal file
BIN
assets/models/sponza/15722799267630235092.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/models/sponza/16275776544635328252.png
(Stored with Git LFS)
Normal file
BIN
assets/models/sponza/16275776544635328252.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/models/sponza/16299174074766089871.jpg
(Stored with Git LFS)
Normal file
BIN
assets/models/sponza/16299174074766089871.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/models/sponza/16885566240357350108.jpg
(Stored with Git LFS)
Normal file
BIN
assets/models/sponza/16885566240357350108.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/models/sponza/17556969131407844942.jpg
(Stored with Git LFS)
Normal file
BIN
assets/models/sponza/17556969131407844942.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/models/sponza/17876391417123941155.jpg
(Stored with Git LFS)
Normal file
BIN
assets/models/sponza/17876391417123941155.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/models/sponza/2051777328469649772.jpg
(Stored with Git LFS)
Normal file
BIN
assets/models/sponza/2051777328469649772.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/models/sponza/2185409758123873465.jpg
(Stored with Git LFS)
Normal file
BIN
assets/models/sponza/2185409758123873465.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/models/sponza/2299742237651021498.jpg
(Stored with Git LFS)
Normal file
BIN
assets/models/sponza/2299742237651021498.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/models/sponza/2374361008830720677.jpg
(Stored with Git LFS)
Normal file
BIN
assets/models/sponza/2374361008830720677.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/models/sponza/2411100444841994089.jpg
(Stored with Git LFS)
Normal file
BIN
assets/models/sponza/2411100444841994089.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/models/sponza/2775690330959970771.jpg
(Stored with Git LFS)
Normal file
BIN
assets/models/sponza/2775690330959970771.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/models/sponza/2969916736137545357.jpg
(Stored with Git LFS)
Normal file
BIN
assets/models/sponza/2969916736137545357.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/models/sponza/332936164838540657.jpg
(Stored with Git LFS)
Normal file
BIN
assets/models/sponza/332936164838540657.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/models/sponza/3371964815757888145.jpg
(Stored with Git LFS)
Normal file
BIN
assets/models/sponza/3371964815757888145.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/models/sponza/3455394979645218238.jpg
(Stored with Git LFS)
Normal file
BIN
assets/models/sponza/3455394979645218238.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/models/sponza/3628158980083700836.jpg
(Stored with Git LFS)
Normal file
BIN
assets/models/sponza/3628158980083700836.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/models/sponza/3827035219084910048.jpg
(Stored with Git LFS)
Normal file
BIN
assets/models/sponza/3827035219084910048.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/models/sponza/4477655471536070370.jpg
(Stored with Git LFS)
Normal file
BIN
assets/models/sponza/4477655471536070370.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/models/sponza/4601176305987539675.jpg
(Stored with Git LFS)
Normal file
BIN
assets/models/sponza/4601176305987539675.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/models/sponza/466164707995436622.jpg
(Stored with Git LFS)
Normal file
BIN
assets/models/sponza/466164707995436622.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/models/sponza/4675343432951571524.jpg
(Stored with Git LFS)
Normal file
BIN
assets/models/sponza/4675343432951571524.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/models/sponza/4871783166746854860.jpg
(Stored with Git LFS)
Normal file
BIN
assets/models/sponza/4871783166746854860.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/models/sponza/4910669866631290573.jpg
(Stored with Git LFS)
Normal file
BIN
assets/models/sponza/4910669866631290573.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/models/sponza/4975155472559461469.jpg
(Stored with Git LFS)
Normal file
BIN
assets/models/sponza/4975155472559461469.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/models/sponza/5061699253647017043.png
(Stored with Git LFS)
Normal file
BIN
assets/models/sponza/5061699253647017043.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/models/sponza/5792855332885324923.jpg
(Stored with Git LFS)
Normal file
BIN
assets/models/sponza/5792855332885324923.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/models/sponza/5823059166183034438.jpg
(Stored with Git LFS)
Normal file
BIN
assets/models/sponza/5823059166183034438.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/models/sponza/6047387724914829168.jpg
(Stored with Git LFS)
Normal file
BIN
assets/models/sponza/6047387724914829168.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/models/sponza/6151467286084645207.jpg
(Stored with Git LFS)
Normal file
BIN
assets/models/sponza/6151467286084645207.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/models/sponza/6593109234861095314.jpg
(Stored with Git LFS)
Normal file
BIN
assets/models/sponza/6593109234861095314.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/models/sponza/6667038893015345571.jpg
(Stored with Git LFS)
Normal file
BIN
assets/models/sponza/6667038893015345571.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/models/sponza/6772804448157695701.jpg
(Stored with Git LFS)
Normal file
BIN
assets/models/sponza/6772804448157695701.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/models/sponza/7056944414013900257.jpg
(Stored with Git LFS)
Normal file
BIN
assets/models/sponza/7056944414013900257.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/models/sponza/715093869573992647.jpg
(Stored with Git LFS)
Normal file
BIN
assets/models/sponza/715093869573992647.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/models/sponza/7268504077753552595.jpg
(Stored with Git LFS)
Normal file
BIN
assets/models/sponza/7268504077753552595.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/models/sponza/7441062115984513793.jpg
(Stored with Git LFS)
Normal file
BIN
assets/models/sponza/7441062115984513793.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/models/sponza/755318871556304029.jpg
(Stored with Git LFS)
Normal file
BIN
assets/models/sponza/755318871556304029.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/models/sponza/759203620573749278.jpg
(Stored with Git LFS)
Normal file
BIN
assets/models/sponza/759203620573749278.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/models/sponza/7645212358685992005.jpg
(Stored with Git LFS)
Normal file
BIN
assets/models/sponza/7645212358685992005.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/models/sponza/7815564343179553343.jpg
(Stored with Git LFS)
Normal file
BIN
assets/models/sponza/7815564343179553343.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/models/sponza/8006627369776289000.png
(Stored with Git LFS)
Normal file
BIN
assets/models/sponza/8006627369776289000.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/models/sponza/8051790464816141987.jpg
(Stored with Git LFS)
Normal file
BIN
assets/models/sponza/8051790464816141987.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/models/sponza/8114461559286000061.jpg
(Stored with Git LFS)
Normal file
BIN
assets/models/sponza/8114461559286000061.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/models/sponza/8481240838833932244.jpg
(Stored with Git LFS)
Normal file
BIN
assets/models/sponza/8481240838833932244.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/models/sponza/8503262930880235456.jpg
(Stored with Git LFS)
Normal file
BIN
assets/models/sponza/8503262930880235456.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/models/sponza/8747919177698443163.jpg
(Stored with Git LFS)
Normal file
BIN
assets/models/sponza/8747919177698443163.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/models/sponza/8750083169368950601.jpg
(Stored with Git LFS)
Normal file
BIN
assets/models/sponza/8750083169368950601.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/models/sponza/8773302468495022225.jpg
(Stored with Git LFS)
Normal file
BIN
assets/models/sponza/8773302468495022225.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/models/sponza/8783994986360286082.jpg
(Stored with Git LFS)
Normal file
BIN
assets/models/sponza/8783994986360286082.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/models/sponza/9288698199695299068.jpg
(Stored with Git LFS)
Normal file
BIN
assets/models/sponza/9288698199695299068.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/models/sponza/9916269861720640319.jpg
(Stored with Git LFS)
Normal file
BIN
assets/models/sponza/9916269861720640319.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/models/sponza/Sponza.bin
Normal file
BIN
assets/models/sponza/Sponza.bin
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.1 MiB |
8573
assets/models/sponza/Sponza.gltf
Normal file
8573
assets/models/sponza/Sponza.gltf
Normal file
File diff suppressed because it is too large
Load diff
BIN
assets/models/sponza/white.png
(Stored with Git LFS)
Normal file
BIN
assets/models/sponza/white.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/wall.jpg
BIN
assets/wall.jpg
Binary file not shown.
|
Before Width: | Height: | Size: 251 KiB After Width: | Height: | Size: 131 B |
127
assimp/.clang-format
Normal file
127
assimp/.clang-format
Normal file
|
|
@ -0,0 +1,127 @@
|
||||||
|
# Commented out parameters are those with the same value as base LLVM style
|
||||||
|
# We can uncomment them if we want to change their value, or enforce the
|
||||||
|
# chosen value in case the base style changes (last sync: Clang 6.0.1).
|
||||||
|
---
|
||||||
|
### General config, applies to all languages ###
|
||||||
|
BasedOnStyle: LLVM
|
||||||
|
AccessModifierOffset: -4
|
||||||
|
AlignAfterOpenBracket: DontAlign
|
||||||
|
# AlignConsecutiveAssignments: false
|
||||||
|
# AlignConsecutiveDeclarations: false
|
||||||
|
# AlignEscapedNewlines: Right
|
||||||
|
# AlignOperands: true
|
||||||
|
AlignTrailingComments: false
|
||||||
|
AllowAllParametersOfDeclarationOnNextLine: false
|
||||||
|
# AllowShortBlocksOnASingleLine: false
|
||||||
|
AllowShortCaseLabelsOnASingleLine: true
|
||||||
|
AllowShortFunctionsOnASingleLine: Inline
|
||||||
|
AllowShortIfStatementsOnASingleLine: true
|
||||||
|
# AllowShortLoopsOnASingleLine: false
|
||||||
|
# AlwaysBreakAfterDefinitionReturnType: None
|
||||||
|
# AlwaysBreakAfterReturnType: None
|
||||||
|
# AlwaysBreakBeforeMultilineStrings: false
|
||||||
|
# AlwaysBreakTemplateDeclarations: false
|
||||||
|
# BinPackArguments: true
|
||||||
|
# BinPackParameters: true
|
||||||
|
# BraceWrapping:
|
||||||
|
# AfterClass: false
|
||||||
|
# AfterControlStatement: false
|
||||||
|
# AfterEnum: false
|
||||||
|
# AfterFunction: false
|
||||||
|
# AfterNamespace: false
|
||||||
|
# AfterObjCDeclaration: false
|
||||||
|
# AfterStruct: false
|
||||||
|
# AfterUnion: false
|
||||||
|
# AfterExternBlock: false
|
||||||
|
# BeforeCatch: false
|
||||||
|
# BeforeElse: false
|
||||||
|
# IndentBraces: false
|
||||||
|
# SplitEmptyFunction: true
|
||||||
|
# SplitEmptyRecord: true
|
||||||
|
# SplitEmptyNamespace: true
|
||||||
|
# BreakBeforeBinaryOperators: None
|
||||||
|
# BreakBeforeBraces: Attach
|
||||||
|
# BreakBeforeInheritanceComma: false
|
||||||
|
BreakBeforeTernaryOperators: false
|
||||||
|
# BreakConstructorInitializersBeforeComma: false
|
||||||
|
BreakConstructorInitializers: AfterColon
|
||||||
|
# BreakStringLiterals: true
|
||||||
|
ColumnLimit: 0
|
||||||
|
# CommentPragmas: '^ IWYU pragma:'
|
||||||
|
# CompactNamespaces: false
|
||||||
|
ConstructorInitializerAllOnOneLineOrOnePerLine: true
|
||||||
|
ConstructorInitializerIndentWidth: 8
|
||||||
|
ContinuationIndentWidth: 8
|
||||||
|
Cpp11BracedListStyle: false
|
||||||
|
# DerivePointerAlignment: false
|
||||||
|
# DisableFormat: false
|
||||||
|
# ExperimentalAutoDetectBinPacking: false
|
||||||
|
# FixNamespaceComments: true
|
||||||
|
# ForEachMacros:
|
||||||
|
# - foreach
|
||||||
|
# - Q_FOREACH
|
||||||
|
# - BOOST_FOREACH
|
||||||
|
# IncludeBlocks: Preserve
|
||||||
|
IncludeCategories:
|
||||||
|
- Regex: '".*"'
|
||||||
|
Priority: 1
|
||||||
|
- Regex: '^<.*\.h>'
|
||||||
|
Priority: 2
|
||||||
|
- Regex: '^<.*'
|
||||||
|
Priority: 3
|
||||||
|
# IncludeIsMainRegex: '(Test)?$'
|
||||||
|
IndentCaseLabels: false
|
||||||
|
#IndentPPDirectives: AfterHash
|
||||||
|
IndentWidth: 4
|
||||||
|
# IndentWrappedFunctionNames: false
|
||||||
|
# JavaScriptQuotes: Leave
|
||||||
|
# JavaScriptWrapImports: true
|
||||||
|
# KeepEmptyLinesAtTheStartOfBlocks: true
|
||||||
|
# MacroBlockBegin: ''
|
||||||
|
# MacroBlockEnd: ''
|
||||||
|
# MaxEmptyLinesToKeep: 1
|
||||||
|
# NamespaceIndentation: None
|
||||||
|
# PenaltyBreakAssignment: 2
|
||||||
|
# PenaltyBreakBeforeFirstCallParameter: 19
|
||||||
|
# PenaltyBreakComment: 300
|
||||||
|
# PenaltyBreakFirstLessLess: 120
|
||||||
|
# PenaltyBreakString: 1000
|
||||||
|
# PenaltyExcessCharacter: 1000000
|
||||||
|
# PenaltyReturnTypeOnItsOwnLine: 60
|
||||||
|
# PointerAlignment: Right
|
||||||
|
# RawStringFormats:
|
||||||
|
# - Delimiter: pb
|
||||||
|
# Language: TextProto
|
||||||
|
# BasedOnStyle: google
|
||||||
|
# ReflowComments: true
|
||||||
|
# SortIncludes: true
|
||||||
|
# SortUsingDeclarations: true
|
||||||
|
# SpaceAfterCStyleCast: false
|
||||||
|
# SpaceAfterTemplateKeyword: true
|
||||||
|
# SpaceBeforeAssignmentOperators: true
|
||||||
|
# SpaceBeforeParens: ControlStatements
|
||||||
|
# SpaceInEmptyParentheses: false
|
||||||
|
# SpacesBeforeTrailingComments: 1
|
||||||
|
# SpacesInAngles: false
|
||||||
|
# SpacesInContainerLiterals: true
|
||||||
|
# SpacesInCStyleCastParentheses: false
|
||||||
|
# SpacesInParentheses: false
|
||||||
|
# SpacesInSquareBrackets: false
|
||||||
|
TabWidth: 4
|
||||||
|
UseTab: Never
|
||||||
|
---
|
||||||
|
### C++ specific config ###
|
||||||
|
Language: Cpp
|
||||||
|
Standard: Cpp11
|
||||||
|
---
|
||||||
|
### ObjC specific config ###
|
||||||
|
Language: ObjC
|
||||||
|
Standard: Cpp11
|
||||||
|
ObjCBlockIndentWidth: 4
|
||||||
|
# ObjCSpaceAfterProperty: false
|
||||||
|
# ObjCSpaceBeforeProtocolList: true
|
||||||
|
---
|
||||||
|
### Java specific config ###
|
||||||
|
Language: Java
|
||||||
|
# BreakAfterJavaFieldAnnotations: false
|
||||||
|
...
|
||||||
22
assimp/.editorconfig
Normal file
22
assimp/.editorconfig
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
# See <http://EditorConfig.org> for details
|
||||||
|
|
||||||
|
root = true
|
||||||
|
|
||||||
|
[CMakeLists.txt,*.cmake{,.in}]
|
||||||
|
end_of_line = lf
|
||||||
|
insert_final_newline = true
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
indent_size = 2
|
||||||
|
indent_style = space
|
||||||
|
|
||||||
|
[*.h.in]
|
||||||
|
end_of_line = lf
|
||||||
|
insert_final_newline = true
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
indent_size = 4
|
||||||
|
indent_style = space
|
||||||
|
|
||||||
|
[*.txt]
|
||||||
|
end_of_line = lf
|
||||||
|
insert_final_newline = true
|
||||||
|
trim_trailing_whitespace = true
|
||||||
207
assimp/AGENTS.md
Normal file
207
assimp/AGENTS.md
Normal file
|
|
@ -0,0 +1,207 @@
|
||||||
|
# AGENTS.md - Agent Guidelines for Assimp
|
||||||
|
|
||||||
|
This document provides guidelines for AI agents working on the Assimp codebase.
|
||||||
|
|
||||||
|
## Project Overview
|
||||||
|
|
||||||
|
Assimp (Open Asset Import Library) is a C++ library that loads various 3D file formats into a shared, in-memory format. It supports 40+ import formats and several export formats.
|
||||||
|
|
||||||
|
## Build Commands
|
||||||
|
|
||||||
|
### Basic Build (CMake + Ninja recommended)
|
||||||
|
```bash
|
||||||
|
# Configure with CMake
|
||||||
|
cmake -G Ninja -DASSIMP_BUILD_TESTS=ON -DASSIMP_WARNINGS_AS_ERRORS=ON -S . -B build
|
||||||
|
|
||||||
|
# Build
|
||||||
|
cmake --build build
|
||||||
|
```
|
||||||
|
|
||||||
|
### Key CMake Options
|
||||||
|
- `-DASSIMP_BUILD_TESTS=ON` - Build unit tests (default ON)
|
||||||
|
- `-DASSIMP_WARNINGS_AS_ERRORS=ON` - Treat warnings as errors (default ON)
|
||||||
|
- `-DASSIMP_BUILD_ASSIMP_TOOLS=ON` - Build command-line tools
|
||||||
|
- `-DASSIMP_BUILD_SAMPLES=ON` - Build sample applications
|
||||||
|
- `-DASSIMP_DOUBLE_PRECISION=ON` - Use double precision for calculations
|
||||||
|
- `-DASSIMP_NO_EXPORT=ON` - Disable export functionality
|
||||||
|
- `-DBUILD_SHARED_LIBS=OFF` - Build static library
|
||||||
|
|
||||||
|
### Running Tests
|
||||||
|
|
||||||
|
#### Run All Tests
|
||||||
|
```bash
|
||||||
|
# Using ctest
|
||||||
|
cd build && ctest
|
||||||
|
|
||||||
|
# Or run unit directly
|
||||||
|
./build/unit
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Run Single Test
|
||||||
|
```bash
|
||||||
|
# Using ctest with filter
|
||||||
|
cd build && ctest -R "TestName"
|
||||||
|
|
||||||
|
# Or run unit with filter
|
||||||
|
./build/unit --gtest_filter="TestSuiteName.TestName"
|
||||||
|
```
|
||||||
|
|
||||||
|
For example:
|
||||||
|
```bash
|
||||||
|
./build/unit --gtest_filter="utObjImportExport.*"
|
||||||
|
./build/unit --gtest_filter="utMaterialSystem.*"
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Test Directory
|
||||||
|
Tests are located in `test/unit/` and use Google Test. Test files are named `ut<Feature>.cpp`.
|
||||||
|
|
||||||
|
## Code Style
|
||||||
|
|
||||||
|
### Formatting
|
||||||
|
- **Use clang-format** before committing. Run: `clang-format -i <file>`
|
||||||
|
- The project uses a `.clang-format` file at the root with LLVM-based style
|
||||||
|
- Key settings:
|
||||||
|
- Indent width: 4 spaces
|
||||||
|
- Tab width: 4, UseTab: Never
|
||||||
|
- ColumnLimit: 0 (no line length limit)
|
||||||
|
- BreakConstructorInitializers: AfterColon
|
||||||
|
- AccessModifierOffset: -4
|
||||||
|
|
||||||
|
### Header File Organization
|
||||||
|
```cpp
|
||||||
|
// Order of includes (use clang-format to enforce):
|
||||||
|
// 1. Module's own header
|
||||||
|
// 2. Other assimp headers (assimp/*)
|
||||||
|
// 3. External headers (contrib/*)
|
||||||
|
// 4. Standard library headers
|
||||||
|
// 5. System headers
|
||||||
|
|
||||||
|
#include "Common/Importer.h"
|
||||||
|
#include <assimp/version.h>
|
||||||
|
#include <assimp/config.h>
|
||||||
|
#include "../contrib/some_lib/some.h"
|
||||||
|
#include <vector>
|
||||||
|
#include <string>
|
||||||
|
```
|
||||||
|
|
||||||
|
### Naming Conventions
|
||||||
|
- **Classes/Types**: PascalCase (e.g., `Importer`, `aiScene`)
|
||||||
|
- **Functions**: PascalCase (e.g., `ReadFile`, `GetExtension`)
|
||||||
|
- **Variables**: camelCase (e.g., `scene`, `importStep`)
|
||||||
|
- **Constants**: kCamelCase or UPPER_SNAKE_CASE (e.g., `kMaxVertices`)
|
||||||
|
- **Member variables**: Often prefixed with `m_` (e.g., `mScene`)
|
||||||
|
- **Static variables**: Often prefixed with `s_`
|
||||||
|
|
||||||
|
### File Naming
|
||||||
|
- **Header files**: PascalCase (e.g., `Importer.h`, `ScenePrivate.h`)
|
||||||
|
- **Source files**: PascalCase (e.g., `Importer.cpp`)
|
||||||
|
- **Test files**: Prefixed with `ut` (e.g., `utObjImportExport.cpp`)
|
||||||
|
|
||||||
|
### C++ Guidelines
|
||||||
|
|
||||||
|
#### Language Standard
|
||||||
|
- Minimum: C++17
|
||||||
|
- Use modern C++ features (smart pointers, constexpr, etc.)
|
||||||
|
|
||||||
|
#### Error Handling
|
||||||
|
- Use exceptions for recoverable errors (derived from `std::exception`)
|
||||||
|
- Use `ai_assert` for debugging assertions in code
|
||||||
|
- Return error codes from C API functions
|
||||||
|
|
||||||
|
#### Classes
|
||||||
|
- Use `ai_enable_erasing` pattern for optional features
|
||||||
|
- Use PImpl idiom for ABI stability where appropriate
|
||||||
|
|
||||||
|
#### Memory Management
|
||||||
|
- Use smart pointers (`std::unique_ptr`, `std::shared_ptr`)
|
||||||
|
- Prefer RAII patterns
|
||||||
|
- Document ownership semantics in function comments
|
||||||
|
|
||||||
|
### Importers/Exporters
|
||||||
|
|
||||||
|
#### Structure
|
||||||
|
Each importer typically has:
|
||||||
|
1. Header in `code/AssetLib/<Format>/`
|
||||||
|
2. Implementation in `code/AssetLib/<Format>/`
|
||||||
|
3. Registration in `code/Common/ImporterRegistry.cpp`
|
||||||
|
4. Unit tests in `test/unit/ImportExport/`
|
||||||
|
|
||||||
|
#### Registration
|
||||||
|
```cpp
|
||||||
|
void GetImporterInstanceList(std::vector<BaseImporter*>& out);
|
||||||
|
// Add to registry
|
||||||
|
out.push_back(new MyFormatImporter());
|
||||||
|
```
|
||||||
|
|
||||||
|
### Post-Processing
|
||||||
|
|
||||||
|
- Located in `code/PostProcessing/`
|
||||||
|
- Each process inherits from `BaseProcess`
|
||||||
|
- Implement `ExecuteOnScene` method
|
||||||
|
|
||||||
|
### Documentation
|
||||||
|
|
||||||
|
- Use Doxygen-style comments for public APIs
|
||||||
|
- Example:
|
||||||
|
```cpp
|
||||||
|
/// <summary>
|
||||||
|
/// Loads a file from disk.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pFile">Path to the file.</param>
|
||||||
|
/// <returns>Pointer to the imported scene.</returns>
|
||||||
|
aiScene* Importer::ReadFile(const char* pFile);
|
||||||
|
```
|
||||||
|
|
||||||
|
### Contributing
|
||||||
|
|
||||||
|
1. Create a fork of assimp
|
||||||
|
2. Create a branch for your feature/fix
|
||||||
|
3. Run `clang-format` on modified files
|
||||||
|
4. Ensure tests pass
|
||||||
|
5. Open a PR against `master` branch
|
||||||
|
|
||||||
|
## Directory Structure
|
||||||
|
|
||||||
|
```
|
||||||
|
code/
|
||||||
|
AssetLib/ - Importers and exporters
|
||||||
|
CApi/ - C API wrapper
|
||||||
|
Common/ - Shared utilities
|
||||||
|
Geometry/ - Geometry processing
|
||||||
|
Material/ - Material handling
|
||||||
|
PostProcessing/ - Mesh post-processing
|
||||||
|
include/ - Public headers (assimp/)
|
||||||
|
test/
|
||||||
|
unit/ - Unit tests
|
||||||
|
models/ - Test 3D models
|
||||||
|
test/ - Test data (non-BSD licensed)
|
||||||
|
contrib/ - Third-party libraries
|
||||||
|
```
|
||||||
|
|
||||||
|
## CI/CD
|
||||||
|
|
||||||
|
The project runs CI on GitHub Actions:
|
||||||
|
- Builds on Linux and Windows
|
||||||
|
- Runs tests including memory leak detection
|
||||||
|
- Checks compiler warnings
|
||||||
|
|
||||||
|
## Common Tasks
|
||||||
|
|
||||||
|
### Adding a New Importer
|
||||||
|
1. Create `code/AssetLib/<Format>/<Format>Importer.h`
|
||||||
|
2. Create `code/AssetLib/<Format>/<Format>Importer.cpp`
|
||||||
|
3. Register in `code/Common/ImporterRegistry.cpp`
|
||||||
|
4. Add tests in `test/unit/ImportExport/`
|
||||||
|
5. Add to CMakeLists.txt if needed
|
||||||
|
|
||||||
|
### Running Specific Test Suite
|
||||||
|
```bash
|
||||||
|
# Test specific importer
|
||||||
|
./build/unit --gtest_filter="utglTF2ImportExport.*"
|
||||||
|
|
||||||
|
# Test post-processing
|
||||||
|
./build/unit --gtest_filter="utTriangulate.*"
|
||||||
|
|
||||||
|
# Test math operations
|
||||||
|
./build/unit --gtest_filter="utMatrix4x4.*"
|
||||||
|
```
|
||||||
172
assimp/AIToolPolicy.md
Normal file
172
assimp/AIToolPolicy.md
Normal file
|
|
@ -0,0 +1,172 @@
|
||||||
|
# Asset-Importer-Lib AI Tool Use Policy
|
||||||
|
|
||||||
|
## Policy
|
||||||
|
|
||||||
|
Assimp's policy is that contributors can use whatever tools they would like to
|
||||||
|
craft their contributions, but there must be a **human in the loop**.
|
||||||
|
**Contributors must read and review all LLM-generated code or text before they
|
||||||
|
ask other project members to review it.** The contributor is always the author
|
||||||
|
and is fully accountable for their contributions. Contributors should be
|
||||||
|
sufficiently confident that the contribution is high enough quality that asking
|
||||||
|
for a review is a good use of scarce maintainer time, and they should be **able
|
||||||
|
to answer questions about their work** during review.
|
||||||
|
|
||||||
|
We expect that new contributors will be less confident in their contributions,
|
||||||
|
and our guidance to them is to **start with small contributions** that they can
|
||||||
|
fully understand to build confidence. We aspire to be a welcoming community
|
||||||
|
that helps new contributors grow their expertise, but learning involves taking
|
||||||
|
small steps, getting feedback, and iterating. Passing maintainer feedback to an
|
||||||
|
LLM doesn't help anyone grow, and does not sustain our community.
|
||||||
|
|
||||||
|
Contributors are expected to **be transparent and label contributions that
|
||||||
|
contain substantial amounts of tool-generated content**. Our policy on
|
||||||
|
labelling is intended to facilitate reviews, and not to track which parts of
|
||||||
|
Assimp are generated. Contributors should note tool usage in their pull request
|
||||||
|
description, commit message, or wherever authorship is normally indicated for
|
||||||
|
the work. For instance, use a commit message trailer like Assisted-by: <name of
|
||||||
|
code assistant>. This transparency helps the community develop best practices
|
||||||
|
and understand the role of these new tools.
|
||||||
|
|
||||||
|
This policy includes, but is not limited to, the following kinds of
|
||||||
|
contributions:
|
||||||
|
|
||||||
|
- Code, usually in the form of a pull request
|
||||||
|
- RFCs or design proposals
|
||||||
|
- Issues or security vulnerabilities
|
||||||
|
- Comments and feedback on pull requests
|
||||||
|
|
||||||
|
## Details
|
||||||
|
|
||||||
|
To ensure sufficient self review and understanding of the work, it is strongly
|
||||||
|
recommended that contributors write PR descriptions themselves (if needed,
|
||||||
|
using tools for translation or copy-editing). The description should explain
|
||||||
|
the motivation, implementation approach, expected impact, and any open
|
||||||
|
questions or uncertainties to the same extent as a contribution made without
|
||||||
|
tool assistance.
|
||||||
|
|
||||||
|
AI tools must not be used to fix GitHub issues labelled [`good first
|
||||||
|
issue`][good-first-issue]. These issues are generally not urgent, and are
|
||||||
|
intended to be learning opportunities for new contributors to get familiar with
|
||||||
|
the codebase. Whether you are a newcomer or not, fully automating the process
|
||||||
|
of fixing this issue squanders the learning opportunity and doesn't add much
|
||||||
|
value to the project. **Using AI tools to fix issues labelled as "good first
|
||||||
|
issues" is forbidden**.
|
||||||
|
|
||||||
|
[good-first-issue]: https://github.com/llvm/llvm-project/issues/?q=is%3Aissue%20state%3Aopen%20label%3A%22good%20first%20issue%22
|
||||||
|
|
||||||
|
## Extractive Contributions
|
||||||
|
|
||||||
|
The reason for our "human-in-the-loop" contribution policy is that processing
|
||||||
|
patches, PRs, RFCs, and comments to Assimp is not free -- it takes a lot of
|
||||||
|
maintainer time and energy to review those contributions! Sending the
|
||||||
|
unreviewed output of an Assimp to open source project maintainers *extracts* work
|
||||||
|
from them in the form of design and code review, so we call this kind of
|
||||||
|
contribution an "extractive contribution".
|
||||||
|
|
||||||
|
Our **golden rule** is that a contribution should be worth more to the project
|
||||||
|
than the time it takes to review it. These ideas are captured by this quote
|
||||||
|
from the book [Working in Public][public] by Nadia Eghbal:
|
||||||
|
|
||||||
|
[public]: https://press.stripe.com/working-in-public
|
||||||
|
|
||||||
|
> \"When attention is being appropriated, producers need to weigh the costs and
|
||||||
|
> benefits of the transaction. To assess whether the appropriation of attention
|
||||||
|
> is net-positive, it's useful to distinguish between *extractive* and
|
||||||
|
> *non-extractive* contributions. Extractive contributions are those where the
|
||||||
|
> marginal cost of reviewing and merging that contribution is greater than the
|
||||||
|
> marginal benefit to the project's producers. In the case of a code
|
||||||
|
> contribution, it might be a pull request that's too complex or unwieldy to
|
||||||
|
> review, given the potential upside.\" \-- Nadia Eghbal
|
||||||
|
|
||||||
|
Prior to the advent of LLMs, open source project maintainers would often review
|
||||||
|
any and all changes sent to the project simply because posting a change for
|
||||||
|
review was a sign of interest from a potential long-term contributor. While new
|
||||||
|
tools enable more development, it shifts effort from the implementor to the
|
||||||
|
reviewer, and our policy exists to ensure that we value and do not squander
|
||||||
|
maintainer time.
|
||||||
|
|
||||||
|
Reviewing changes from new contributors is part of growing the next generation
|
||||||
|
of contributors and sustaining the project. We want the LLVM project to be
|
||||||
|
welcoming and open to aspiring compiler engineers who are willing to invest
|
||||||
|
time and effort to learn and grow, because growing our contributor base and
|
||||||
|
recruiting new maintainers helps sustain the project over the long term. Being
|
||||||
|
open to contributions and [liberally granting commit access][commit-access]
|
||||||
|
is a big part of how LLVM has grown and successfully been adopted all across
|
||||||
|
the industry. We therefore automatically post a greeting comment to pull
|
||||||
|
requests from new contributors and encourage maintainers to spend their time to
|
||||||
|
help new contributors learn.
|
||||||
|
|
||||||
|
[commit-access]: https://llvm.org/docs/DeveloperPolicy.html#obtaining-commit-access
|
||||||
|
|
||||||
|
## Handling Violations
|
||||||
|
|
||||||
|
If a maintainer judges that a contribution doesn't comply with this policy,
|
||||||
|
they should paste the following response to request changes:
|
||||||
|
|
||||||
|
This PR doesn't appear to comply with our policy on tool-generated content,
|
||||||
|
and requires additional justification for why it is valuable enough to the
|
||||||
|
project for us to review it. Please see our developer policy on
|
||||||
|
AI-generated contributions: http://llvm.org/docs/AIToolPolicy.html
|
||||||
|
|
||||||
|
The best ways to make a change less extractive and more valuable are to reduce
|
||||||
|
its size or complexity or to increase its usefulness to the community. These
|
||||||
|
factors are impossible to weigh objectively, and our project policy leaves this
|
||||||
|
determination up to the maintainers of the project, i.e. those who are doing
|
||||||
|
the work of sustaining the project.
|
||||||
|
|
||||||
|
If or when it becomes clear that a GitHub issue or PR is off-track and not
|
||||||
|
moving in the right direction, maintainers should apply the `extractive` label
|
||||||
|
to help other reviewers prioritize their review time.
|
||||||
|
|
||||||
|
If a contributor fails to make their change meaningfully less extractive,
|
||||||
|
maintainers should escalate to the relevant moderation or admin team for the
|
||||||
|
space (GitHub, Discourse, Discord, etc) to lock the conversation.
|
||||||
|
|
||||||
|
## Copyright
|
||||||
|
|
||||||
|
Artificial intelligence systems raise many questions around copyright that have
|
||||||
|
yet to be answered. Our policy on AI tools is similar to our copyright policy:
|
||||||
|
Contributors are responsible for ensuring that they have the right to
|
||||||
|
contribute code under the terms of our license, typically meaning that either
|
||||||
|
they, their employer, or their collaborators hold the copyright. Using AI tools
|
||||||
|
to regenerate copyrighted material does not remove the copyright, and
|
||||||
|
contributors are responsible for ensuring that such material does not appear in
|
||||||
|
their contributions. Contributions found to violate this policy will be removed
|
||||||
|
just like any other offending contribution.
|
||||||
|
|
||||||
|
## Examples
|
||||||
|
|
||||||
|
Here are some examples of contributions that demonstrate how to apply
|
||||||
|
the principles of this policy:
|
||||||
|
|
||||||
|
- [This PR][alive-pr] contains a proof from Alive2, which is a strong signal of
|
||||||
|
value and correctness.
|
||||||
|
- This [generated documentation][gsym-docs] was reviewed for correctness by a
|
||||||
|
human before being posted.
|
||||||
|
|
||||||
|
[alive-pr]: https://github.com/llvm/llvm-project/pull/142869
|
||||||
|
[gsym-docs]: https://discourse.llvm.org/t/searching-for-gsym-documentation/85185/2
|
||||||
|
|
||||||
|
## References
|
||||||
|
|
||||||
|
Our policy was informed by experiences in other communities:
|
||||||
|
|
||||||
|
- [Fedora Council Policy Proposal: Policy on AI-Assisted Contributions (fetched
|
||||||
|
2025-10-01)][fedora]: Some of the text above was copied from the Fedora
|
||||||
|
project policy proposal, which is licensed under the [Creative Commons
|
||||||
|
Attribution 4.0 International License][cca]. This link serves as attribution.
|
||||||
|
- [Rust draft policy on burdensome PRs][rust-burdensome]
|
||||||
|
- [Seth Larson's post][security-slop]
|
||||||
|
on slop security reports in the Python ecosystem
|
||||||
|
- The METR paper [Measuring the Impact of Early-2025 AI on Experienced
|
||||||
|
Open-Source Developer Productivity][metr-paper].
|
||||||
|
- [QEMU bans use of AI content generators][qemu-ban]
|
||||||
|
- [Slop is the new name for unwanted AI-generated content][ai-slop]
|
||||||
|
|
||||||
|
[fedora]: https://communityblog.fedoraproject.org/council-policy-proposal-policy-on-ai-assisted-contributions/
|
||||||
|
[cca]: https://creativecommons.org/licenses/by/4.0/
|
||||||
|
[rust-burdensome]: https://github.com/rust-lang/compiler-team/issues/893
|
||||||
|
[security-slop]: https://sethmlarson.dev/slop-security-reports
|
||||||
|
[metr-paper]: https://metr.org/blog/2025-07-10-early-2025-ai-experienced-os-dev-study/
|
||||||
|
[qemu-ban]: https://www.qemu.org/docs/master/devel/code-provenance.html#use-of-ai-content-generators
|
||||||
|
[ai-slop]: https://simonwillison.net/2024/May/8/slop/
|
||||||
25
assimp/BUILDBINARIES_EXAMPLE.bat
Normal file
25
assimp/BUILDBINARIES_EXAMPLE.bat
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
:: This is an example file to generate binaries using Windows Operating System
|
||||||
|
:: This script is configured to be executed from the source directory
|
||||||
|
|
||||||
|
:: Compiled binaries will be placed in BINARIES_DIR\code\CONFIG
|
||||||
|
|
||||||
|
:: NOTE
|
||||||
|
:: The build process will generate a config.h file that is placed in BINARIES_DIR\include
|
||||||
|
:: This file must be merged with SOURCE_DIR\include
|
||||||
|
:: You should write yourself a script that copies the files where you want them.
|
||||||
|
:: Also see: https://github.com/assimp/assimp/pull/2646
|
||||||
|
|
||||||
|
SET SOURCE_DIR=.
|
||||||
|
SET GENERATOR=Visual Studio 16 2019
|
||||||
|
|
||||||
|
SET BINARIES_DIR="./build/Win32"
|
||||||
|
cmake . -G "%GENERATOR%" -A Win32 -S %SOURCE_DIR% -B %BINARIES_DIR%
|
||||||
|
cmake --build %BINARIES_DIR% --config debug
|
||||||
|
cmake --build %BINARIES_DIR% --config release
|
||||||
|
|
||||||
|
SET BINARIES_DIR="./build/x64"
|
||||||
|
cmake . -G "%GENERATOR%" -A x64 -S %SOURCE_DIR% -B %BINARIES_DIR%
|
||||||
|
cmake --build %BINARIES_DIR% --config debug
|
||||||
|
cmake --build %BINARIES_DIR% --config release
|
||||||
|
|
||||||
|
PAUSE
|
||||||
114
assimp/Build.md
Normal file
114
assimp/Build.md
Normal file
|
|
@ -0,0 +1,114 @@
|
||||||
|
# Build / Install Instructions
|
||||||
|
|
||||||
|
## Manual build instructions
|
||||||
|
### Install prerequisites
|
||||||
|
You need to install
|
||||||
|
* cmake
|
||||||
|
* Your compiler (must support C++17 and C99 at least)
|
||||||
|
* For Windows
|
||||||
|
* DX-SDK 9 if you want to use our 3D-Viewer
|
||||||
|
|
||||||
|
### Get the source
|
||||||
|
Make sure you have a working git-installation. Open a command prompt and clone the Asset-Importer-Lib via:
|
||||||
|
```bash
|
||||||
|
git clone https://github.com/assimp/assimp.git
|
||||||
|
```
|
||||||
|
### Build from source:
|
||||||
|
* For *assimp.lib* without any tools:
|
||||||
|
```bash
|
||||||
|
cd assimp
|
||||||
|
cmake CMakeLists.txt
|
||||||
|
cmake --build .
|
||||||
|
```
|
||||||
|
|
||||||
|
* For assimp with the common tools like *assimp-cmd*
|
||||||
|
```bash
|
||||||
|
cd assimp
|
||||||
|
cmake CMakeLists.txt -DASSIMP_BUILD_ASSIMP_TOOLS=ON
|
||||||
|
cmake --build .
|
||||||
|
```
|
||||||
|
Note that by default this builds a shared library into the `bin` directory. If you want to build it as a static library see the build options at the bottom of this file.
|
||||||
|
|
||||||
|
### Build instructions for Windows with Visual-Studio
|
||||||
|
First, you have to install Visual-Studio on your windows-system. You can get the Community-Version for free [here](https://visualstudio.microsoft.com/downloads/)
|
||||||
|
To generate the build environment for your IDE open a command prompt, navigate to your repo and type:
|
||||||
|
```bash
|
||||||
|
cmake CMakeLists.txt
|
||||||
|
```
|
||||||
|
This will generate the project files for the visual studio. All dependencies used to build Asset-Importer-Lib shall be part of the repo. If you want to use you own zlib installation this is possible as well. Check the options for it.
|
||||||
|
|
||||||
|
### Build instructions for Windows with UWP
|
||||||
|
See <https://stackoverflow.com/questions/40803170/cmake-uwp-using-cmake-to-build-universal-windows-app>
|
||||||
|
|
||||||
|
### Build instructions for MinGW
|
||||||
|
Older versions of MinGW's compiler (e.g. 5.1.0) do not support the -mbig_obj flag
|
||||||
|
required to compile some of assimp's files, especially for debug builds.
|
||||||
|
Version 7.3.0 of g++-mingw-w64 & gcc-mingw-w64 appears to work.
|
||||||
|
|
||||||
|
Please see [CMake Cross Compiling](https://cmake.org/cmake/help/latest/manual/cmake-toolchains.7.html#cross-compiling) for general information on CMake Toolchains.
|
||||||
|
|
||||||
|
Some users have had success building assimp using MinGW on Linux using [polly](https://github.com/ruslo/polly/).
|
||||||
|
|
||||||
|
The following toolchain, which is not maintained by assimp, seems to work on Linux: [linux-mingw-w64-gnuxx11.cmake](https://github.com/ruslo/polly/blob/master/linux-mingw-w64-gnuxx11.cmake)
|
||||||
|
|
||||||
|
The following toolchain may or may not be helpful for building assimp using MinGW on Windows (untested):
|
||||||
|
[mingw-cxx17.cmake](https://github.com/ruslo/polly/blob/master/mingw-cxx17.cmake)
|
||||||
|
|
||||||
|
Besides the toolchain, compilation should be the same as for Linux / Unix.
|
||||||
|
|
||||||
|
### CMake build options
|
||||||
|
The cmake-build-environment provides options to configure the build. The following options can be used:
|
||||||
|
- **ASSIMP_HUNTER_ENABLED (default OFF)**: Enable Hunter package manager support.
|
||||||
|
- **BUILD_SHARED_LIBS (default ON)**: Generation of shared libs (dll for windows, so for Linux). Set this to OFF to get a static lib.
|
||||||
|
- **ASSIMP_BUILD_FRAMEWORK (default OFF, MacOnly)**: Build package as Mac OS X Framework bundle.
|
||||||
|
- **ASSIMP_DOUBLE_PRECISION (default OFF)**: All data will be stored as double values.
|
||||||
|
- **ASSIMP_OPT_BUILD_PACKAGES (default OFF)**: Set to ON to generate CPack configuration files and packaging targets.
|
||||||
|
- **ASSIMP_ANDROID_JNIIOSYSTEM (default OFF)**: Android JNI IOSystem support is active.
|
||||||
|
- **ASSIMP_NO_EXPORT (default OFF)**: Disable Assimp's export functionality.
|
||||||
|
- **ASSIMP_BUILD_ZLIB (default OFF)**: Build our own zlib.
|
||||||
|
- **ASSIMP_BUILD_ALL_EXPORTERS_BY_DEFAULT (default ON)**: Build Assimp with all exporters enabled.
|
||||||
|
- **ASSIMP_BUILD_ALL_IMPORTERS_BY_DEFAULT (default ON)**: Build Assimp with (most) importers enabled. Currently, USD importer is not included. See ASSIMP_BUILD_USD_IMPORTER.
|
||||||
|
- **ASSIMP_BUILD_ASSIMP_TOOLS (default OFF)**: If the supplementary tools for Assimp are built in addition to the library.
|
||||||
|
- **ASSIMP_BUILD_SAMPLES (default OFF)**: If the official samples are built as well (needs Glut).
|
||||||
|
- **ASSIMP_BUILD_TESTS (default ON)**: If the test suite for Assimp is built in addition to the library.
|
||||||
|
- **ASSIMP_COVERALLS (default OFF)**: Enable this to measure test coverage.
|
||||||
|
- **ASSIMP_INSTALL (default ON)**: Install Assimp library. Disable this if you want to use Assimp as a submodule.
|
||||||
|
- **ASSIMP_WARNINGS_AS_ERRORS (default ON)**: Treat all warnings as errors.
|
||||||
|
- **ASSIMP_ASAN (default OFF)**: Enable AddressSanitizer.
|
||||||
|
- **ASSIMP_UBSAN (default OFF)**: Enable Undefined Behavior sanitizer.
|
||||||
|
- **ASSIMP_BUILD_DOCS (default OFF)**: Build documentation using Doxygen. OBSOLETE, see https://github.com/assimp/assimp-docs
|
||||||
|
- **ASSIMP_INJECT_DEBUG_POSTFIX (default ON)**: Inject debug postfix in .a/.so/.lib/.dll lib names
|
||||||
|
- **ASSIMP_IGNORE_GIT_HASH (default OFF)**: Don't call git to get the hash.
|
||||||
|
- **ASSIMP_INSTALL_PDB (default ON)**: Install MSVC debug files.
|
||||||
|
- **USE_STATIC_CRT (default OFF)**: Link against the static MSVC runtime libraries.
|
||||||
|
- **ASSIMP_BUILD_DRACO (default OFF)**: Build Draco libraries. Primarily for glTF.
|
||||||
|
- **ASSIMP_BUILD_ASSIMP_VIEW (default ON, if DirectX found, OFF otherwise)**: Build Assimp view tool (requires DirectX).
|
||||||
|
- **ASSIMP_BUILD_USD_IMPORTER (default OFF, requires ASSIMP_WARNINGS_AS_ERRORS to be OFF)**: Build USD importer, defaults to off for CI purposes
|
||||||
|
|
||||||
|
### Install prebuild binaries
|
||||||
|
## Install on all platforms using vcpkg
|
||||||
|
You can download and install assimp using the [vcpkg](https://github.com/Microsoft/vcpkg/) dependency manager:
|
||||||
|
```bash
|
||||||
|
git clone https://github.com/Microsoft/vcpkg.git
|
||||||
|
cd vcpkg
|
||||||
|
./bootstrap-vcpkg.sh
|
||||||
|
./vcpkg integrate install
|
||||||
|
./vcpkg install assimp
|
||||||
|
```
|
||||||
|
The assimp port in vcpkg is kept up to date by Microsoft team members and community contributors. If the version is out of date, please [create an issue or pull request](https://github.com/Microsoft/vcpkg) on the vcpkg repository.
|
||||||
|
|
||||||
|
### Install on Ubuntu
|
||||||
|
You can install the Asset-Importer-Lib via apt:
|
||||||
|
```
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install libassimp-dev
|
||||||
|
```
|
||||||
|
|
||||||
|
### Install pyassimp
|
||||||
|
You need to have pip installed:
|
||||||
|
```
|
||||||
|
pip install pyassimp
|
||||||
|
```
|
||||||
|
|
||||||
|
### Get the SDK from itch.io
|
||||||
|
Just check [itch.io](https://kimkulling.itch.io/the-asset-importer-lib)
|
||||||
3961
assimp/CHANGES.md
Normal file
3961
assimp/CHANGES.md
Normal file
File diff suppressed because it is too large
Load diff
945
assimp/CMakeLists.txt
Normal file
945
assimp/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,945 @@
|
||||||
|
# Open Asset Import Library (assimp)
|
||||||
|
# ----------------------------------------------------------------------
|
||||||
|
# Copyright (c) 2006-2026, assimp team
|
||||||
|
#
|
||||||
|
# All rights reserved.
|
||||||
|
#
|
||||||
|
# Redistribution and use of this software in source and binary forms,
|
||||||
|
# with or without modification, are permitted provided that the
|
||||||
|
# following conditions are met:
|
||||||
|
#
|
||||||
|
# * Redistributions of source code must retain the above
|
||||||
|
# copyright notice, this list of conditions and the
|
||||||
|
# following disclaimer.
|
||||||
|
#
|
||||||
|
# * Redistributions in binary form must reproduce the above
|
||||||
|
# copyright notice, this list of conditions and the
|
||||||
|
# following disclaimer in the documentation and/or other
|
||||||
|
# materials provided with the distribution.
|
||||||
|
#
|
||||||
|
# * Neither the name of the assimp team, nor the names of its
|
||||||
|
# contributors may be used to endorse or promote products
|
||||||
|
# derived from this software without specific prior
|
||||||
|
# written permission of the assimp team.
|
||||||
|
#
|
||||||
|
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||||
|
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||||
|
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||||
|
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||||
|
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||||
|
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
|
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
#----------------------------------------------------------------------
|
||||||
|
SET(CMAKE_POLICY_DEFAULT_CMP0012 NEW)
|
||||||
|
SET(CMAKE_POLICY_DEFAULT_CMP0074 NEW)
|
||||||
|
SET(CMAKE_POLICY_DEFAULT_CMP0092 NEW)
|
||||||
|
|
||||||
|
CMAKE_MINIMUM_REQUIRED( VERSION 3.22 )
|
||||||
|
|
||||||
|
#================================================================================#
|
||||||
|
# Model formats not enabled by default
|
||||||
|
#
|
||||||
|
# 3rd party projects may not adhere to strict standards enforced by assimp,
|
||||||
|
# in which case those formats must be opt-in; otherwise the 3rd party code
|
||||||
|
# would fail assimp CI checks
|
||||||
|
#================================================================================#
|
||||||
|
# M3D format import support (assimp integration no longer supported by M3D format author)
|
||||||
|
# User may override these in their CMake script to provide M3D import/export support
|
||||||
|
# (M3D importer/exporter was disabled for assimp release 5.1 or later)
|
||||||
|
OPTION(ASSIMP_BUILD_M3D_IMPORTER "Enable M3D file import" off)
|
||||||
|
OPTION(ASSIMP_BUILD_M3D_EXPORTER "Enable M3D file export" off)
|
||||||
|
|
||||||
|
# Experimental USD importer: disabled, need to opt-in
|
||||||
|
# Note: assimp github PR automatic checks will fail the PR due to compiler warnings in
|
||||||
|
# the external, 3rd party tinyusdz code which isn't technically part of the PR since it's
|
||||||
|
# auto-cloned during build; so MUST disable the feature or the PR will be rejected
|
||||||
|
OPTION(ASSIMP_BUILD_USD_IMPORTER "Enable USD file import" off)
|
||||||
|
OPTION(ASSIMP_BUILD_USD_VERBOSE_LOGS "Enable verbose USD import debug logging" off)
|
||||||
|
|
||||||
|
# VRML (.wrl/.x3dv) file import support by leveraging X3D importer and 3rd party file
|
||||||
|
# format converter to convert .wrl/.x3dv files to X3D-compatible .xml
|
||||||
|
# (Need to make this opt-in because 3rd party code triggers lots of CI code quality warnings)
|
||||||
|
OPTION(ASSIMP_BUILD_VRML_IMPORTER "Enable VRML (.wrl/.x3dv) file import" off)
|
||||||
|
|
||||||
|
#--------------------------------------------------------------------------------#
|
||||||
|
# Internal impl for optional model formats
|
||||||
|
#--------------------------------------------------------------------------------#
|
||||||
|
# Internal/private M3D logic
|
||||||
|
if (NOT ASSIMP_BUILD_M3D_IMPORTER)
|
||||||
|
ADD_DEFINITIONS( -DASSIMP_BUILD_NO_M3D_IMPORTER)
|
||||||
|
endif () # if (not ASSIMP_BUILD_M3D_IMPORTER)
|
||||||
|
if (NOT ASSIMP_BUILD_M3D_EXPORTER)
|
||||||
|
ADD_DEFINITIONS( -DASSIMP_BUILD_NO_M3D_EXPORTER)
|
||||||
|
endif () # if (not ASSIMP_BUILD_M3D_EXPORTER)
|
||||||
|
|
||||||
|
# Internal/private VRML logic
|
||||||
|
if (NOT ASSIMP_BUILD_VRML_IMPORTER)
|
||||||
|
ADD_DEFINITIONS( -DASSIMP_BUILD_NO_VRML_IMPORTER)
|
||||||
|
endif () # if (not ASSIMP_BUILD_VRML_IMPORTER)
|
||||||
|
#================================================================================#
|
||||||
|
|
||||||
|
option(ASSIMP_BUILD_USE_CCACHE "Use ccache to speed up compilation." on)
|
||||||
|
|
||||||
|
IF(ASSIMP_BUILD_USE_CCACHE)
|
||||||
|
find_program(CCACHE_PATH ccache)
|
||||||
|
IF (CCACHE_PATH)
|
||||||
|
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ${CCACHE_PATH})
|
||||||
|
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ${CCACHE_PATH})
|
||||||
|
ENDIF()
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
# Toggles the use of the hunter package manager
|
||||||
|
option(ASSIMP_HUNTER_ENABLED "Enable Hunter package manager support" OFF)
|
||||||
|
|
||||||
|
IF(ASSIMP_HUNTER_ENABLED)
|
||||||
|
include("cmake-modules/HunterGate.cmake")
|
||||||
|
HunterGate(
|
||||||
|
URL "https://github.com/cpp-pm/hunter/archive/v0.25.8.tar.gz"
|
||||||
|
SHA1 "26c79d587883ec910bce168e25f6ac4595f97033"
|
||||||
|
)
|
||||||
|
ADD_DEFINITIONS(-DASSIMP_USE_HUNTER)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
PROJECT(Assimp VERSION 6.0.5
|
||||||
|
LANGUAGES C CXX
|
||||||
|
DESCRIPTION "Open Asset Import Library (Assimp) is a library to import various well-known 3D model formats in a uniform manner."
|
||||||
|
)
|
||||||
|
|
||||||
|
# All supported options ###############################################
|
||||||
|
|
||||||
|
OPTION( BUILD_SHARED_LIBS
|
||||||
|
"Build package with shared libraries."
|
||||||
|
ON
|
||||||
|
)
|
||||||
|
OPTION( ASSIMP_BUILD_FRAMEWORK
|
||||||
|
"Build package as Mac OS X Framework bundle."
|
||||||
|
OFF
|
||||||
|
)
|
||||||
|
OPTION( ASSIMP_DOUBLE_PRECISION
|
||||||
|
"Set to ON to enable double precision processing"
|
||||||
|
OFF
|
||||||
|
)
|
||||||
|
OPTION( ASSIMP_OPT_BUILD_PACKAGES
|
||||||
|
"Set to ON to generate CPack configuration files and packaging targets"
|
||||||
|
OFF
|
||||||
|
)
|
||||||
|
OPTION( ASSIMP_ANDROID_JNIIOSYSTEM
|
||||||
|
"Android JNI IOSystem support is active"
|
||||||
|
OFF
|
||||||
|
)
|
||||||
|
OPTION( ASSIMP_NO_EXPORT
|
||||||
|
"Disable Assimp's export functionality."
|
||||||
|
OFF
|
||||||
|
)
|
||||||
|
OPTION( ASSIMP_BUILD_ASSIMP_TOOLS
|
||||||
|
"If the supplementary tools for Assimp are built in addition to the library."
|
||||||
|
OFF
|
||||||
|
)
|
||||||
|
OPTION ( ASSIMP_BUILD_SAMPLES
|
||||||
|
"If the official samples are built as well (needs Glut)."
|
||||||
|
OFF
|
||||||
|
)
|
||||||
|
OPTION ( ASSIMP_BUILD_TESTS
|
||||||
|
"If the test suite for Assimp is built in addition to the library."
|
||||||
|
ON
|
||||||
|
)
|
||||||
|
OPTION ( ASSIMP_COVERALLS
|
||||||
|
"Enable this to measure test coverage."
|
||||||
|
OFF
|
||||||
|
)
|
||||||
|
OPTION( ASSIMP_INSTALL
|
||||||
|
"Disable this if you want to use assimp as a submodule."
|
||||||
|
ON
|
||||||
|
)
|
||||||
|
OPTION ( ASSIMP_WARNINGS_AS_ERRORS
|
||||||
|
"Treat all warnings as errors."
|
||||||
|
ON
|
||||||
|
)
|
||||||
|
OPTION ( ASSIMP_ASAN
|
||||||
|
"Enable AddressSanitizer."
|
||||||
|
OFF
|
||||||
|
)
|
||||||
|
OPTION ( ASSIMP_UBSAN
|
||||||
|
"Enable Undefined Behavior sanitizer."
|
||||||
|
OFF
|
||||||
|
)
|
||||||
|
OPTION ( ASSIMP_BUILD_DOCS
|
||||||
|
"Build documentation using Doxygen."
|
||||||
|
OFF
|
||||||
|
)
|
||||||
|
OPTION( ASSIMP_INJECT_DEBUG_POSTFIX
|
||||||
|
"Inject debug postfix in .a/.so/.dll lib names"
|
||||||
|
ON
|
||||||
|
)
|
||||||
|
|
||||||
|
OPTION ( ASSIMP_IGNORE_GIT_HASH
|
||||||
|
"Don't call git to get the hash."
|
||||||
|
OFF
|
||||||
|
)
|
||||||
|
|
||||||
|
IF (WIN32)
|
||||||
|
OPTION( ASSIMP_BUILD_ZLIB
|
||||||
|
"Build your zlib"
|
||||||
|
ON
|
||||||
|
)
|
||||||
|
ELSE()
|
||||||
|
OPTION( ASSIMP_BUILD_ZLIB
|
||||||
|
"Build your zlib"
|
||||||
|
OFF
|
||||||
|
)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
IF (WIN32)
|
||||||
|
# Use a subset of Windows.h
|
||||||
|
ADD_DEFINITIONS( -DWIN32_LEAN_AND_MEAN )
|
||||||
|
|
||||||
|
IF(MSVC)
|
||||||
|
OPTION( ASSIMP_INSTALL_PDB
|
||||||
|
"Create MSVC debug symbol files and add to Install target."
|
||||||
|
ON )
|
||||||
|
IF(NOT (MSVC_VERSION LESS 1900))
|
||||||
|
# Multibyte character set has been deprecated since at least MSVC2015 (possibly earlier)
|
||||||
|
ADD_DEFINITIONS( -DUNICODE -D_UNICODE )
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
# Link statically against c/c++ lib to avoid missing redistributable such as
|
||||||
|
# "VCRUNTIME140.dll not found. Try reinstalling the app.", but give users
|
||||||
|
# a choice to opt for the shared runtime if they want.
|
||||||
|
option(USE_STATIC_CRT "Link against the static runtime libraries." OFF)
|
||||||
|
|
||||||
|
# The CMAKE_CXX_FLAGS vars can be overridden by some Visual Studio generators, so we use an alternative
|
||||||
|
# global method here:
|
||||||
|
if (${USE_STATIC_CRT})
|
||||||
|
add_compile_options(
|
||||||
|
$<$<CONFIG:>:/MT>
|
||||||
|
$<$<CONFIG:Debug>:/MTd>
|
||||||
|
$<$<CONFIG:Release>:/MT>
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
ENDIF()
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
IF (IOS AND NOT ASSIMP_HUNTER_ENABLED)
|
||||||
|
IF (NOT CMAKE_BUILD_TYPE)
|
||||||
|
SET(CMAKE_BUILD_TYPE "Release")
|
||||||
|
ENDIF ()
|
||||||
|
ADD_DEFINITIONS(-DENABLE_BITCODE)
|
||||||
|
ENDIF ()
|
||||||
|
|
||||||
|
|
||||||
|
IF (ASSIMP_BUILD_FRAMEWORK)
|
||||||
|
SET (BUILD_SHARED_LIBS ON)
|
||||||
|
MESSAGE(STATUS "Framework bundle building enabled")
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
IF(NOT BUILD_SHARED_LIBS)
|
||||||
|
MESSAGE(STATUS "Shared libraries disabled")
|
||||||
|
SET(LINK_SEARCH_START_STATIC TRUE)
|
||||||
|
SET(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_STATIC_LIBRARY_SUFFIX} ${CMAKE_FIND_LIBRARY_SUFFIXES})
|
||||||
|
ELSE()
|
||||||
|
MESSAGE(STATUS "Shared libraries enabled")
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
# Define here the needed parameters
|
||||||
|
SET (ASSIMP_VERSION_MAJOR ${PROJECT_VERSION_MAJOR})
|
||||||
|
SET (ASSIMP_VERSION_MINOR ${PROJECT_VERSION_MINOR})
|
||||||
|
SET (ASSIMP_VERSION_PATCH ${PROJECT_VERSION_PATCH})
|
||||||
|
SET (ASSIMP_VERSION ${ASSIMP_VERSION_MAJOR}.${ASSIMP_VERSION_MINOR}.${ASSIMP_VERSION_PATCH})
|
||||||
|
SET (ASSIMP_SOVERSION 6)
|
||||||
|
|
||||||
|
SET( ASSIMP_PACKAGE_VERSION "0" CACHE STRING "the package-specific version used for uploading the sources" )
|
||||||
|
set(CMAKE_CXX_STANDARD 17)
|
||||||
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
|
set(CMAKE_C_STANDARD 99)
|
||||||
|
|
||||||
|
IF(NOT ASSIMP_IGNORE_GIT_HASH)
|
||||||
|
# Get the current working branch
|
||||||
|
EXECUTE_PROCESS(
|
||||||
|
COMMAND git rev-parse --abbrev-ref HEAD
|
||||||
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
|
OUTPUT_VARIABLE GIT_BRANCH
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
|
ERROR_QUIET
|
||||||
|
)
|
||||||
|
|
||||||
|
# Get the latest abbreviated commit hash of the working branch
|
||||||
|
EXECUTE_PROCESS(
|
||||||
|
COMMAND git rev-parse --short=8 HEAD
|
||||||
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
|
OUTPUT_VARIABLE GIT_COMMIT_HASH
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
|
ERROR_QUIET
|
||||||
|
)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
IF(NOT GIT_COMMIT_HASH)
|
||||||
|
SET(GIT_COMMIT_HASH 0)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
IF(ASSIMP_DOUBLE_PRECISION)
|
||||||
|
ADD_DEFINITIONS(-DASSIMP_DOUBLE_PRECISION)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
INCLUDE_DIRECTORIES( BEFORE
|
||||||
|
./
|
||||||
|
code/
|
||||||
|
include
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/include
|
||||||
|
)
|
||||||
|
|
||||||
|
LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake-modules" )
|
||||||
|
SET(LIBASSIMP_COMPONENT "libassimp${ASSIMP_VERSION_MAJOR}.${ASSIMP_VERSION_MINOR}.${ASSIMP_VERSION_PATCH}" )
|
||||||
|
SET(LIBASSIMP-DEV_COMPONENT "libassimp${ASSIMP_VERSION_MAJOR}.${ASSIMP_VERSION_MINOR}.${ASSIMP_VERSION_PATCH}-dev" )
|
||||||
|
SET(CPACK_COMPONENTS_ALL assimp-bin ${LIBASSIMP_COMPONENT} ${LIBASSIMP-DEV_COMPONENT} assimp-dev)
|
||||||
|
SET(ASSIMP_LIBRARY_SUFFIX "" CACHE STRING "Suffix to append to library names")
|
||||||
|
|
||||||
|
IF( UNIX )
|
||||||
|
# Use GNUInstallDirs for Unix predefined directories
|
||||||
|
INCLUDE(GNUInstallDirs)
|
||||||
|
# Ensure that we do not run into issues like http://www.tcm.phy.cam.ac.uk/sw/inodes64.html on 32 bit Linux
|
||||||
|
IF(NOT ${OPERATING_SYSTEM} MATCHES "Android")
|
||||||
|
IF ( CMAKE_SIZEOF_VOID_P EQUAL 4) # only necessary for 32-bit Linux
|
||||||
|
ADD_DEFINITIONS(-D_FILE_OFFSET_BITS=64 )
|
||||||
|
ENDIF()
|
||||||
|
ENDIF()
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
IF(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND WIN32)
|
||||||
|
ADD_DEFINITIONS( -D_SCL_SECURE_NO_WARNINGS )
|
||||||
|
ADD_DEFINITIONS( -D_CRT_SECURE_NO_WARNINGS )
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
IF( MSVC OR "${CMAKE_CXX_SIMULATE_ID}" MATCHES "MSVC") # clang with MSVC ABI
|
||||||
|
ADD_DEFINITIONS( -D_SCL_SECURE_NO_WARNINGS )
|
||||||
|
ADD_DEFINITIONS( -D_CRT_SECURE_NO_WARNINGS )
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
|
||||||
|
# Grouped compiler settings ########################################
|
||||||
|
IF ((CMAKE_C_COMPILER_ID MATCHES "GNU") AND NOT MINGW AND NOT HAIKU)
|
||||||
|
IF(NOT ASSIMP_HUNTER_ENABLED)
|
||||||
|
SET(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
IF(CMAKE_CXX_COMPILER_VERSION GREATER_EQUAL 13 AND CMAKE_CXX_COMPILER_ID MATCHES "GNU")
|
||||||
|
MESSAGE(STATUS "GCC13 detected disabling \"-Wdangling-reference\" in Cpp files as it appears to be a false positive")
|
||||||
|
ADD_COMPILE_OPTIONS("$<$<COMPILE_LANGUAGE:CXX>:-Wno-dangling-reference>")
|
||||||
|
ENDIF()
|
||||||
|
# hide all not-exported symbols
|
||||||
|
IF(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "mips64" )
|
||||||
|
SET(CMAKE_CXX_FLAGS "-mxgot -fvisibility=hidden -fno-strict-aliasing -Wall ${CMAKE_CXX_FLAGS}")
|
||||||
|
SET(CMAKE_C_FLAGS "-fno-strict-aliasing ${CMAKE_C_FLAGS}")
|
||||||
|
SET(LIBSTDC++_LIBRARIES -lstdc++)
|
||||||
|
ELSE()
|
||||||
|
SET(CMAKE_CXX_FLAGS "-fvisibility=hidden -fno-strict-aliasing -Wall ${CMAKE_CXX_FLAGS}")
|
||||||
|
SET(CMAKE_C_FLAGS "-fno-strict-aliasing ${CMAKE_C_FLAGS}")
|
||||||
|
SET(LIBSTDC++_LIBRARIES -lstdc++)
|
||||||
|
ENDIF()
|
||||||
|
ELSEIF(MSVC)
|
||||||
|
# enable multi-core compilation with MSVC
|
||||||
|
IF(CMAKE_CXX_COMPILER_ID MATCHES "Clang" ) # clang-cl
|
||||||
|
ADD_COMPILE_OPTIONS(/bigobj)
|
||||||
|
ELSE() # msvc
|
||||||
|
ADD_COMPILE_OPTIONS(/MP /bigobj)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
# disable "elements of array '' will be default initialized" warning on MSVC2013
|
||||||
|
IF(MSVC12)
|
||||||
|
ADD_COMPILE_OPTIONS(/wd4351)
|
||||||
|
ENDIF()
|
||||||
|
# supress warning for double to float conversion if Double precision is activated
|
||||||
|
ADD_COMPILE_OPTIONS(/wd4244)
|
||||||
|
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /D_DEBUG /Zi /Od")
|
||||||
|
# Allow user to disable PDBs
|
||||||
|
if(ASSIMP_INSTALL_PDB)
|
||||||
|
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Zi")
|
||||||
|
SET(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /DEBUG:FULL /PDBALTPATH:%_PDB% /OPT:REF /OPT:ICF")
|
||||||
|
elseif((GENERATOR_IS_MULTI_CONFIG) OR (CMAKE_BUILD_TYPE MATCHES Release))
|
||||||
|
message("-- MSVC PDB generation disabled. Release binary will not be debuggable.")
|
||||||
|
endif()
|
||||||
|
if(NOT CMAKE_CXX_FLAGS MATCHES "/utf-8")
|
||||||
|
# Source code is encoded in UTF-8
|
||||||
|
ADD_COMPILE_OPTIONS(/source-charset:utf-8)
|
||||||
|
endif()
|
||||||
|
ELSEIF (CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
|
||||||
|
IF(NOT ASSIMP_HUNTER_ENABLED)
|
||||||
|
SET(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||||
|
ENDIF()
|
||||||
|
SET(CMAKE_CXX_FLAGS "-Wno-deprecated-non-prototype -fvisibility=hidden -fno-strict-aliasing -Wall -Wno-long-long ${CMAKE_CXX_FLAGS}" )
|
||||||
|
SET(CMAKE_C_FLAGS "-Wno-deprecated-non-prototype -fno-strict-aliasing ${CMAKE_C_FLAGS}")
|
||||||
|
ELSEIF( MINGW )
|
||||||
|
IF (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0)
|
||||||
|
message(FATAL_ERROR "MinGW is too old to be supported. Please update MinGW and try again.")
|
||||||
|
ELSEIF(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.3)
|
||||||
|
message(WARNING "MinGW is old, if you experience errors, update MinGW.")
|
||||||
|
ENDIF()
|
||||||
|
IF(NOT ASSIMP_HUNTER_ENABLED)
|
||||||
|
SET(CMAKE_CXX_FLAGS "-std=gnu++17 ${CMAKE_CXX_FLAGS}")
|
||||||
|
SET(CMAKE_C_FLAGS "-fPIC ${CMAKE_C_FLAGS}")
|
||||||
|
ENDIF()
|
||||||
|
IF (CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||||
|
SET(CMAKE_CXX_FLAGS "-fvisibility=hidden -fno-strict-aliasing -Wno-dangling-reference -Wall -Wno-long-long -Wa,-mbig-obj -g ${CMAKE_CXX_FLAGS}")
|
||||||
|
ELSE()
|
||||||
|
SET(CMAKE_CXX_FLAGS "-fvisibility=hidden -fno-strict-aliasing -Wno-dangling-reference -Wall -Wno-long-long -Wa,-mbig-obj -O3 ${CMAKE_CXX_FLAGS}")
|
||||||
|
ENDIF()
|
||||||
|
SET(CMAKE_C_FLAGS "-fno-strict-aliasing ${CMAKE_C_FLAGS}")
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
IF ( IOS AND NOT ASSIMP_HUNTER_ENABLED)
|
||||||
|
IF (CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||||
|
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fembed-bitcode -Og")
|
||||||
|
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fembed-bitcode -Og")
|
||||||
|
ELSE()
|
||||||
|
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fembed-bitcode -O3")
|
||||||
|
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fembed-bitcode -O3")
|
||||||
|
ENDIF()
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
IF (ASSIMP_COVERALLS)
|
||||||
|
MESSAGE(STATUS "Coveralls enabled")
|
||||||
|
|
||||||
|
INCLUDE(Coveralls)
|
||||||
|
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O0 -fprofile-arcs -ftest-coverage")
|
||||||
|
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O0 -fprofile-arcs -ftest-coverage")
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
IF (ASSIMP_ASAN)
|
||||||
|
MESSAGE(STATUS "AddressSanitizer enabled")
|
||||||
|
|
||||||
|
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address")
|
||||||
|
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address")
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
IF (ASSIMP_UBSAN)
|
||||||
|
MESSAGE(STATUS "Undefined Behavior sanitizer enabled")
|
||||||
|
|
||||||
|
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=undefined,shift,shift-exponent,integer-divide-by-zero,unreachable,vla-bound,null,return,signed-integer-overflow,bounds,float-divide-by-zero,float-cast-overflow,nonnull-attribute,returns-nonnull-attribute,bool,enum,vptr,pointer-overflow,builtin -fno-sanitize-recover=all")
|
||||||
|
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=undefined,shift,shift-exponent,integer-divide-by-zero,unreachable,vla-bound,null,return,signed-integer-overflow,bounds,float-divide-by-zero,float-cast-overflow,nonnull-attribute,returns-nonnull-attribute,bool,enum,vptr,pointer-overflow,builtin -fno-sanitize-recover=all")
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
INCLUDE (FindPkgMacros)
|
||||||
|
INCLUDE (PrecompiledHeader)
|
||||||
|
|
||||||
|
# Set Assimp project output directory variables.
|
||||||
|
# Will respect top-level CMAKE_*_OUTPUT_DIRECTORY variables if any are set.
|
||||||
|
IF(NOT DEFINED CMAKE_RUNTIME_OUTPUT_DIRECTORY)
|
||||||
|
SET(ASSIMP_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/bin" CACHE STRING "Path for runtime output files")
|
||||||
|
ELSE()
|
||||||
|
SET(ASSIMP_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} CACHE STRING "Path for runtime output files")
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
IF(NOT DEFINED CMAKE_LIBRARY_OUTPUT_DIRECTORY)
|
||||||
|
SET(ASSIMP_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/bin" CACHE STRING "Path for library output files")
|
||||||
|
ELSE()
|
||||||
|
SET(ASSIMP_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY} CACHE STRING "Path for runtime output files")
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
IF(NOT DEFINED CMAKE_ARCHIVE_OUTPUT_DIRECTORY)
|
||||||
|
SET(ASSIMP_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/lib" CACHE STRING "Path for library output files")
|
||||||
|
ELSE()
|
||||||
|
SET(ASSIMP_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY} CACHE STRING "Path for runtime output files")
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
# Macro used to set the output directories of a target to the
|
||||||
|
# respective Assimp output directories.
|
||||||
|
MACRO(TARGET_USE_COMMON_OUTPUT_DIRECTORY target)
|
||||||
|
set_target_properties(${target} PROPERTIES
|
||||||
|
RUNTIME_OUTPUT_DIRECTORY ${ASSIMP_RUNTIME_OUTPUT_DIRECTORY}
|
||||||
|
LIBRARY_OUTPUT_DIRECTORY ${ASSIMP_LIBRARY_OUTPUT_DIRECTORY}
|
||||||
|
ARCHIVE_OUTPUT_DIRECTORY ${ASSIMP_ARCHIVE_OUTPUT_DIRECTORY}
|
||||||
|
)
|
||||||
|
ENDMACRO()
|
||||||
|
|
||||||
|
get_cmake_property(is_multi_config GENERATOR_IS_MULTI_CONFIG)
|
||||||
|
|
||||||
|
IF (ASSIMP_INJECT_DEBUG_POSTFIX AND (is_multi_config OR CMAKE_BUILD_TYPE STREQUAL "Debug"))
|
||||||
|
SET(CMAKE_DEBUG_POSTFIX "d" CACHE STRING "Debug Postfix for lib, samples and tools")
|
||||||
|
ELSE()
|
||||||
|
SET(CMAKE_DEBUG_POSTFIX "" CACHE STRING "Debug Postfix for lib, samples and tools")
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
# Only generate this target if no higher-level project already has
|
||||||
|
IF (NOT TARGET uninstall AND ASSIMP_INSTALL)
|
||||||
|
# add make uninstall capability
|
||||||
|
CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/cmake-modules/cmake_uninstall.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" IMMEDIATE @ONLY)
|
||||||
|
ADD_CUSTOM_TARGET(uninstall "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
IF( UNIX )
|
||||||
|
# Use GNUInstallDirs for Unix predefined directories
|
||||||
|
INCLUDE(GNUInstallDirs)
|
||||||
|
|
||||||
|
SET( ASSIMP_LIB_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR})
|
||||||
|
SET( ASSIMP_INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_INCLUDEDIR})
|
||||||
|
SET( ASSIMP_BIN_INSTALL_DIR ${CMAKE_INSTALL_BINDIR})
|
||||||
|
ELSE()
|
||||||
|
# Cache these to allow the user to override them on non-Unix platforms
|
||||||
|
SET( ASSIMP_LIB_INSTALL_DIR "lib" CACHE STRING
|
||||||
|
"Path the built library files are installed to." )
|
||||||
|
SET( ASSIMP_INCLUDE_INSTALL_DIR "include" CACHE STRING
|
||||||
|
"Path the header files are installed to." )
|
||||||
|
SET( ASSIMP_BIN_INSTALL_DIR "bin" CACHE STRING
|
||||||
|
"Path the tool executables are installed to." )
|
||||||
|
|
||||||
|
SET(CMAKE_INSTALL_FULL_INCLUDEDIR ${CMAKE_INSTALL_PREFIX}/${ASSIMP_INCLUDE_INSTALL_DIR})
|
||||||
|
SET(CMAKE_INSTALL_FULL_LIBDIR ${CMAKE_INSTALL_PREFIX}/${ASSIMP_LIB_INSTALL_DIR})
|
||||||
|
SET(CMAKE_INSTALL_FULL_BINDIR ${CMAKE_INSTALL_PREFIX}/${ASSIMP_BIN_INSTALL_DIR})
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
set(GENERATED_DIR "${CMAKE_CURRENT_BINARY_DIR}/generated")
|
||||||
|
|
||||||
|
IF(ASSIMP_HUNTER_ENABLED)
|
||||||
|
SET(CONFIG_INSTALL_DIR "lib/cmake/${PROJECT_NAME}")
|
||||||
|
SET(CMAKE_CONFIG_TEMPLATE_FILE "cmake-modules/assimp-hunter-config.cmake.in")
|
||||||
|
SET(NAMESPACE "${PROJECT_NAME}::")
|
||||||
|
SET(TARGETS_EXPORT_NAME "${PROJECT_NAME}Targets")
|
||||||
|
SET(VERSION_CONFIG "${GENERATED_DIR}/${PROJECT_NAME}ConfigVersion.cmake")
|
||||||
|
SET(PROJECT_CONFIG "${GENERATED_DIR}/${PROJECT_NAME}Config.cmake")
|
||||||
|
ELSE()
|
||||||
|
SET(CONFIG_INSTALL_DIR "${ASSIMP_LIB_INSTALL_DIR}/cmake/assimp-${ASSIMP_VERSION_MAJOR}.${ASSIMP_VERSION_MINOR}")
|
||||||
|
SET(CMAKE_CONFIG_TEMPLATE_FILE "cmake-modules/assimp-plain-config.cmake.in")
|
||||||
|
string(TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWERCASE)
|
||||||
|
SET(NAMESPACE "${PROJECT_NAME_LOWERCASE}::")
|
||||||
|
SET(TARGETS_EXPORT_NAME "${PROJECT_NAME_LOWERCASE}Targets")
|
||||||
|
SET(VERSION_CONFIG "${GENERATED_DIR}/${PROJECT_NAME_LOWERCASE}ConfigVersion.cmake")
|
||||||
|
SET(PROJECT_CONFIG "${GENERATED_DIR}/${PROJECT_NAME_LOWERCASE}Config.cmake")
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
set(INCLUDE_INSTALL_DIR "include")
|
||||||
|
|
||||||
|
# Include module with fuction 'write_basic_package_version_file'
|
||||||
|
include(CMakePackageConfigHelpers)
|
||||||
|
|
||||||
|
# Note: PROJECT_VERSION is used as a VERSION
|
||||||
|
write_basic_package_version_file("${VERSION_CONFIG}" COMPATIBILITY SameMajorVersion)
|
||||||
|
|
||||||
|
configure_package_config_file(
|
||||||
|
${CMAKE_CONFIG_TEMPLATE_FILE}
|
||||||
|
"${PROJECT_CONFIG}"
|
||||||
|
INSTALL_DESTINATION "${CONFIG_INSTALL_DIR}"
|
||||||
|
)
|
||||||
|
|
||||||
|
IF(ASSIMP_INSTALL)
|
||||||
|
INSTALL(
|
||||||
|
FILES "${PROJECT_CONFIG}" "${VERSION_CONFIG}"
|
||||||
|
DESTINATION "${CONFIG_INSTALL_DIR}"
|
||||||
|
COMPONENT ${LIBASSIMP-DEV_COMPONENT}
|
||||||
|
)
|
||||||
|
|
||||||
|
INSTALL(
|
||||||
|
EXPORT "${TARGETS_EXPORT_NAME}"
|
||||||
|
NAMESPACE "${NAMESPACE}"
|
||||||
|
DESTINATION "${CONFIG_INSTALL_DIR}"
|
||||||
|
COMPONENT ${LIBASSIMP-DEV_COMPONENT}
|
||||||
|
)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
IF( ASSIMP_BUILD_DOCS )
|
||||||
|
ADD_SUBDIRECTORY(doc)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
# Search for external dependencies, and build them from source if not found
|
||||||
|
# Search for zlib
|
||||||
|
IF(ASSIMP_HUNTER_ENABLED)
|
||||||
|
hunter_add_package(ZLIB)
|
||||||
|
find_package(ZLIB CONFIG REQUIRED)
|
||||||
|
|
||||||
|
add_definitions(-DASSIMP_BUILD_NO_OWN_ZLIB)
|
||||||
|
SET(ZLIB_FOUND TRUE)
|
||||||
|
SET(ZLIB_LIBRARIES ZLIB::zlib)
|
||||||
|
SET(ASSIMP_BUILD_MINIZIP TRUE)
|
||||||
|
ELSE()
|
||||||
|
# If the zlib is already found outside, add an export in case assimpTargets can't find it.
|
||||||
|
IF( ZLIB_FOUND AND ASSIMP_INSTALL)
|
||||||
|
INSTALL( TARGETS zlib zlibstatic
|
||||||
|
EXPORT "${TARGETS_EXPORT_NAME}")
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
IF ( NOT ASSIMP_BUILD_ZLIB )
|
||||||
|
FIND_PACKAGE(ZLIB)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
IF ( NOT ZLIB_FOUND AND NOT ASSIMP_BUILD_ZLIB )
|
||||||
|
message( FATAL_ERROR
|
||||||
|
"Build configured with -DASSIMP_BUILD_ZLIB=OFF but unable to find zlib"
|
||||||
|
)
|
||||||
|
ELSEIF( NOT ZLIB_FOUND )
|
||||||
|
MESSAGE(STATUS "compiling zlib from sources")
|
||||||
|
INCLUDE(CheckIncludeFile)
|
||||||
|
INCLUDE(CheckTypeSize)
|
||||||
|
INCLUDE(CheckFunctionExists)
|
||||||
|
|
||||||
|
# Explicitly turn off ASM686 and AMD64 cmake options.
|
||||||
|
# The AMD64 option causes a build failure on MSVC and the ASM builds seem to have problems:
|
||||||
|
# https://github.com/madler/zlib/issues/41#issuecomment-125848075
|
||||||
|
# Also prevents these options from "polluting" the cmake options if assimp is being
|
||||||
|
# included as a submodule.
|
||||||
|
SET(ASM686 FALSE CACHE INTERNAL "Override ZLIB flag to turn off assembly" FORCE )
|
||||||
|
SET(AMD64 FALSE CACHE INTERNAL "Override ZLIB flag to turn off assembly" FORCE )
|
||||||
|
|
||||||
|
# compile from sources
|
||||||
|
ADD_SUBDIRECTORY(contrib/zlib)
|
||||||
|
SET(ZLIB_FOUND 1)
|
||||||
|
SET(ZLIB_LIBRARIES zlibstatic)
|
||||||
|
SET(ZLIB_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/contrib/zlib ${CMAKE_CURRENT_BINARY_DIR}/contrib/zlib)
|
||||||
|
# need to ensure we don't link with system zlib or minizip as well.
|
||||||
|
SET(ASSIMP_BUILD_MINIZIP 1)
|
||||||
|
ELSE()
|
||||||
|
ADD_DEFINITIONS(-DASSIMP_BUILD_NO_OWN_ZLIB)
|
||||||
|
SET(ZLIB_LIBRARIES_LINKED -l${ZLIB_LIBRARIES})
|
||||||
|
ENDIF()
|
||||||
|
INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR})
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
IF( NOT IOS )
|
||||||
|
IF( NOT ASSIMP_BUILD_MINIZIP )
|
||||||
|
use_pkgconfig(UNZIP minizip)
|
||||||
|
ENDIF()
|
||||||
|
ELSE ()
|
||||||
|
IF( NOT BUILD_SHARED_LIBS )
|
||||||
|
IF( NOT ASSIMP_BUILD_MINIZIP )
|
||||||
|
USE_PKGCONFIG(UNZIP minizip)
|
||||||
|
ENDIF()
|
||||||
|
ENDIF ()
|
||||||
|
ENDIF ()
|
||||||
|
|
||||||
|
IF ( ASSIMP_NO_EXPORT )
|
||||||
|
ADD_DEFINITIONS( -DASSIMP_BUILD_NO_EXPORT)
|
||||||
|
MESSAGE( STATUS "Build an import-only version of Assimp." )
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
SET ( ASSIMP_BUILD_ARCHITECTURE "" CACHE STRING
|
||||||
|
"describe the current architecture."
|
||||||
|
)
|
||||||
|
IF( ASSIMP_BUILD_ARCHITECTURE STREQUAL "")
|
||||||
|
ELSE()
|
||||||
|
ADD_DEFINITIONS ( -D'ASSIMP_BUILD_ARCHITECTURE="${ASSIMP_BUILD_ARCHITECTURE}"' )
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
# ${CMAKE_GENERATOR}
|
||||||
|
SET ( ASSIMP_BUILD_COMPILER "" CACHE STRING
|
||||||
|
"describe the current compiler."
|
||||||
|
)
|
||||||
|
IF( ASSIMP_BUILD_COMPILER STREQUAL "")
|
||||||
|
ELSE()
|
||||||
|
ADD_DEFINITIONS ( -D'ASSIMP_BUILD_COMPILER="${ASSIMP_BUILD_COMPILER}"' )
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
MARK_AS_ADVANCED ( ASSIMP_BUILD_ARCHITECTURE ASSIMP_BUILD_COMPILER )
|
||||||
|
|
||||||
|
SET ( ASSIMP_BUILD_NONFREE_C4D_IMPORTER OFF CACHE BOOL
|
||||||
|
"Build the C4D importer, which relies on the non-free Cineware SDK."
|
||||||
|
)
|
||||||
|
|
||||||
|
IF (ASSIMP_BUILD_NONFREE_C4D_IMPORTER)
|
||||||
|
SET(C4D_INCLUDES "${CMAKE_CURRENT_SOURCE_DIR}/contrib/Cineware/includes")
|
||||||
|
|
||||||
|
IF (WIN32)
|
||||||
|
# pick the correct prebuilt library
|
||||||
|
IF(MSVC143)
|
||||||
|
SET(C4D_LIB_POSTFIX "_2022")
|
||||||
|
ELSEIF(MSV142)
|
||||||
|
SET(C4D_LIB_POSTFIX "_2019")
|
||||||
|
ELSEIF(MSVC15)
|
||||||
|
SET(C4D_LIB_POSTFIX "_2017")
|
||||||
|
ELSEIF(MSVC14)
|
||||||
|
SET(C4D_LIB_POSTFIX "_2015")
|
||||||
|
ELSEIF(MSVC12)
|
||||||
|
SET(C4D_LIB_POSTFIX "_2013")
|
||||||
|
ELSEIF(MSVC11)
|
||||||
|
SET(C4D_LIB_POSTFIX "_2012")
|
||||||
|
ELSEIF(MSVC10)
|
||||||
|
SET(C4D_LIB_POSTFIX "_2010")
|
||||||
|
ELSE()
|
||||||
|
MESSAGE( FATAL_ERROR
|
||||||
|
"C4D for Windows is currently only supported with MSVC 10, 11, 12, 14, 14.2, 14.3"
|
||||||
|
)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
SET(C4D_LIB_BASE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/contrib/Cineware/libraries/win")
|
||||||
|
|
||||||
|
SET(C4D_DEBUG_LIBRARIES
|
||||||
|
"${C4D_LIB_BASE_PATH}/cinewarelib${C4D_LIB_POSTFIX}/cinewarelib_debug.lib"
|
||||||
|
"${C4D_LIB_BASE_PATH}/jpeglib${C4D_LIB_POSTFIX}/jpeglib_debug.lib"
|
||||||
|
)
|
||||||
|
SET(C4D_RELEASE_LIBRARIES
|
||||||
|
"${C4D_LIB_BASE_PATH}/cinewarelib${C4D_LIB_POSTFIX}/cinewarelib_release.lib"
|
||||||
|
"${C4D_LIB_BASE_PATH}/jpeglib${C4D_LIB_POSTFIX}/jpeglib_release.lib"
|
||||||
|
)
|
||||||
|
|
||||||
|
# winsock and winmm are necessary (and undocumented) dependencies of Cineware SDK because
|
||||||
|
# it can be used to communicate with a running Cinema 4D instance
|
||||||
|
SET(C4D_EXTRA_LIBRARIES WSock32.lib Winmm.lib)
|
||||||
|
ELSEIF (APPLE)
|
||||||
|
SET(C4D_LIB_BASE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/contrib/Cineware/libraries/osx")
|
||||||
|
|
||||||
|
SET(C4D_DEBUG_LIBRARIES
|
||||||
|
"${C4D_LIB_BASE_PATH}/debug/libcinewarelib.a"
|
||||||
|
"${C4D_LIB_BASE_PATH}/debug/libjpeglib.a"
|
||||||
|
)
|
||||||
|
SET(C4D_RELEASE_LIBRARIES
|
||||||
|
"${C4D_LIB_BASE_PATH}/release/libcinewarelib.a"
|
||||||
|
"${C4D_LIB_BASE_PATH}/release/libjpeglib.a"
|
||||||
|
)
|
||||||
|
ELSE()
|
||||||
|
MESSAGE( FATAL_ERROR
|
||||||
|
"C4D is currently only available on Windows and macOS with Cineware SDK installed in contrib/Cineware"
|
||||||
|
)
|
||||||
|
ENDIF()
|
||||||
|
ELSE ()
|
||||||
|
ADD_DEFINITIONS( -DASSIMP_BUILD_NO_C4D_IMPORTER )
|
||||||
|
ENDIF ()
|
||||||
|
|
||||||
|
IF(ASSIMP_BUILD_DRACO_STATIC)
|
||||||
|
SET(ASSIMP_BUILD_DRACO ON)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
# Draco requires cmake 3.12
|
||||||
|
IF (DEFINED CMAKE_VERSION AND "${CMAKE_VERSION}" VERSION_LESS "3.12")
|
||||||
|
MESSAGE(NOTICE "draco requires cmake 3.12 or newer, cmake is ${CMAKE_VERSION} . Draco is disabled")
|
||||||
|
SET ( ASSIMP_BUILD_DRACO OFF CACHE BOOL "Disabled: Draco requires newer cmake" FORCE )
|
||||||
|
ELSE()
|
||||||
|
OPTION ( ASSIMP_BUILD_DRACO "If the Draco libraries are to be built. Primarily for glTF" OFF )
|
||||||
|
IF ( ASSIMP_BUILD_DRACO )
|
||||||
|
# Primarily for glTF v2
|
||||||
|
# Enable Draco glTF feature set
|
||||||
|
SET(DRACO_GLTF_BITSTREAM ON CACHE BOOL "" FORCE)
|
||||||
|
# Disable unnecessary or omitted components
|
||||||
|
SET(DRACO_JS_GLUE OFF CACHE BOOL "" FORCE)
|
||||||
|
SET(DRACO_WASM OFF CACHE BOOL "" FORCE)
|
||||||
|
SET(DRACO_MAYA_PLUGIN OFF CACHE BOOL "" FORCE)
|
||||||
|
SET(DRACO_UNITY_PLUGIN OFF CACHE BOOL "" FORCE)
|
||||||
|
SET(DRACO_TESTS OFF CACHE BOOL "" FORCE)
|
||||||
|
|
||||||
|
IF(ASSIMP_HUNTER_ENABLED)
|
||||||
|
hunter_add_package(draco)
|
||||||
|
find_package(draco CONFIG REQUIRED)
|
||||||
|
SET(draco_LIBRARIES draco::draco)
|
||||||
|
ELSE()
|
||||||
|
# Draco 1.4.1 has many warnings and will not build with /WX or -Werror
|
||||||
|
# See https://github.com/google/draco/issues/672
|
||||||
|
# and https://github.com/google/draco/issues/673
|
||||||
|
IF(MSVC)
|
||||||
|
SET(DRACO_CXX_FLAGS "/W0")
|
||||||
|
ELSE()
|
||||||
|
LIST(APPEND DRACO_CXX_FLAGS
|
||||||
|
"-Wno-bool-compare"
|
||||||
|
"-Wno-comment"
|
||||||
|
"-Wno-maybe-uninitialized"
|
||||||
|
"-Wno-sign-compare"
|
||||||
|
"-Wno-unused-local-typedefs"
|
||||||
|
)
|
||||||
|
|
||||||
|
IF(NOT ASSIMP_BUILD_DRACO_STATIC)
|
||||||
|
# Draco 1.4.1 does not explicitly export any symbols under GCC/clang
|
||||||
|
LIST(APPEND DRACO_CXX_FLAGS
|
||||||
|
"-fvisibility=default"
|
||||||
|
)
|
||||||
|
ENDIF()
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
# Don't build or install all of Draco by default
|
||||||
|
ADD_SUBDIRECTORY( "contrib/draco" EXCLUDE_FROM_ALL )
|
||||||
|
|
||||||
|
IF(ASSIMP_BUILD_DRACO_STATIC)
|
||||||
|
set_property(DIRECTORY "contrib/draco" PROPERTY BUILD_SHARED_LIBS OFF)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
IF(MSVC OR WIN32)
|
||||||
|
SET(draco_LIBRARIES "draco")
|
||||||
|
ELSE()
|
||||||
|
IF(ASSIMP_BUILD_DRACO_STATIC)
|
||||||
|
SET(draco_LIBRARIES "draco_static")
|
||||||
|
ELSE()
|
||||||
|
SET(draco_LIBRARIES "draco_shared")
|
||||||
|
ENDIF()
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
# Don't build the draco command-line tools by default
|
||||||
|
set_target_properties(draco_encoder draco_decoder PROPERTIES
|
||||||
|
EXCLUDE_FROM_ALL TRUE
|
||||||
|
EXCLUDE_FROM_DEFAULT_BUILD TRUE
|
||||||
|
)
|
||||||
|
|
||||||
|
# Do build the draco shared library
|
||||||
|
set_target_properties(${draco_LIBRARIES} PROPERTIES
|
||||||
|
EXCLUDE_FROM_ALL FALSE
|
||||||
|
EXCLUDE_FROM_DEFAULT_BUILD FALSE
|
||||||
|
)
|
||||||
|
|
||||||
|
TARGET_USE_COMMON_OUTPUT_DIRECTORY(${draco_LIBRARIES})
|
||||||
|
TARGET_USE_COMMON_OUTPUT_DIRECTORY(draco_encoder)
|
||||||
|
TARGET_USE_COMMON_OUTPUT_DIRECTORY(draco_decoder)
|
||||||
|
|
||||||
|
SET(draco_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/contrib/draco/src")
|
||||||
|
|
||||||
|
# This is probably wrong
|
||||||
|
IF (ASSIMP_INSTALL)
|
||||||
|
INSTALL( TARGETS ${draco_LIBRARIES}
|
||||||
|
EXPORT "${TARGETS_EXPORT_NAME}"
|
||||||
|
LIBRARY DESTINATION ${ASSIMP_LIB_INSTALL_DIR}
|
||||||
|
ARCHIVE DESTINATION ${ASSIMP_LIB_INSTALL_DIR}
|
||||||
|
RUNTIME DESTINATION ${ASSIMP_BIN_INSTALL_DIR}
|
||||||
|
FRAMEWORK DESTINATION ${ASSIMP_LIB_INSTALL_DIR}
|
||||||
|
COMPONENT ${LIBASSIMP_COMPONENT}
|
||||||
|
INCLUDES DESTINATION include
|
||||||
|
)
|
||||||
|
ENDIF()
|
||||||
|
ENDIF()
|
||||||
|
ENDIF()
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
# Main assimp code
|
||||||
|
ADD_SUBDIRECTORY( code/ )
|
||||||
|
|
||||||
|
IF ( ASSIMP_BUILD_ASSIMP_TOOLS )
|
||||||
|
# The viewer for windows only
|
||||||
|
IF (WIN32)
|
||||||
|
FIND_PACKAGE(DirectX)
|
||||||
|
OPTION ( ASSIMP_BUILD_ASSIMP_VIEW "If the Assimp view tool is built. (requires DirectX)" ${DirectX_FOUND} )
|
||||||
|
IF ( ASSIMP_BUILD_ASSIMP_VIEW )
|
||||||
|
ADD_SUBDIRECTORY( tools/assimp_view/ )
|
||||||
|
ENDIF ()
|
||||||
|
ELSE()
|
||||||
|
MESSAGE("Building Assimp Viewer only supported on Windows.")
|
||||||
|
ENDIF ()
|
||||||
|
# The command line tool
|
||||||
|
ADD_SUBDIRECTORY( tools/assimp_cmd/ )
|
||||||
|
ENDIF ()
|
||||||
|
|
||||||
|
IF ( ASSIMP_BUILD_SAMPLES )
|
||||||
|
SET( SAMPLES_DIR ${CMAKE_CURRENT_SOURCE_DIR}/samples )
|
||||||
|
SET( SAMPLES_SHARED_CODE_DIR ${SAMPLES_DIR}/SharedCode )
|
||||||
|
IF ( WIN32 )
|
||||||
|
ADD_SUBDIRECTORY( samples/SimpleTexturedOpenGL/ )
|
||||||
|
ADD_SUBDIRECTORY( samples/SimpleTexturedDirectx11 )
|
||||||
|
ENDIF ()
|
||||||
|
ADD_SUBDIRECTORY( samples/SimpleOpenGL/ )
|
||||||
|
ENDIF ()
|
||||||
|
|
||||||
|
IF ( ASSIMP_BUILD_TESTS )
|
||||||
|
ADD_SUBDIRECTORY( test/ )
|
||||||
|
ENDIF ()
|
||||||
|
|
||||||
|
# Generate a pkg-config .pc, revision.h, and config.h for the Assimp library.
|
||||||
|
CONFIGURE_FILE( "${PROJECT_SOURCE_DIR}/assimp.pc.in" "${PROJECT_BINARY_DIR}/assimp.pc" @ONLY )
|
||||||
|
IF ( ASSIMP_INSTALL )
|
||||||
|
INSTALL( FILES "${PROJECT_BINARY_DIR}/assimp.pc" DESTINATION ${ASSIMP_LIB_INSTALL_DIR}/pkgconfig/ COMPONENT ${LIBASSIMP-DEV_COMPONENT})
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
CONFIGURE_FILE(
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}/include/assimp/revision.h.in
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/include/assimp/revision.h
|
||||||
|
)
|
||||||
|
|
||||||
|
CONFIGURE_FILE(
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}/include/assimp/config.h.in
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/include/assimp/config.h
|
||||||
|
)
|
||||||
|
|
||||||
|
IF ( ASSIMP_INSTALL )
|
||||||
|
IF(CMAKE_CPACK_COMMAND AND UNIX AND ASSIMP_OPT_BUILD_PACKAGES)
|
||||||
|
# Packing information
|
||||||
|
SET(CPACK_PACKAGE_NAME "assimp{ASSIMP_VERSION_MAJOR}.{ASSIMP_VERSION_MINOR}")
|
||||||
|
SET(CPACK_PACKAGE_CONTACT "" CACHE STRING "Package maintainer and PGP signer.")
|
||||||
|
SET(CPACK_PACKAGE_VENDOR "https://github.com/assimp")
|
||||||
|
SET(CPACK_PACKAGE_DISPLAY_NAME "Assimp ${ASSIMP_VERSION}")
|
||||||
|
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY " - Open Asset Import Library ${ASSIMP_VERSION}")
|
||||||
|
SET(CPACK_PACKAGE_VERSION "${ASSIMP_VERSION}.${ASSIMP_PACKAGE_VERSION}" )
|
||||||
|
SET(CPACK_PACKAGE_VERSION_MAJOR "${ASSIMP_VERSION_MAJOR}")
|
||||||
|
SET(CPACK_PACKAGE_VERSION_MINOR "${ASSIMP_VERSION_MINOR}")
|
||||||
|
SET(CPACK_PACKAGE_VERSION_PATCH "${ASSIMP_VERSION_PATCH}")
|
||||||
|
SET(CPACK_PACKAGE_INSTALL_DIRECTORY "assimp${ASSIMP_VERSION_MAJOR}.${ASSIMP_VERSION_MINOR}")
|
||||||
|
SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")
|
||||||
|
|
||||||
|
STRING(TOUPPER ${LIBASSIMP_COMPONENT} "LIBASSIMP_COMPONENT_UPPER")
|
||||||
|
STRING(TOUPPER ${LIBASSIMP-DEV_COMPONENT} "LIBASSIMP-DEV_COMPONENT_UPPER")
|
||||||
|
|
||||||
|
SET(CPACK_COMPONENT_ASSIMP-BIN_DISPLAY_NAME "tools")
|
||||||
|
SET(CPACK_COMPONENT_ASSIMP-BIN_DEPENDS "${LIBASSIMP_COMPONENT}" )
|
||||||
|
SET(CPACK_COMPONENT_${LIBASSIMP_COMPONENT_UPPER}_DISPLAY_NAME "libraries")
|
||||||
|
SET(CPACK_COMPONENT_${LIBASSIMP-DEV_COMPONENT_UPPER}_DISPLAY_NAME "common headers and installs")
|
||||||
|
SET(CPACK_COMPONENT_${LIBASSIMP-DEV_COMPONENT_UPPER}_DEPENDS $ "{LIBASSIMP_COMPONENT}" )
|
||||||
|
SET(CPACK_COMPONENT_ASSIMP-DEV_DISPLAY_NAME "${CPACK_COMPONENT_${LIBASSIMP-DEV_COMPONENT}_DISPLAY_NAME}" )
|
||||||
|
SET(CPACK_COMPONENT_ASSIMP-DEV_DEPENDS "${LIBASSIMP-DEV_COMPONENT}" )
|
||||||
|
SET(CPACK_DEBIAN_BUILD_DEPENDS debhelper cmake zlib1g-dev pkg-config)
|
||||||
|
|
||||||
|
# debian
|
||||||
|
SET(CPACK_DEBIAN_PACKAGE_PRIORITY "optional")
|
||||||
|
SET(CPACK_DEBIAN_CMAKE_OPTIONS "-DBUILD_ASSIMP_SAMPLES:BOOL=${ASSIMP_BUILD_SAMPLES}")
|
||||||
|
SET(CPACK_DEBIAN_PACKAGE_SECTION "libs" )
|
||||||
|
SET(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_COMPONENTS_ALL}")
|
||||||
|
SET(CPACK_DEBIAN_PACKAGE_SUGGESTS)
|
||||||
|
SET(CPACK_DEBIAN_PACKAGE_NAME "assimp")
|
||||||
|
SET(CPACK_DEBIAN_PACKAGE_REMOVE_SOURCE_FILES contrib/gtest contrib/zlib workspaces test doc obj samples packaging)
|
||||||
|
SET(CPACK_DEBIAN_PACKAGE_SOURCE_COPY svn export --force)
|
||||||
|
SET(CPACK_DEBIAN_CHANGELOG)
|
||||||
|
execute_process(COMMAND lsb_release -is
|
||||||
|
OUTPUT_VARIABLE _lsb_distribution OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
|
RESULT_VARIABLE _lsb_release_failed)
|
||||||
|
SET(CPACK_DEBIAN_DISTRIBUTION_NAME ${_lsb_distribution} CACHE STRING "Name of the distrubiton")
|
||||||
|
STRING(TOLOWER ${CPACK_DEBIAN_DISTRIBUTION_NAME} CPACK_DEBIAN_DISTRIBUTION_NAME)
|
||||||
|
IF( ${CPACK_DEBIAN_DISTRIBUTION_NAME} STREQUAL "ubuntu" )
|
||||||
|
SET(CPACK_DEBIAN_DISTRIBUTION_RELEASES lucid maverick natty oneiric precise CACHE STRING "Release code-names of the distrubiton release")
|
||||||
|
ENDIF()
|
||||||
|
SET(DPUT_HOST "" CACHE STRING "PPA repository to upload the debian sources")
|
||||||
|
INCLUDE(CPack)
|
||||||
|
INCLUDE(DebSourcePPA)
|
||||||
|
ENDIF()
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
if(WIN32)
|
||||||
|
if (CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||||
|
SET(BIN_DIR "${PROJECT_SOURCE_DIR}/bin64/")
|
||||||
|
SET(LIB_DIR "${PROJECT_SOURCE_DIR}/lib64/")
|
||||||
|
else()
|
||||||
|
SET(BIN_DIR "${PROJECT_SOURCE_DIR}/bin32/")
|
||||||
|
SET(LIB_DIR "${PROJECT_SOURCE_DIR}/lib32/")
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
IF(MSVC_TOOLSET_VERSION)
|
||||||
|
SET(MSVC_PREFIX "vc${MSVC_TOOLSET_VERSION}")
|
||||||
|
SET(ASSIMP_MSVC_VERSION ${MSVC_PREFIX})
|
||||||
|
ELSE()
|
||||||
|
IF(MSVC12)
|
||||||
|
SET(ASSIMP_MSVC_VERSION "vc120")
|
||||||
|
ELSEIF(MSVC14)
|
||||||
|
SET(ASSIMP_MSVC_VERSION "vc140")
|
||||||
|
ELSEIF(MSVC15)
|
||||||
|
SET(ASSIMP_MSVC_VERSION "vc141")
|
||||||
|
ELSEIF(MSV142)
|
||||||
|
SET(ASSIMP_MSVC_VERSION "vc142")
|
||||||
|
ELSEIF(MSVC143)
|
||||||
|
SET(ASSIMP_MSVC_VERSION "vc143")
|
||||||
|
ENDIF()
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
IF(MSVC12 OR MSVC14 OR MSVC15 )
|
||||||
|
ADD_CUSTOM_TARGET(UpdateAssimpLibsDebugSymbolsAndDLLs COMMENT "Copying Assimp Libraries ..." VERBATIM)
|
||||||
|
IF(CMAKE_GENERATOR MATCHES "^Visual Studio")
|
||||||
|
ADD_CUSTOM_COMMAND(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Release/assimp-${ASSIMP_MSVC_VERSION}-mt.dll ${BIN_DIR}assimp-${ASSIMP_MSVC_VERSION}-mt.dll VERBATIM)
|
||||||
|
ADD_CUSTOM_COMMAND(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Release/assimp-${ASSIMP_MSVC_VERSION}-mt.exp ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mt.exp VERBATIM)
|
||||||
|
ADD_CUSTOM_COMMAND(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Release/assimp-${ASSIMP_MSVC_VERSION}-mt.lib ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mt.lib VERBATIM)
|
||||||
|
ADD_CUSTOM_COMMAND(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Debug/assimp-${ASSIMP_MSVC_VERSION}-mtd.dll ${BIN_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.dll VERBATIM)
|
||||||
|
ADD_CUSTOM_COMMAND(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Debug/assimp-${ASSIMP_MSVC_VERSION}-mtd.exp ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.exp VERBATIM)
|
||||||
|
ADD_CUSTOM_COMMAND(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Debug/assimp-${ASSIMP_MSVC_VERSION}-mtd.ilk ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.ilk VERBATIM)
|
||||||
|
ADD_CUSTOM_COMMAND(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Debug/assimp-${ASSIMP_MSVC_VERSION}-mtd.lib ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.lib VERBATIM)
|
||||||
|
ADD_CUSTOM_COMMAND(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Debug/assimp-${ASSIMP_MSVC_VERSION}-mtd.pdb ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.pdb VERBATIM)
|
||||||
|
ELSE()
|
||||||
|
ADD_CUSTOM_COMMAND(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/assimp-${ASSIMP_MSVC_VERSION}-mt.dll ${BIN_DIR}assimp-${ASSIMP_MSVC_VERSION}-mt.dll VERBATIM)
|
||||||
|
ADD_CUSTOM_COMMAND(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/assimp-${ASSIMP_MSVC_VERSION}-mt.exp ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mt.exp VERBATIM)
|
||||||
|
ADD_CUSTOM_COMMAND(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/assimp-${ASSIMP_MSVC_VERSION}-mt.lib ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mt.lib VERBATIM)
|
||||||
|
ADD_CUSTOM_COMMAND(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/assimp-${ASSIMP_MSVC_VERSION}-mtd.dll ${BIN_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.dll VERBATIM)
|
||||||
|
ADD_CUSTOM_COMMAND(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/assimp-${ASSIMP_MSVC_VERSION}-mtd.exp ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.exp VERBATIM)
|
||||||
|
ADD_CUSTOM_COMMAND(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/assimp-${ASSIMP_MSVC_VERSION}-mtd.ilk ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.ilk VERBATIM)
|
||||||
|
ADD_CUSTOM_COMMAND(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/assimp-${ASSIMP_MSVC_VERSION}-mtd.lib ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.lib VERBATIM)
|
||||||
|
ADD_CUSTOM_COMMAND(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/assimp-${ASSIMP_MSVC_VERSION}-mtd.pdb ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.pdb VERBATIM)
|
||||||
|
ADD_CUSTOM_COMMAND(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/assimp-${ASSIMP_MSVC_VERSION}-mtd.pdb ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.pdb VERBATIM)
|
||||||
|
ENDIF()
|
||||||
|
ENDIF()
|
||||||
|
ENDIF ()
|
||||||
53
assimp/CMakePresets.json
Normal file
53
assimp/CMakePresets.json
Normal file
|
|
@ -0,0 +1,53 @@
|
||||||
|
{
|
||||||
|
"version": 3,
|
||||||
|
"cmakeMinimumRequired": {
|
||||||
|
"major": 3,
|
||||||
|
"minor": 20,
|
||||||
|
"patch": 0
|
||||||
|
},
|
||||||
|
"configurePresets": [
|
||||||
|
{
|
||||||
|
"name": "assimp",
|
||||||
|
"binaryDir": "${sourceDir}",
|
||||||
|
"cacheVariables": {
|
||||||
|
"CMAKE_BUILD_TYPE": "Release",
|
||||||
|
"ASSIMP_BUILD_ASSIMP_TOOLS": "OFF"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "assimp_static",
|
||||||
|
"binaryDir": "${sourceDir}",
|
||||||
|
"cacheVariables": {
|
||||||
|
"CMAKE_BUILD_TYPE": "Release",
|
||||||
|
"BUILD_SHARED_LIBS": "OFF",
|
||||||
|
"ASSIMP_BUILD_ASSIMP_TOOLS": "OFF",
|
||||||
|
"ASSIMP_DOUBLE_PRECISION": "ON"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "assimp_double_precision",
|
||||||
|
"binaryDir": "${sourceDir}",
|
||||||
|
"cacheVariables": {
|
||||||
|
"CMAKE_BUILD_TYPE": "Release",
|
||||||
|
"ASSIMP_BUILD_ASSIMP_TOOLS": "OFF",
|
||||||
|
"ASSIMP_DOUBLE_PRECISION": "ON"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "assimp_with_tools",
|
||||||
|
"binaryDir": "${sourceDir}",
|
||||||
|
"cacheVariables": {
|
||||||
|
"ASSIMP_BUILD_ASSIMP_TOOLS": "ON"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "assimp_all",
|
||||||
|
"binaryDir": "${sourceDir}",
|
||||||
|
"cacheVariables": {
|
||||||
|
"ASSIMP_BUILD_ASSIMP_TOOLS": "ON",
|
||||||
|
"ASSIMP_BUILD_SAMPLES": "ON",
|
||||||
|
"ASSIMP_BUILD_DOCS": "ON"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
128
assimp/CODE_OF_CONDUCT.md
Normal file
128
assimp/CODE_OF_CONDUCT.md
Normal file
|
|
@ -0,0 +1,128 @@
|
||||||
|
# Contributor Covenant Code of Conduct
|
||||||
|
|
||||||
|
## Our Pledge
|
||||||
|
|
||||||
|
We as members, contributors, and leaders pledge to make participation in our
|
||||||
|
community a harassment-free experience for everyone, regardless of age, body
|
||||||
|
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
||||||
|
identity and expression, level of experience, education, socio-economic status,
|
||||||
|
nationality, personal appearance, race, religion, or sexual identity
|
||||||
|
and orientation.
|
||||||
|
|
||||||
|
We pledge to act and interact in ways that contribute to an open, welcoming,
|
||||||
|
diverse, inclusive, and healthy community.
|
||||||
|
|
||||||
|
## Our Standards
|
||||||
|
|
||||||
|
Examples of behavior that contributes to a positive environment for our
|
||||||
|
community include:
|
||||||
|
|
||||||
|
* Demonstrating empathy and kindness toward other people
|
||||||
|
* Being respectful of differing opinions, viewpoints, and experiences
|
||||||
|
* Giving and gracefully accepting constructive feedback
|
||||||
|
* Accepting responsibility and apologizing to those affected by our mistakes,
|
||||||
|
and learning from the experience
|
||||||
|
* Focusing on what is best not just for us as individuals, but for the
|
||||||
|
overall community
|
||||||
|
|
||||||
|
Examples of unacceptable behavior include:
|
||||||
|
|
||||||
|
* The use of sexualized language or imagery, and sexual attention or
|
||||||
|
advances of any kind
|
||||||
|
* Trolling, insulting or derogatory comments, and personal or political attacks
|
||||||
|
* Public or private harassment
|
||||||
|
* Publishing others' private information, such as a physical or email
|
||||||
|
address, without their explicit permission
|
||||||
|
* Other conduct which could reasonably be considered inappropriate in a
|
||||||
|
professional setting
|
||||||
|
|
||||||
|
## Enforcement Responsibilities
|
||||||
|
|
||||||
|
Community leaders are responsible for clarifying and enforcing our standards of
|
||||||
|
acceptable behavior and will take appropriate and fair corrective action in
|
||||||
|
response to any behavior that they deem inappropriate, threatening, offensive,
|
||||||
|
or harmful.
|
||||||
|
|
||||||
|
Community leaders have the right and responsibility to remove, edit, or reject
|
||||||
|
comments, commits, code, wiki edits, issues, and other contributions that are
|
||||||
|
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
||||||
|
decisions when appropriate.
|
||||||
|
|
||||||
|
## Scope
|
||||||
|
|
||||||
|
This Code of Conduct applies within all community spaces, and also applies when
|
||||||
|
an individual is officially representing the community in public spaces.
|
||||||
|
Examples of representing our community include using an official e-mail address,
|
||||||
|
posting via an official social media account, or acting as an appointed
|
||||||
|
representative at an online or offline event.
|
||||||
|
|
||||||
|
## Enforcement
|
||||||
|
|
||||||
|
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||||
|
reported to the community leaders responsible for enforcement at
|
||||||
|
.
|
||||||
|
All complaints will be reviewed and investigated promptly and fairly.
|
||||||
|
|
||||||
|
All community leaders are obligated to respect the privacy and security of the
|
||||||
|
reporter of any incident.
|
||||||
|
|
||||||
|
## Enforcement Guidelines
|
||||||
|
|
||||||
|
Community leaders will follow these Community Impact Guidelines in determining
|
||||||
|
the consequences for any action they deem in violation of this Code of Conduct:
|
||||||
|
|
||||||
|
### 1. Correction
|
||||||
|
|
||||||
|
**Community Impact**: Use of inappropriate language or other behavior deemed
|
||||||
|
unprofessional or unwelcome in the community.
|
||||||
|
|
||||||
|
**Consequence**: A private, written warning from community leaders, providing
|
||||||
|
clarity around the nature of the violation and an explanation of why the
|
||||||
|
behavior was inappropriate. A public apology may be requested.
|
||||||
|
|
||||||
|
### 2. Warning
|
||||||
|
|
||||||
|
**Community Impact**: A violation through a single incident or series
|
||||||
|
of actions.
|
||||||
|
|
||||||
|
**Consequence**: A warning with consequences for continued behavior. No
|
||||||
|
interaction with the people involved, including unsolicited interaction with
|
||||||
|
those enforcing the Code of Conduct, for a specified period of time. This
|
||||||
|
includes avoiding interactions in community spaces as well as external channels
|
||||||
|
like social media. Violating these terms may lead to a temporary or
|
||||||
|
permanent ban.
|
||||||
|
|
||||||
|
### 3. Temporary Ban
|
||||||
|
|
||||||
|
**Community Impact**: A serious violation of community standards, including
|
||||||
|
sustained inappropriate behavior.
|
||||||
|
|
||||||
|
**Consequence**: A temporary ban from any sort of interaction or public
|
||||||
|
communication with the community for a specified period of time. No public or
|
||||||
|
private interaction with the people involved, including unsolicited interaction
|
||||||
|
with those enforcing the Code of Conduct, is allowed during this period.
|
||||||
|
Violating these terms may lead to a permanent ban.
|
||||||
|
|
||||||
|
### 4. Permanent Ban
|
||||||
|
|
||||||
|
**Community Impact**: Demonstrating a pattern of violation of community
|
||||||
|
standards, including sustained inappropriate behavior, harassment of an
|
||||||
|
individual, or aggression toward or disparagement of classes of individuals.
|
||||||
|
|
||||||
|
**Consequence**: A permanent ban from any sort of public interaction within
|
||||||
|
the community.
|
||||||
|
|
||||||
|
## Attribution
|
||||||
|
|
||||||
|
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
||||||
|
version 2.0, available at
|
||||||
|
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
|
||||||
|
|
||||||
|
Community Impact Guidelines were inspired by [Mozilla's code of conduct
|
||||||
|
enforcement ladder](https://github.com/mozilla/diversity).
|
||||||
|
|
||||||
|
[homepage]: https://www.contributor-covenant.org
|
||||||
|
|
||||||
|
For answers to common questions about this code of conduct, see the FAQ at
|
||||||
|
https://www.contributor-covenant.org/faq. Translations are available at
|
||||||
|
https://www.contributor-covenant.org/translations.
|
||||||
10
assimp/CONTRIBUTING.md
Normal file
10
assimp/CONTRIBUTING.md
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
# How to contribute
|
||||||
|
|
||||||
|
If you want to contribute, follow these steps:
|
||||||
|
|
||||||
|
- First, create your own clone of assimp.
|
||||||
|
- When you want to fix a bug or add a new feature, create a branch on your own fork following [these instructions](https://help.github.com/articles/creating-a-pull-request-from-a-fork/).
|
||||||
|
- Push it to your fork of the repository and open a pull request.
|
||||||
|
- A pull request will start our continuous integration service, which checks if the build works for Linux and Windows.
|
||||||
|
It will check for memory leaks, compiler warnings and memory alignment issues. If any of these tests fail, fix it and the tests will be restarted automatically.
|
||||||
|
- At the end, we will perform a code review and merge your branch to the master branch.
|
||||||
183
assimp/CREDITS
Normal file
183
assimp/CREDITS
Normal file
|
|
@ -0,0 +1,183 @@
|
||||||
|
===============================================================
|
||||||
|
Open Asset Import Library (Assimp)
|
||||||
|
Developers and Contributors
|
||||||
|
===============================================================
|
||||||
|
|
||||||
|
The following is a non-exhaustive list of all constributors over the years.
|
||||||
|
If you think your name should be listed here, drop us a line and we'll add you.
|
||||||
|
|
||||||
|
- Alexander Gessler,
|
||||||
|
3DS-, BLEND-, ASE-, DXF-, HMP-, MDL-, MD2-, MD3-, MD5-, MDC-, NFF-, PLY-, STL-, RAW-, OFF-, MS3D-, Q3D- and LWO-Loader, Assimp-Viewer, assimp-cmd, -noboost, Website (Design).
|
||||||
|
|
||||||
|
- Thomas Schulze,
|
||||||
|
X-, Collada-, BVH-Loader, Postprocessing framework. Data structure & Interface design, documentation.
|
||||||
|
|
||||||
|
- Kim Kulling,
|
||||||
|
Obj-, Q3BSD-, OpenGEX-Loader, Logging system, CMake-build-environment, Linux-build, Website ( Admin ), Coverity ( Admin ), Glitter ( Admin ).
|
||||||
|
|
||||||
|
- R.Schmidt,
|
||||||
|
Linux build, eclipse support.
|
||||||
|
|
||||||
|
- Matthias Gubisch,
|
||||||
|
Assimp.net
|
||||||
|
Visual Studio 9 support, bugfixes.
|
||||||
|
|
||||||
|
- Mark Sibly
|
||||||
|
B3D-Loader, Assimp testing
|
||||||
|
|
||||||
|
- Jonathan Klein
|
||||||
|
Ogre Loader, VC2010 fixes and CMake fixes.
|
||||||
|
|
||||||
|
- Sebastian Hempel,
|
||||||
|
PyAssimp (first version)
|
||||||
|
Compile-Bugfixes for mingw, add environment for static library support in make.
|
||||||
|
|
||||||
|
- Jonathan Pokrass
|
||||||
|
Supplied a bugfix concerning the scaling in the md3 loader.
|
||||||
|
|
||||||
|
- Andrew Galante,
|
||||||
|
Submitted patches to make Assimp compile with GCC-4, a makefile and the xcode3 workspace.
|
||||||
|
|
||||||
|
- Andreas Nagel
|
||||||
|
First Assimp testing & verification under Windows Vista 64 Bit.
|
||||||
|
|
||||||
|
- Marius Schr<68>der
|
||||||
|
Allowed us to use many of his models for screenshots and testing.
|
||||||
|
|
||||||
|
- Christian Schubert
|
||||||
|
Supplied various XFiles for testing purposes.
|
||||||
|
|
||||||
|
- Tizian Wieland
|
||||||
|
Searched the web for hundreds of test models for internal use
|
||||||
|
|
||||||
|
- John Connors
|
||||||
|
Supplied patches for linux and SCons.
|
||||||
|
|
||||||
|
- T. R.
|
||||||
|
The GUY who performed some of the CSM mocaps.
|
||||||
|
|
||||||
|
- Andy Maloney
|
||||||
|
Contributed fixes for the documentation and the doxygen markup
|
||||||
|
|
||||||
|
- Zhao Lei
|
||||||
|
Contributed several bugfixes fixing memory leaks and improving float parsing
|
||||||
|
|
||||||
|
- sueastside
|
||||||
|
Updated PyAssimp to the latest Assimp data structures and provided a script to keep the Python binding up-to-date.
|
||||||
|
|
||||||
|
- Tobias Rittig
|
||||||
|
Collada testing with Cinema 4D
|
||||||
|
|
||||||
|
- Brad Grantham
|
||||||
|
Improvements in OpenGL-Sample.
|
||||||
|
|
||||||
|
- Robert Ramirez
|
||||||
|
Add group loading feature to Obj-Loader.
|
||||||
|
|
||||||
|
- Chris Maiwald
|
||||||
|
Many bugreports, improving Assimp's portability, regular testing & feedback.
|
||||||
|
|
||||||
|
- Stepan Hrbek
|
||||||
|
Bugreport and fix for a obj-materialloader crash.
|
||||||
|
|
||||||
|
- David Nadlinger
|
||||||
|
D bindings, CMake install support.
|
||||||
|
|
||||||
|
- Dario Accornero
|
||||||
|
Contributed several patches regarding Mac OS/XCode targets, bug reports.
|
||||||
|
|
||||||
|
- Martin Walser (Samhayne)
|
||||||
|
Contributed the 'SimpleTexturedOpenGl' sample.
|
||||||
|
|
||||||
|
- Matthias Fauconneau
|
||||||
|
Contributed a fix for the Q3-BSP loader.
|
||||||
|
|
||||||
|
- Jørgen P. Tjernø
|
||||||
|
Contributed updated and improved xcode workspaces
|
||||||
|
|
||||||
|
- drparallax
|
||||||
|
Contributed the /samples/SimpleAssimpViewX sample
|
||||||
|
|
||||||
|
- Carsten Fuchs
|
||||||
|
Contributed a fix for the Normalize method in aiQuaternion.
|
||||||
|
|
||||||
|
- dbburgess
|
||||||
|
Contributes a Android-specific build issue: log the hardware architecture for ARM.
|
||||||
|
|
||||||
|
- alfiereinre7
|
||||||
|
Contributes a obj-fileparser fix: missing tokens in the obj-token list.
|
||||||
|
|
||||||
|
- Roman Kharitonov
|
||||||
|
Contributes a fix for the configure script environment.
|
||||||
|
|
||||||
|
- Ed Diana
|
||||||
|
Contributed AssimpDelphi (/port/AssimpDelphi).
|
||||||
|
|
||||||
|
- rdb
|
||||||
|
Contributes a bundle of fixes and improvements for the bsp-importer.
|
||||||
|
|
||||||
|
- Mick P
|
||||||
|
For contributing the De-bone postprocessing step and filing various bug reports.
|
||||||
|
|
||||||
|
- Rosen Diankov
|
||||||
|
Contributed patches to build assimp debian packages using cmake.
|
||||||
|
|
||||||
|
- Mark Page
|
||||||
|
Contributed a patch to fix the VertexTriangleAdjacency postprocessing step.
|
||||||
|
|
||||||
|
- IOhannes
|
||||||
|
Contributed the Debian build fixes ( architecture macro ).
|
||||||
|
|
||||||
|
- gellule
|
||||||
|
Several LWO and LWS fixes (pivoting).
|
||||||
|
|
||||||
|
- Marcel Metz
|
||||||
|
GCC/Linux fixes for the SimpleOpenGL sample.
|
||||||
|
|
||||||
|
- Brian Miller
|
||||||
|
Bugfix for a compiler fix for iOS on arm.
|
||||||
|
|
||||||
|
- Séverin Lemaignan
|
||||||
|
Rewrite of PyAssimp, distutils and Python3 support
|
||||||
|
|
||||||
|
- albert-wang
|
||||||
|
Bugfixes for the collada parser
|
||||||
|
|
||||||
|
- Ya ping Jin
|
||||||
|
Bugfixes for uv-tanget calculation.
|
||||||
|
|
||||||
|
- Jonne Nauha
|
||||||
|
Ogre Binary format support
|
||||||
|
|
||||||
|
- Filip Wasil, Tieto Poland Sp. z o.o.
|
||||||
|
Android JNI asset extraction support
|
||||||
|
|
||||||
|
- Richard Steffen
|
||||||
|
Contributed ExportProperties interface
|
||||||
|
Contributed X File exporter
|
||||||
|
Contributed Step (stp) exporter
|
||||||
|
|
||||||
|
- Thomas Iorns (mesilliac)
|
||||||
|
Initial FBX Export support
|
||||||
|
|
||||||
|
For a more detailed list just check: https://github.com/assimp/assimp/network/members
|
||||||
|
|
||||||
|
|
||||||
|
========
|
||||||
|
Patreons
|
||||||
|
========
|
||||||
|
|
||||||
|
Huge thanks to our Patreons!
|
||||||
|
|
||||||
|
- migenius
|
||||||
|
- Marcus
|
||||||
|
- Cort
|
||||||
|
- elect
|
||||||
|
- Steffen
|
||||||
|
|
||||||
|
|
||||||
|
===================
|
||||||
|
Commercial Sponsors
|
||||||
|
===================
|
||||||
|
|
||||||
|
- MyDidimo (mydidimo.com): Sponsored development of FBX Export support
|
||||||
12
assimp/CodeConventions.md
Normal file
12
assimp/CodeConventions.md
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
|
||||||
|
Open Asset Import Library Coding Conventions
|
||||||
|
==
|
||||||
|
|
||||||
|
If you want to participate as a developer in the **Open Asset Import Library** please read and respect the following coding conventions. This will ensure consistency throughout the codebase and help all the Open Asset Import Library users.
|
||||||
|
|
||||||
|
Spacing
|
||||||
|
==
|
||||||
|
|
||||||
|
* Use UNIX-style line endings (LF)
|
||||||
|
* Remove any trailing whitespace
|
||||||
|
* Expand tabs to 4 spaces
|
||||||
17
assimp/Dockerfile
Normal file
17
assimp/Dockerfile
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
FROM gcc:1.5.1.0
|
||||||
|
|
||||||
|
RUN apt-get update \
|
||||||
|
apt-get install --no-install-recommends -y ninja-build cmake zlib1g-dev
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
RUN mkdir build && cd build && \
|
||||||
|
cmake -G 'Ninja' \
|
||||||
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
|
-DASSIMP_BUILD_ASSIMP_TOOLS=ON \
|
||||||
|
.. && \
|
||||||
|
ninja -j4 && ninja install
|
||||||
|
|
||||||
|
CMD ["/app/build/bin/unit"]
|
||||||
17
assimp/INSTALL
Normal file
17
assimp/INSTALL
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
|
||||||
|
========================================================================
|
||||||
|
Open Asset Import Library (assimp) INSTALL
|
||||||
|
========================================================================
|
||||||
|
|
||||||
|
------------------------------
|
||||||
|
Getting the documentation
|
||||||
|
------------------------------
|
||||||
|
|
||||||
|
A regularly-updated copy is available at
|
||||||
|
https://assimp-docs.readthedocs.io/en/latest/
|
||||||
|
|
||||||
|
------------------------------
|
||||||
|
Building Assimp
|
||||||
|
------------------------------
|
||||||
|
|
||||||
|
Just check the build-instructions which you can find here: https://github.com/assimp/assimp/blob/master/Build.md
|
||||||
78
assimp/LICENSE
Normal file
78
assimp/LICENSE
Normal file
|
|
@ -0,0 +1,78 @@
|
||||||
|
Open Asset Import Library (assimp)
|
||||||
|
|
||||||
|
Copyright (c) 2006-2026, assimp team
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use of this software in source and binary forms,
|
||||||
|
with or without modification, are permitted provided that the
|
||||||
|
following conditions are met:
|
||||||
|
|
||||||
|
* Redistributions of source code must retain the above
|
||||||
|
copyright notice, this list of conditions and the
|
||||||
|
following disclaimer.
|
||||||
|
|
||||||
|
* Redistributions in binary form must reproduce the above
|
||||||
|
copyright notice, this list of conditions and the
|
||||||
|
following disclaimer in the documentation and/or other
|
||||||
|
materials provided with the distribution.
|
||||||
|
|
||||||
|
* Neither the name of the assimp team, nor the names of its
|
||||||
|
contributors may be used to endorse or promote products
|
||||||
|
derived from this software without specific prior
|
||||||
|
written permission of the assimp team.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||||
|
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||||
|
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||||
|
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||||
|
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||||
|
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
******************************************************************************
|
||||||
|
|
||||||
|
AN EXCEPTION applies to all files in the ./test/models-nonbsd folder.
|
||||||
|
These are 3d models for testing purposes, from various free sources
|
||||||
|
on the internet. They are - unless otherwise stated - copyright of
|
||||||
|
their respective creators, which may impose additional requirements
|
||||||
|
on the use of their work. For any of these models, see
|
||||||
|
<model-name>.source.txt for more legal information. Contact us if you
|
||||||
|
are a copyright holder and believe that we credited you inproperly or
|
||||||
|
if you don't want your files to appear in the repository.
|
||||||
|
|
||||||
|
|
||||||
|
******************************************************************************
|
||||||
|
|
||||||
|
Poly2Tri Copyright (c) 2009-2010, Poly2Tri Contributors
|
||||||
|
http://code.google.com/p/poly2tri/
|
||||||
|
|
||||||
|
All rights reserved.
|
||||||
|
Redistribution and use in source and binary forms, with or without modification,
|
||||||
|
are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
* Redistributions of source code must retain the above copyright notice,
|
||||||
|
this list of conditions and the following disclaimer.
|
||||||
|
* Redistributions in binary form must reproduce the above copyright notice,
|
||||||
|
this list of conditions and the following disclaimer in the documentation
|
||||||
|
and/or other materials provided with the distribution.
|
||||||
|
* Neither the name of Poly2Tri nor the names of its contributors may be
|
||||||
|
used to endorse or promote products derived from this software without specific
|
||||||
|
prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||||
|
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||||
|
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||||
|
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||||
|
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||||
|
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
|
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue