Skip to content

Commit

Permalink
Moved some defines into the core, away from the public stuff.
Browse files Browse the repository at this point in the history
Fixed build error regarding zutil.c with vc9.
Updated VC9 project files (again ...)
Moved version getters to aiVersion.h.
Deleted redundant fast_atof.h from irrXML.
Added vc9 config for cppunit
Fixed a missing include when building against stlport

git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@307 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
  • Loading branch information
aramis_acg committed Jan 19, 2009
1 parent 561943e commit 3d5eae6
Show file tree
Hide file tree
Showing 26 changed files with 4,906 additions and 1,290 deletions.
53 changes: 37 additions & 16 deletions code/AssimpPCH.cpp
Original file line number Diff line number Diff line change
@@ -1,47 +1,68 @@



// This is a dummy unit - it is used to generate the precompiled header file.
// + it contains version management functions
// Actually just a dummyy, used by the compiler to build the precompiled header.

#include "AssimpPCH.h"
#include "./../include/aiVersion.h"

// ################################################################################
// Legal information string
// Note that this string must be contained in the compiled image.
// --------------------------------------------------------------------------------
// Legal information string - dont't remove from image!
static const char* LEGAL_INFORMATION =

"Open Asset Import Library (ASSIMP).\n"
"A free C/C++ library to import various 3D file formats into applications\n\n"

"(c) ASSIMP Development Team, 2008-2009\n"
"License: modified BSD license (http://assimp.sourceforge.net/main_license.html)\n"
"License: BSD\n"
"Website: http://assimp.sourceforge.net\n"
;
// ################################################################################

// ------------------------------------------------------------------------------------------------
ASSIMP_API const char* aiGetLegalString ()
{
// Get legal string
ASSIMP_API const char* aiGetLegalString () {
return LEGAL_INFORMATION;
}

// ------------------------------------------------------------------------------------------------
ASSIMP_API unsigned int aiGetVersionMinor ()
{
// Get Assimp minor version
ASSIMP_API unsigned int aiGetVersionMinor () {
return 5;
}

// ------------------------------------------------------------------------------------------------
ASSIMP_API unsigned int aiGetVersionMajor ()
{
// Get Assimp major version
ASSIMP_API unsigned int aiGetVersionMajor () {
return 0;
}

// ------------------------------------------------------------------------------------------------
// Get flags used for compilation
ASSIMP_API unsigned int aiGetCompileFlags () {

unsigned int flags = 0;

#ifdef ASSIMP_BUILD_BOOST_WORKAROUND
flags |= ASSIMP_CFLAGS_NOBOOST;
#endif
#ifdef ASSIMP_BUILD_SINGLETHREADED
flags |= ASSIMP_CFLAGS_SINGLETHREADED;
#endif
#ifdef ASSIMP_BUILD_DEBUG
flags |= ASSIMP_CFLAGS_DEBUG;
#endif
#ifdef ASSIMP_BUILD_DLL_EXPORT
flags |= ASSIMP_CFLAGS_SHARED;
#endif
#ifdef _STLPORT_VERSION
flags |= ASSIMP_CFLAGS_STLPORT;
#endif

return flags;
}

// ------------------------------------------------------------------------------------------------
ASSIMP_API unsigned int aiGetVersionRevision ()
{
// TODO: find a way to update the revision number automatically
return 254;
return 306;
}

42 changes: 34 additions & 8 deletions code/AssimpPCH.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,41 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Compile config
#include "../include/aiDefines.h"

// ===================================================================
// Undefine the min/max macros defined by some platform headers
#undef min
#undef max

// Concatenate two tokens after evaluating them
#define AI_CONCAT(a,b) a ## b

// Helper macro that sets a pointer to NULL in debug builds
#if (defined _DEBUG)
# define AI_DEBUG_INVALIDATE_PTR(x) x = NULL;
#else
# define AI_DEBUG_INVALIDATE_PTR(x)
#endif

// We depend heavily on the STL's performance, so we need to make sure
// that the M$ implementation isn't 'secure', but 'fast'
#if 0 // this crashes! what the fuck???
#if (defined _MSC_VER) && (!defined DEBUG)
# define _SECURE_SCL 0
# define _SCL_SECURE_NO_DEPRECATE
# define _HAS_ITERATOR_DEBUGGING 0
#endif
#endif

// If we have at least VC8 some C string manipulation functions
// are mapped to their safe _s counterparts (e.g. _itoa_s).
#if _MSC_VER >= 1400 && !(defined _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES)
# define _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES 1
#endif

// Actually that'snot required for MSVC (it is included somewhere in
// the STL ..) but it is necessary for build with STLport.
#include <ctype.h>

// Runtime/STL headers
// ===================================================================
#include <vector>
#include <list>
#include <map>
Expand All @@ -64,28 +96,22 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <numeric>
#include <new>

// ===================================================================
// Public ASSIMP headers
// ===================================================================
#include "../include/DefaultLogger.h"
#include "../include/IOStream.h"
#include "../include/IOSystem.h"
#include "../include/aiScene.h"
#include "../include/aiPostProcess.h"
#include "../include/assimp.hpp"

// ===================================================================
// Internal utility headers
// ===================================================================
#include "BaseImporter.h"
#include "MaterialSystem.h"
#include "StringComparison.h"
#include "StreamReader.h"
#include "qnan.h"

// ===================================================================
// boost headers - take them from the workaround dir if possible
// ===================================================================
#ifdef ASSIMP_BUILD_BOOST_WORKAROUND

# include "../include/BoostWorkaround/boost/scoped_ptr.hpp"
Expand Down
4 changes: 1 addition & 3 deletions code/SortByPTypeProcess.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

using namespace Assimp;



// ------------------------------------------------------------------------------------------------
// Constructor to be privately used by Importer
SortByPTypeProcess::SortByPTypeProcess()
Expand Down Expand Up @@ -84,7 +82,7 @@ void SortByPTypeProcess::SetupProperties(const Importer* pImp)
// Update changed meshes in all nodes
void UpdateNodes(const std::vector<unsigned int>& replaceMeshIndex, aiNode* node)
{
std::vector<unsigned int>::const_iterator it;
// std::vector<unsigned int>::const_iterator it;

if (node->mNumMeshes)
{
Expand Down
50 changes: 50 additions & 0 deletions contrib/cppunit-1.12.1/src/CppUnitLibrariesVC9.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@

Microsoft Visual Studio Solution File, Format Version 10.00
# Visual C++ Express 2008
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cppunit", "cppunit\cppunitvc9.vcproj", "{98E0A8E6-D7B0-4683-9DDC-7E24535A17E6}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug Static|Win32 = Debug Static|Win32
Debug Static|x64 = Debug Static|x64
Debug Unicode|Win32 = Debug Unicode|Win32
Debug Unicode|x64 = Debug Unicode|x64
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
Release Static|Win32 = Release Static|Win32
Release Static|x64 = Release Static|x64
Release Unicode|Win32 = Release Unicode|Win32
Release Unicode|x64 = Release Unicode|x64
Release|Win32 = Release|Win32
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{98E0A8E6-D7B0-4683-9DDC-7E24535A17E6}.Debug Static|Win32.ActiveCfg = Debug|Win32
{98E0A8E6-D7B0-4683-9DDC-7E24535A17E6}.Debug Static|Win32.Build.0 = Debug|Win32
{98E0A8E6-D7B0-4683-9DDC-7E24535A17E6}.Debug Static|x64.ActiveCfg = Debug|x64
{98E0A8E6-D7B0-4683-9DDC-7E24535A17E6}.Debug Static|x64.Build.0 = Debug|x64
{98E0A8E6-D7B0-4683-9DDC-7E24535A17E6}.Debug Unicode|Win32.ActiveCfg = Debug|Win32
{98E0A8E6-D7B0-4683-9DDC-7E24535A17E6}.Debug Unicode|Win32.Build.0 = Debug|Win32
{98E0A8E6-D7B0-4683-9DDC-7E24535A17E6}.Debug Unicode|x64.ActiveCfg = Debug|x64
{98E0A8E6-D7B0-4683-9DDC-7E24535A17E6}.Debug Unicode|x64.Build.0 = Debug|x64
{98E0A8E6-D7B0-4683-9DDC-7E24535A17E6}.Debug|Win32.ActiveCfg = Debug|Win32
{98E0A8E6-D7B0-4683-9DDC-7E24535A17E6}.Debug|Win32.Build.0 = Debug|Win32
{98E0A8E6-D7B0-4683-9DDC-7E24535A17E6}.Debug|x64.ActiveCfg = Debug|x64
{98E0A8E6-D7B0-4683-9DDC-7E24535A17E6}.Debug|x64.Build.0 = Debug|x64
{98E0A8E6-D7B0-4683-9DDC-7E24535A17E6}.Release Static|Win32.ActiveCfg = Release|Win32
{98E0A8E6-D7B0-4683-9DDC-7E24535A17E6}.Release Static|Win32.Build.0 = Release|Win32
{98E0A8E6-D7B0-4683-9DDC-7E24535A17E6}.Release Static|x64.ActiveCfg = Release|x64
{98E0A8E6-D7B0-4683-9DDC-7E24535A17E6}.Release Static|x64.Build.0 = Release|x64
{98E0A8E6-D7B0-4683-9DDC-7E24535A17E6}.Release Unicode|Win32.ActiveCfg = Release|Win32
{98E0A8E6-D7B0-4683-9DDC-7E24535A17E6}.Release Unicode|Win32.Build.0 = Release|Win32
{98E0A8E6-D7B0-4683-9DDC-7E24535A17E6}.Release Unicode|x64.ActiveCfg = Release|x64
{98E0A8E6-D7B0-4683-9DDC-7E24535A17E6}.Release Unicode|x64.Build.0 = Release|x64
{98E0A8E6-D7B0-4683-9DDC-7E24535A17E6}.Release|Win32.ActiveCfg = Release|Win32
{98E0A8E6-D7B0-4683-9DDC-7E24535A17E6}.Release|Win32.Build.0 = Release|Win32
{98E0A8E6-D7B0-4683-9DDC-7E24535A17E6}.Release|x64.ActiveCfg = Release|x64
{98E0A8E6-D7B0-4683-9DDC-7E24535A17E6}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
Loading

0 comments on commit 3d5eae6

Please sign in to comment.