Skip to content

Commit

Permalink
Merge pull request AcademySoftwareFoundation#121 from openexr/develop
Browse files Browse the repository at this point in the history
v2.2.0 ready for release
  • Loading branch information
ehanway-ilm committed Aug 10, 2014
2 parents ecf35bd + 7f3a280 commit e98d25b
Show file tree
Hide file tree
Showing 406 changed files with 20,474 additions and 40,008 deletions.
121 changes: 76 additions & 45 deletions IlmBase/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,22 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8)

PROJECT ( ilmbase )

SET(ILMBASE_VERSION_MAJOR "2")
SET(ILMBASE_VERSION_MINOR "2")
SET(ILMBASE_VERSION_PATCH "0")

SET(ILMBASE_VERSION ${ILMBASE_VERSION_MAJOR}.${ILMBASE_VERSION_MINOR}.${ILMBASE_VERSION_PATCH})
SET(ILMBASE_VERSION_API ${ILMBASE_VERSION_MAJOR}_${ILMBASE_VERSION_MINOR})


ENABLE_TESTING()

SET(CPACK_PACKAGE_VERSION_MAJOR "2")
SET(CPACK_PACKAGE_VERSION_MINOR "1")
SET(CPACK_PACKAGE_VERSION_PATCH "0")
SET(CPACK_PACKAGE_VERSION_MAJOR "${ILMBASE_VERSION_MAJOR}")
SET(CPACK_PACKAGE_VERSION_MINOR "${ILMBASE_VERSION_MINOR}")
SET(CPACK_PACKAGE_VERSION_PATCH "${ILMBASE_VERSION_PATCH}")
SET(CPACK_SOURCE_GENERATOR "TGZ")
set(CPACK_SOURCE_PACKAGE_FILE_NAME
"${CMAKE_PROJECT_NAME}-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}"
"${CMAKE_PROJECT_NAME}-${ILMBASE_VERSION}"
)
set(CPACK_SOURCE_IGNORE_FILES
"/.git*;/.cvs*;${CPACK_SOURCE_IGNORE_FILES}")
Expand All @@ -20,11 +28,21 @@ INCLUDE ( CPack )
# Allow the developer to select if Dynamic or Static libraries are built
OPTION (BUILD_SHARED_LIBS "Build Shared Libraries" ON)

# Allow the developer to select if Dynamic or Static libraries are built
OPTION (NAMESPACE_VERSIONING "Namespace Versioning" ON)

# Setup osx rpathing
SET (CMAKE_MACOSX_RPATH 1)
SET (BUILD_WITH_INSTALL_RPATH 1)

IF ( NOT WIN32)
ADD_DEFINITIONS ( -pthread )
ENDIF ()

INCLUDE_DIRECTORIES ( Iex IexMath Imath Half config IlmThread IexTest ImathTest HalfTest )
INCLUDE_DIRECTORIES ( Iex IexMath Imath Half ${CMAKE_CURRENT_BINARY_DIR}/config IlmThread IexTest ImathTest HalfTest )

# also add the current directory to pick up the autogenerated headers
SET(CMAKE_INCLUDE_CURRENT_DIR ON)

MACRO(GET_TARGET_PROPERTY_WITH_DEFAULT _variable _target _property _default_value)
GET_TARGET_PROPERTY (${_variable} ${_target} ${_property})
Expand All @@ -48,8 +66,8 @@ MACRO(GET_TARGET_PROPERTY_WITH_DEFAULT _variable _target _property _default_valu
GET_FILENAME_COMPONENT(_soname ${_target_location} NAME)
SET(_laname ${PROJECT_BINARY_DIR}/${_laname}.la)
FILE(WRITE ${_laname} "# ${_laname} - a libtool library file\n")
FILE(WRITE ${_laname} "# Generated by CMake ${CMAKE_VERSION} (like GNU libtool)\n")
FILE(WRITE ${_laname} "\n# Please DO NOT delete this file!\n# It is necessary for linking the library with libtool.\n\n" )
FILE(APPEND ${_laname} "# Generated by CMake ${CMAKE_VERSION} (like GNU libtool)\n")
FILE(APPEND ${_laname} "\n# Please DO NOT delete this file!\n# It is necessary for linking the library with libtool.\n\n" )
FILE(APPEND ${_laname} "# The name that we can dlopen(3).\n")
FILE(APPEND ${_laname} "dlname='${_soname}'\n\n")
FILE(APPEND ${_laname} "# Names of this library.\n")
Expand Down Expand Up @@ -93,69 +111,81 @@ ADD_SUBDIRECTORY ( Imath )
ADD_SUBDIRECTORY ( IlmThread )

IF (WIN32)
FILE ( COPY ${CMAKE_SOURCE_DIR}/config.windows/IlmBaseConfig.h
DESTINATION ${CMAKE_SOURCE_DIR}/config
FILE ( COPY ${CMAKE_CURRENT_SOURCE_DIR}/config.windows/IlmBaseConfig.h
DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/config
)
ELSE ()
IF (APPLE)
FILE ( WRITE ${CMAKE_SOURCE_DIR}/config/IlmBaseConfig.h "#define HAVE_PTHREAD 1\n" )
FILE ( WRITE ${CMAKE_CURRENT_BINARY_DIR}/config/IlmBaseConfig.h "#define HAVE_PTHREAD 1\n" )
ELSE ()
FILE ( WRITE ${CMAKE_SOURCE_DIR}/config/IlmBaseConfig.h "#define HAVE_PTHREAD 1\n" )
FILE ( APPEND ${CMAKE_SOURCE_DIR}/config/IlmBaseConfig.h "#define ILMBASE_HAVE_LARGE_STACK 1\n" )
FILE ( APPEND ${CMAKE_SOURCE_DIR}/config/IlmBaseConfig.h "#define HAVE_POSIX_SEMAPHORES 1\n" )
FILE ( APPEND ${CMAKE_SOURCE_DIR}/config/IlmBaseConfig.h "#define ILMBASE_HAVE_CONTROL_REGISTER_SUPPORT 1\n")
FILE ( WRITE ${CMAKE_CURRENT_BINARY_DIR}/config/IlmBaseConfig.h "#define HAVE_PTHREAD 1\n" )
FILE ( APPEND ${CMAKE_CURRENT_BINARY_DIR}/config/IlmBaseConfig.h "#define ILMBASE_HAVE_LARGE_STACK 1\n" )
FILE ( APPEND ${CMAKE_CURRENT_BINARY_DIR}/config/IlmBaseConfig.h "#define HAVE_POSIX_SEMAPHORES 1\n" )
FILE ( APPEND ${CMAKE_CURRENT_BINARY_DIR}/config/IlmBaseConfig.h "#define ILMBASE_HAVE_CONTROL_REGISTER_SUPPORT 1\n")
ENDIF ()
ENDIF ()

FILE ( APPEND ${CMAKE_SOURCE_DIR}/config/IlmBaseConfig.h "#define ILMBASE_INTERNAL_NAMESPACE_CUSTOM 1\n")
FILE ( APPEND ${CMAKE_SOURCE_DIR}/config/IlmBaseConfig.h "#define IMATH_INTERNAL_NAMESPACE Imath_${CPACK_PACKAGE_VERSION_MAJOR}_${CPACK_PACKAGE_VERSION_MINOR}\n")
FILE ( APPEND ${CMAKE_SOURCE_DIR}/config/IlmBaseConfig.h "#define IEX_INTERNAL_NAMESPACE Iex_${CPACK_PACKAGE_VERSION_MAJOR}_${CPACK_PACKAGE_VERSION_MINOR}\n")
FILE ( APPEND ${CMAKE_SOURCE_DIR}/config/IlmBaseConfig.h "#define ILMTHREAD_INTERNAL_NAMESPACE IlmThread_${CPACK_PACKAGE_VERSION_MAJOR}_${CPACK_PACKAGE_VERSION_MINOR}\n")
FILE ( APPEND ${CMAKE_SOURCE_DIR}/config/IlmBaseConfig.h "#define IMATH_NAMESPACE Imath\n")
FILE ( APPEND ${CMAKE_SOURCE_DIR}/config/IlmBaseConfig.h "#define IEX_NAMESPACE Iex\n")
FILE ( APPEND ${CMAKE_SOURCE_DIR}/config/IlmBaseConfig.h "#define ILMTHREAD_NAMESPACE IlmThread\n")
FILE ( APPEND ${CMAKE_SOURCE_DIR}/config/IlmBaseConfig.h "#define ILMBASE_VERSION_STRING \"${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}\"\n" )
FILE ( APPEND ${CMAKE_SOURCE_DIR}/config/IlmBaseConfig.h "#define ILMBASE_PACKAGE_STRING \"IlmBase ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}\"\n" )
FILE ( APPEND ${CMAKE_SOURCE_DIR}/config/IlmBaseConfig.h "#define ILMBASE_VERSION_MAJOR ${CPACK_PACKAGE_VERSION_MAJOR}\n" )
FILE ( APPEND ${CMAKE_SOURCE_DIR}/config/IlmBaseConfig.h "#define ILMBASE_VERSION_MINOR ${CPACK_PACKAGE_VERSION_MINOR}\n" )
FILE ( APPEND ${CMAKE_SOURCE_DIR}/config/IlmBaseConfig.h "#define ILMBASE_VERSION_PATCH ${CPACK_PACKAGE_VERSION_PATCH}\n" )

FILE ( APPEND ${CMAKE_SOURCE_DIR}/config/IlmBaseConfig.h "
IF (NAMESPACE_VERSIONING)
FILE ( APPEND ${CMAKE_CURRENT_BINARY_DIR}/config/IlmBaseConfig.h "#define ILMBASE_INTERNAL_NAMESPACE_CUSTOM 1\n")
FILE ( APPEND ${CMAKE_CURRENT_BINARY_DIR}/config/IlmBaseConfig.h "#define IMATH_INTERNAL_NAMESPACE Imath_${ILMBASE_VERSION_API}\n")
FILE ( APPEND ${CMAKE_CURRENT_BINARY_DIR}/config/IlmBaseConfig.h "#define IEX_INTERNAL_NAMESPACE Iex_${ILMBASE_VERSION_API}\n")
FILE ( APPEND ${CMAKE_CURRENT_BINARY_DIR}/config/IlmBaseConfig.h "#define ILMTHREAD_INTERNAL_NAMESPACE IlmThread_${ILMBASE_VERSION_API}\n")
ELSE ()
FILE ( APPEND ${CMAKE_CURRENT_BINARY_DIR}/config/IlmBaseConfig.h "#define ILMBASE_INTERNAL_NAMESPACE_CUSTOM 0\n")
FILE ( APPEND ${CMAKE_CURRENT_BINARY_DIR}/config/IlmBaseConfig.h "#define IMATH_INTERNAL_NAMESPACE Imath\n")
FILE ( APPEND ${CMAKE_CURRENT_BINARY_DIR}/config/IlmBaseConfig.h "#define IEX_INTERNAL_NAMESPACE Iex\n")
FILE ( APPEND ${CMAKE_CURRENT_BINARY_DIR}/config/IlmBaseConfig.h "#define ILMTHREAD_INTERNAL_NAMESPACE IlmThread\n")
ENDIF ()

FILE ( APPEND ${CMAKE_CURRENT_BINARY_DIR}/config/IlmBaseConfig.h "#define IMATH_NAMESPACE Imath\n")
FILE ( APPEND ${CMAKE_CURRENT_BINARY_DIR}/config/IlmBaseConfig.h "#define IEX_NAMESPACE Iex\n")
FILE ( APPEND ${CMAKE_CURRENT_BINARY_DIR}/config/IlmBaseConfig.h "#define ILMTHREAD_NAMESPACE IlmThread\n")
FILE ( APPEND ${CMAKE_CURRENT_BINARY_DIR}/config/IlmBaseConfig.h "#define ILMBASE_VERSION_STRING \"${ILMBASE_VERSION}\"\n" )
FILE ( APPEND ${CMAKE_CURRENT_BINARY_DIR}/config/IlmBaseConfig.h "#define ILMBASE_PACKAGE_STRING \"IlmBase ${ILMBASE_VERSION}\"\n" )
FILE ( APPEND ${CMAKE_CURRENT_BINARY_DIR}/config/IlmBaseConfig.h "#define ILMBASE_VERSION_MAJOR ${ILMBASE_VERSION_MAJOR}\n" )
FILE ( APPEND ${CMAKE_CURRENT_BINARY_DIR}/config/IlmBaseConfig.h "#define ILMBASE_VERSION_MINOR ${ILMBASE_VERSION_MINOR}\n" )
FILE ( APPEND ${CMAKE_CURRENT_BINARY_DIR}/config/IlmBaseConfig.h "#define ILMBASE_VERSION_PATCH ${ILMBASE_VERSION_PATCH}\n" )

FILE ( APPEND ${CMAKE_CURRENT_BINARY_DIR}/config/IlmBaseConfig.h "
// Version as a single hex number, e.g. 0x01000300 == 1.0.3
#define ILMBASE_VERSION_HEX ((ILMBASE_VERSION_MAJOR << 24) | \\
(ILMBASE_VERSION_MINOR << 16) | \\
(ILMBASE_VERSION_PATCH << 8))
")

SET (ILMBASE_LIBSUFFIX "")
IF (NAMESPACE_VERSIONING)
SET ( ILMBASE_LIBSUFFIX "-${ILMBASE_VERSION_API}" )
ENDIF ()

SET_TARGET_PROPERTIES ( Half
PROPERTIES
VERSION 11.0.0
SOVERSION 11
VERSION 12.0.0
SOVERSION 12
)
SET_TARGET_PROPERTIES ( Iex
PROPERTIES
VERSION 11.0.0
SOVERSION 11
OUTPUT_NAME "Iex-${CPACK_PACKAGE_VERSION_MAJOR}_${CPACK_PACKAGE_VERSION_MINOR}"
VERSION 12.0.0
SOVERSION 12
OUTPUT_NAME "Iex${ILMBASE_LIBSUFFIX}"
)
SET_TARGET_PROPERTIES ( Imath
PROPERTIES
VERSION 11.0.0
SOVERSION 11
OUTPUT_NAME "Imath-${CPACK_PACKAGE_VERSION_MAJOR}_${CPACK_PACKAGE_VERSION_MINOR}"
VERSION 12.0.0
SOVERSION 12
OUTPUT_NAME "Imath${ILMBASE_LIBSUFFIX}"
)
SET_TARGET_PROPERTIES ( IlmThread
PROPERTIES
VERSION 11.0.0
SOVERSION 11
OUTPUT_NAME "IlmThread-${CPACK_PACKAGE_VERSION_MAJOR}_${CPACK_PACKAGE_VERSION_MINOR}"
VERSION 12.0.0
SOVERSION 12
OUTPUT_NAME "IlmThread${ILMBASE_LIBSUFFIX}"
)
SET_TARGET_PROPERTIES ( IexMath
PROPERTIES
VERSION 11.0.0
SOVERSION 11
OUTPUT_NAME "IexMath-${CPACK_PACKAGE_VERSION_MAJOR}_${CPACK_PACKAGE_VERSION_MINOR}"
VERSION 12.0.0
SOVERSION 12
OUTPUT_NAME "IexMath${ILMBASE_LIBSUFFIX}"
)

IF ( NOT WIN32 )
Expand All @@ -175,7 +205,7 @@ ADD_SUBDIRECTORY ( ImathTest )
# Installation

INSTALL ( FILES
config/IlmBaseConfig.h
${CMAKE_CURRENT_BINARY_DIR}/config/IlmBaseConfig.h
DESTINATION
include/OpenEXR

Expand All @@ -189,8 +219,9 @@ OpenEXR_includedir=\${prefix}/include/OpenEXR
Name: IlmBase
Description: Base math and exception libraries
Version: ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}
Libs: -L\${libdir} -lImath-${CPACK_PACKAGE_VERSION_MAJOR}_${CPACK_PACKAGE_VERSION_MINOR} -lIexMath-${CPACK_PACKAGE_VERSION_MAJOR}_${CPACK_PACKAGE_VERSION_MINOR} -lHalf -lIex-${CPACK_PACKAGE_VERSION_MAJOR}_${CPACK_PACKAGE_VERSION_MINOR} -lIlmThread-${CPACK_PACKAGE_VERSION_MAJOR}_${CPACK_PACKAGE_VERSION_MINOR} -pthreadCflags: -pthread -I\${OpenEXR_includedir}
Version: ${ILMBASE_VERSION}
Libs: -L\${libdir} -lImath${ILMBASE_LIBSUFFIX} -lIexMath${ILMBASE_LIBSUFFIX} -lHalf -lIex${ILMBASE_LIBSUFFIX} -lIlmThread${ILMBASE_LIBSUFFIX} -pthread
Cflags: -pthread -I\${OpenEXR_includedir}
")

INSTALL ( FILES
Expand Down
16 changes: 8 additions & 8 deletions IlmBase/Half/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,32 @@ ADD_EXECUTABLE ( eLut eLut.cpp )

ADD_CUSTOM_COMMAND (
TARGET eLut POST_BUILD
COMMAND eLut > ${CMAKE_CURRENT_SOURCE_DIR}/eLut.h
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMAND eLut > ${CMAKE_CURRENT_BINARY_DIR}/eLut.h
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
)
SET_SOURCE_FILES_PROPERTIES(
${CMAKE_SOURCE_DIR}/eLut.h
${CMAKE_CURRENT_BINARY_DIR}/eLut.h
PROPERTIES HEADER_FILE_ONLY TRUE
)

ADD_EXECUTABLE ( toFloat toFloat.cpp )
ADD_CUSTOM_COMMAND (
TARGET toFloat POST_BUILD
COMMAND toFloat > ${CMAKE_CURRENT_SOURCE_DIR}/toFloat.h
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMAND toFloat > ${CMAKE_CURRENT_BINARY_DIR}/toFloat.h
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
)
SET_SOURCE_FILES_PROPERTIES(
${CMAKE_SOURCE_DIR}/toFloat.h
${CMAKE_CURRENT_BINARY_DIR}/toFloat.h
PROPERTIES HEADER_FILE_ONLY TRUE
)

SET_SOURCE_FILES_PROPERTIES(
half.cpp
PROPERTIES
OBJECT_DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/eLut.h
${CMAKE_CURRENT_BINARY_DIR}/eLut.h
OBJECT_DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/toFloat.h
${CMAKE_CURRENT_BINARY_DIR}/toFloat.h
)

IF(BUILD_SHARED_LIBS)
Expand Down
4 changes: 1 addition & 3 deletions IlmBase/IexMath/IexMathFpu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,7 @@
#define debug(x)
#endif


#ifdef HAVE_UCONTEXT_H

#if defined(HAVE_UCONTEXT_H) && (defined(__x86_64__) || defined(_M_X64) || defined(__i386__) || defined(_M_IX86))

#include <ucontext.h>
#include <signal.h>
Expand Down
1 change: 1 addition & 0 deletions IlmBase/Imath/ImathMatrixAlgo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@

#include "ImathMatrixAlgo.h"
#include <cmath>
#include <algorithm>

#if defined(OPENEXR_DLL)
#define EXPORT_CONST __declspec(dllexport)
Expand Down
1 change: 1 addition & 0 deletions IlmBase/ImathTest/testJacobiEigenSolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
#include <ctime>
#include <cassert>
#include <limits>
#include <algorithm>

using namespace std;
using namespace IMATH_INTERNAL_NAMESPACE;
Expand Down
7 changes: 4 additions & 3 deletions IlmBase/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@ SUBDIRS = \
config

DIST_SUBDIRS = \
$(SUBDIRS) \
vc
$(SUBDIRS)


EXTRA_DIST = \
AUTHORS COPYING ChangeLog INSTALL LICENSE NEWS \
README README.CVS README.OSX README.win32 bootstrap \
README README.CVS README.OSX README.win32 \
README.cmake.txt README.namespacing README.git \
bootstrap \
config.windows/IlmBaseConfig.h \
CMakeLists.txt

Expand Down
Loading

0 comments on commit e98d25b

Please sign in to comment.