Skip to content

Commit

Permalink
added sources of third party libraries.
Browse files Browse the repository at this point in the history
  • Loading branch information
dictoon committed Feb 11, 2014
1 parent 1f08e56 commit 1d503f4
Show file tree
Hide file tree
Showing 6,224 changed files with 2,907,560 additions and 0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
151 changes: 151 additions & 0 deletions 3rdparty/alembic/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@

#
# This source file is part of appleseed.
# Visit http://appleseedhq.net/ for additional information and resources.
#
# This software is released under the MIT license.
#
# Copyright (c) 2010-2013 Francois Beaune, Jupiter Jazz Limited
# Copyright (c) 2014 Francois Beaune, The appleseedhq Organization
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#


#--------------------------------------------------------------------------------------------------
# CMake configuration.
#--------------------------------------------------------------------------------------------------

cmake_minimum_required (VERSION 2.8 FATAL_ERROR)

cmake_policy (SET CMP0008 NEW) # libraries linked by full-path must have a valid library file name

project (alembic)


#--------------------------------------------------------------------------------------------------
# Platform-specific settings.
#--------------------------------------------------------------------------------------------------

# This must come after project () otherwise CMAKE_SYSTEM_NAME is undefined.
if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
set (WINDOWS TRUE)
include (../cmake/config/win-vs110.txt)
elseif (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
set (DARWIN TRUE)
include (../cmake/config/mac-gcc4.txt)
elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux")
set (LINUX TRUE)
include (../cmake/config/linux-gcc4.txt)
else ()
message (FATAL_ERROR "Unsupported platform or compiler (CMAKE_SYSTEM_NAME is \"${CMAKE_SYSTEM_NAME}\"). "
"Edit ${CMAKE_CURRENT_LIST_FILE} to add support for it.")
endif ()


#--------------------------------------------------------------------------------------------------
# Output directory.
#--------------------------------------------------------------------------------------------------

set (LIBRARY_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/../../build/${platform}/alembic)


#--------------------------------------------------------------------------------------------------
# Version information.
#--------------------------------------------------------------------------------------------------

set (PROJECT_VERSION_MAJOR 1)
set (PROJECT_VERSION_MINOR 0)
set (PROJECT_VERSION_PATCH 1)
set (PROJECT_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH})
set (VERSION ${PROJECT_VERSION})


#--------------------------------------------------------------------------------------------------
# Boost libraries.
#--------------------------------------------------------------------------------------------------

set (Boost_MULTITHREADED TRUE)
set (Boost_USE_STATIC_LIBS TRUE)

find_package (Boost 1.44 REQUIRED thread)

include_directories (${Boost_INCLUDE_DIRS})


#--------------------------------------------------------------------------------------------------
# Include paths.
#--------------------------------------------------------------------------------------------------

include_directories (
include
lib
../openexr/include/OpenEXR
../hdf5/hl/src
../hdf5/build # for H5pubconf.h (a generated file)
../hdf5/src
)


#--------------------------------------------------------------------------------------------------
# Preprocessor definitions.
#--------------------------------------------------------------------------------------------------

if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
add_definitions(
-DPLATFORM_WINDOWS -DPLATFORM=WINDOWS
)
elseif (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
add_definitions(
#-Wno-long-double # for osx versions before snow leopard
-DPLATFORM_DARWIN -DPLATFORM=DARWIN
)
elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux")
add_definitions(
-DPLATFORM_LINUX -DPLATFORM=LINUX
)
endif ()


#--------------------------------------------------------------------------------------------------
# Source files.
#--------------------------------------------------------------------------------------------------

macro (ak_common_append_files ret ext)
foreach (_dir ${ARGN})
file (GLOB _files "${_dir}/${ext}")
list (APPEND ${ret} ${_files})
endforeach ()
endmacro ()

ak_common_append_files (alembic_sources "*.cpp" lib/Alembic/Abc)
ak_common_append_files (alembic_sources "*.cpp" lib/Alembic/AbcCoreAbstract)
ak_common_append_files (alembic_sources "*.cpp" lib/Alembic/AbcCoreHDF5)
ak_common_append_files (alembic_sources "*.cpp" lib/Alembic/AbcGeom)
ak_common_append_files (alembic_sources "*.cpp" lib/Alembic/MD5Hash)
ak_common_append_files (alembic_sources "*.cpp" lib/Alembic/Util)


#--------------------------------------------------------------------------------------------------
# Target.
#--------------------------------------------------------------------------------------------------

add_library (alembic STATIC
${alembic_sources}
)
9 changes: 9 additions & 0 deletions 3rdparty/alembic/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

This is a minimum version of Alembic 0.9.3.

For technical reason, some of the getter methods are declared as non-constant
member methods, this breaks our exists reading function, in our minimum version,
all getter methods we are using have been modified to be constant.

We also use compiling flag "Werror" in release build, in this version of Alembic,
all unused variable and functions have been removed.
72 changes: 72 additions & 0 deletions 3rdparty/alembic/lib/Alembic/Abc/All.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
//-*****************************************************************************
//
// Copyright (c) 2009-2011,
// Sony Pictures Imageworks, Inc. and
// Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd.
//
// 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 Sony Pictures Imageworks, nor
// Industrial Light & Magic nor the names of their 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.
//
//-*****************************************************************************

#ifndef _Alembic_Abc_All_h_
#define _Alembic_Abc_All_h_

#include <Alembic/Abc/Base.h>
#include <Alembic/Abc/ErrorHandler.h>
#include <Alembic/Abc/Foundation.h>

#include <Alembic/Abc/ArchiveInfo.h>
#include <Alembic/Abc/Argument.h>
#include <Alembic/Abc/IArchive.h>
#include <Alembic/Abc/IArrayProperty.h>
#include <Alembic/Abc/IBaseProperty.h>
#include <Alembic/Abc/ICompoundProperty.h>
#include <Alembic/Abc/IObject.h>
#include <Alembic/Abc/ISampleSelector.h>
#include <Alembic/Abc/IScalarProperty.h>
#include <Alembic/Abc/ISchema.h>
#include <Alembic/Abc/ISchemaObject.h>
#include <Alembic/Abc/ITypedArrayProperty.h>
#include <Alembic/Abc/ITypedScalarProperty.h>

#include <Alembic/Abc/OArchive.h>
#include <Alembic/Abc/OArrayProperty.h>
#include <Alembic/Abc/OBaseProperty.h>
#include <Alembic/Abc/OCompoundProperty.h>
#include <Alembic/Abc/OObject.h>
#include <Alembic/Abc/OScalarProperty.h>
#include <Alembic/Abc/OSchema.h>
#include <Alembic/Abc/OSchemaObject.h>
#include <Alembic/Abc/OTypedArrayProperty.h>
#include <Alembic/Abc/OTypedScalarProperty.h>

#include <Alembic/Abc/TypedArraySample.h>
#include <Alembic/Abc/TypedPropertyTraits.h>

#endif
69 changes: 69 additions & 0 deletions 3rdparty/alembic/lib/Alembic/Abc/ArchiveInfo.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
//-*****************************************************************************
//
// Copyright (c) 2009-2011,
// Sony Pictures Imageworks Inc. and
// Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd.
//
// 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 Sony Pictures Imageworks, nor
// Industrial Light & Magic, nor the names of their 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.
//
//-*****************************************************************************

#include <Alembic/Abc/ArchiveInfo.h>

namespace Alembic {
namespace Abc {
namespace ALEMBIC_VERSION_NS {

//-*****************************************************************************
void
GetArchiveInfo(
IArchive & iArchive,
std::string & oApplicationWriter,
std::string & oAlembicVersion,
Util::uint32_t & oAlembicApiVersion,
std::string & oDateWritten,
std::string & oUserDescription )
{
if ( ! iArchive.getPtr() )
{
return;
}

AbcA::MetaData md = iArchive.getPtr()->getMetaData();
oApplicationWriter = md.get( kApplicationNameKey );
oAlembicVersion = md.get( "_ai_AlembicVersion" );
oAlembicApiVersion = iArchive.getArchiveVersion();

oDateWritten = md.get( kDateWrittenKey );
oUserDescription = md.get( kUserDescriptionKey );
}

} // End namespace ALEMBIC_VERSION_NS
} // End namespace Abc
} // End namespace Alembic
Loading

0 comments on commit 1d503f4

Please sign in to comment.