add win32-based make script.
parent
5eb7928ce8
commit
ce11aa51f5
|
@ -76,41 +76,36 @@ using namespace std;
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
// Default constructor
|
// Default constructor
|
||||||
ObjFileImporter::ObjFileImporter() :
|
ObjFileImporter::ObjFileImporter()
|
||||||
m_Buffer(),
|
: m_Buffer()
|
||||||
m_pRootObject( NULL ),
|
, m_pRootObject( nullptr )
|
||||||
m_strAbsPath( "" )
|
, m_strAbsPath( "" ) {
|
||||||
{
|
|
||||||
DefaultIOSystem io;
|
DefaultIOSystem io;
|
||||||
m_strAbsPath = io.getOsSeparator();
|
m_strAbsPath = io.getOsSeparator();
|
||||||
}
|
}
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
// Destructor.
|
// Destructor.
|
||||||
ObjFileImporter::~ObjFileImporter()
|
ObjFileImporter::~ObjFileImporter() {
|
||||||
{
|
|
||||||
delete m_pRootObject;
|
delete m_pRootObject;
|
||||||
m_pRootObject = NULL;
|
m_pRootObject = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
// Returns true, if file is an obj file.
|
// Returns true, if file is an obj file.
|
||||||
bool ObjFileImporter::CanRead( const std::string& pFile, IOSystem* pIOHandler , bool checkSig ) const
|
bool ObjFileImporter::CanRead( const std::string& pFile, IOSystem* pIOHandler , bool checkSig ) const {
|
||||||
{
|
if(!checkSig) {
|
||||||
if(!checkSig) //Check File Extension
|
//Check File Extension
|
||||||
{
|
|
||||||
return SimpleExtensionCheck(pFile,"obj");
|
return SimpleExtensionCheck(pFile,"obj");
|
||||||
}
|
} else {
|
||||||
else //Check file Header
|
// Check file Header
|
||||||
{
|
|
||||||
static const char *pTokens[] = { "mtllib", "usemtl", "v ", "vt ", "vn ", "o ", "g ", "s ", "f " };
|
static const char *pTokens[] = { "mtllib", "usemtl", "v ", "vt ", "vn ", "o ", "g ", "s ", "f " };
|
||||||
return BaseImporter::SearchFileHeaderForToken(pIOHandler, pFile, pTokens, 9 );
|
return BaseImporter::SearchFileHeaderForToken(pIOHandler, pFile, pTokens, 9 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
const aiImporterDesc* ObjFileImporter::GetInfo () const
|
const aiImporterDesc* ObjFileImporter::GetInfo () const {
|
||||||
{
|
|
||||||
return &desc;
|
return &desc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
rem @echo off
|
||||||
|
call build_env_win32.bat
|
||||||
|
|
||||||
|
set BUILD_CONFIG=release
|
||||||
|
set PLATFORM_CONFIG=x64
|
||||||
|
set MAX_CPU_CONFIG=4
|
||||||
|
|
||||||
|
set CONFIG_PARAMETER=/p:Configuration="%BUILD_CONFIG%"
|
||||||
|
set PLATFORM_PARAMETER=/p:Platform="%PLATFORM_CONFIG%"
|
||||||
|
set CPU_PARAMETER=/maxcpucount:%MAX_CPU_CONFIG%
|
||||||
|
set PLATFORM_TOOLSET=/p:PlatformToolset=%PLATFORM_VER%
|
||||||
|
|
||||||
|
pushd ..\..\
|
||||||
|
cmake CMakeLists.txt -G "Visual Studio 15 2017 Win64"
|
||||||
|
%MSBUILD% assimp.sln %CONFIG_PARAMETER% %PLATFORM_PARAMETER% %CPU_PARAMETER% %PLATFORM_TOOLSET%
|
||||||
|
popd
|
Loading…
Reference in New Issue