Skip to content
Snippets Groups Projects
Commit a949102d authored by Christian Strømme's avatar Christian Strømme Committed by Andy Nichols
Browse files

Re-add assimp


Assimp is now a submodule, and configure options have been added to make
it possible to select the supplied version, the system version, or non.

Change-Id: If9930c5e65d6e087fd918d61e6d367ca0fc3a4e0
Reviewed-by: default avatarAndy Nichols <andy.nichols@qt.io>
parent 14685e5e
No related branches found
No related tags found
No related merge requests found
[submodule "src/3rdparty/assimp/src"]
path = src/3rdparty/assimp/src
url = https://github.com/assimp/assimp.git
SOURCES += main.cpp
/****************************************************************************
**
** Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB).
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt3D module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3 as published by the Free Software
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include <assimp/cimport.h>
#include <assimp/scene.h>
#include <assimp/postprocess.h>
#include <assimp/Importer.hpp>
#include <assimp/DefaultLogger.hpp>
#include <assimp/anim.h>
int main(int , char **)
{
Assimp::Importer importer;
Assimp::DefaultLogger::create("AssimpLog.txt", Assimp::Logger::VERBOSE);
// SET THIS TO REMOVE POINTS AND LINES -> HAVE ONLY TRIANGLES
importer.SetPropertyInteger(AI_CONFIG_PP_SBP_REMOVE, aiPrimitiveType_LINE|aiPrimitiveType_POINT);
// Check for new version by setting animation morph channels.
aiAnimation anim;
anim.mNumMorphMeshChannels = 0;
return 0;
}
QtQuick3D options:
-assimp .............. Select used assimp library [system/qt/no]
{
"subconfigs": [
"src/plugins/assetimporters"
]
}
This diff is collapsed.
This diff is collapsed.
#ifndef ASSIMP_REVISION_H_INC
#define ASSIMP_REVISION_H_INC
#define GitVersion 0x9740c04
#define GitBranch "master"
//#define VER_MAJOR @ASSIMP_VERSION_MAJOR@
//#define VER_MINOR @ASSIMP_VERSION_MINOR@
//#define VER_PATCH @ASSIMP_VERSION_PATCH@
//#define VER_BUILD @ASSIMP_PACKAGE_VERSION@
//#define STR_HELP(x) #x
//#define STR(x) STR_HELP(x)
//#define VER_FILEVERSION VER_MAJOR,VER_MINOR,VER_PATCH,VER_BUILD
//#define VER_FILEVERSION_STR STR(VER_MAJOR) "." STR(VER_MINOR) "." STR(VER_PATCH) "." STR(VER_BUILD)
#define GitVersion 0x5c900d68
#define GitBranch "HEAD"
#endif // ASSIMP_REVISION_H_INC
Subproject commit 5c900d689a5db5637b98f665fc1e9e9c9ed416b9
......@@ -3,3 +3,6 @@ TEMPLATE = subdirs
SUBDIRS = \
uip
qtConfig(assimp):!integrity {
SUBDIRS += assimp
}
......@@ -6,7 +6,14 @@ PLUGIN_CLASS_NAME = AssimpImporterPlugin
load(qt_plugin)
include(../../../3rdparty/assimp/assimp.pri)
QT_FOR_CONFIG += assetimporters-private
include($$OUT_PWD/../qtassetimporters-config.pri)
qtConfig(system-assimp):!if(cross_compile:host_build) {
QMAKE_USE_PRIVATE += assimp
} else {
include(../../../3rdparty/assimp/assimp.pri)
}
OTHER_FILES += assimp.json
......
{
"module": "assetimporters",
"testDir": "../../../config.tests",
"commandline": {
"options": {
"assimp": { "type": "enum", "values": [ "no", "qt", "system" ] }
}
},
"libraries": {
"assimp": {
"label": "Assimp",
"test": "assimp",
"sources": [
{ "type": "pkgConfig", "args": "assimp >= 5.0.0" },
"-lassimp"
]
}
},
"features": {
"assimp": {
"label": "Assimp",
"output": [ "privateFeature", "feature" ]
},
"system-assimp": {
"label": "System Assimp",
"enable": "input.assimp == 'system'",
"disable": "input.assimp == 'qt'",
"condition": "features.assimp && libs.assimp",
"output": [ "privateFeature" ]
}
},
"report": [
],
"summary": [
{
"section": "QtQuick3D",
"entries": [
"assimp",
"system-assimp"
]
}
]
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment