Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes to openexr2.2, windows and fix to lexer to read doubles regardless of locale #57

Open
wants to merge 41 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
8f48cd4
Updated CtlLex to convert floats without taking into account the locale.
ggarra13 Feb 19, 2015
d12a460
Commited changes to CMakeLists.txt to compile under OpenEXR 2.2.
ggarra13 Feb 19, 2015
d8e83bb
Added changes needed to compile under Windows.
ggarra13 Feb 19, 2015
f01b30f
Made changes to compile under OpenEXR2.2.
ggarra13 Feb 19, 2015
a8e97eb
Made ApplyTransforms look for "main" function name before name of the…
ggarra13 Feb 19, 2015
ce1d0bc
Made Windows changes to ctlrender files.
ggarra13 Feb 19, 2015
94721a7
Made changes to CMakeLists.txt to compile under OpenEXR 2.2.
ggarra13 Feb 19, 2015
d1b2439
Hard coded libs to be OpenEXR 2.2. This is probably not right.
ggarra13 Feb 19, 2015
a2e160f
Modified main CMakeLists.txt to default to compile static on windows.
ggarra13 Feb 19, 2015
cc91a10
Oops. Wrong values in ifdef.
ggarra13 Feb 19, 2015
fc330d1
Compilation fixes for windows.
ggarra13 Feb 19, 2015
a32ac06
More windows fixes.
ggarra13 Feb 19, 2015
889ef59
Fixed mistake of lowercase WIN32.
ggarra13 Feb 20, 2015
06e209a
Updated CtlLex with Florian's version of string to double.
ggarra13 Mar 7, 2015
696e118
Modified CtlLex to use Florian Kainz changes.
ggarra13 Mar 8, 2015
057dd5e
Spell correction in comment.
ggarra13 Mar 8, 2015
9fffc80
Modifications to compile under vc14.
ggarra13 Nov 21, 2018
59ddb14
More fixes to OpenEXR look up.
ggarra13 Nov 21, 2018
f55ab47
Updated CMakeLists.txt to compile shared libraries on windows, too.
ggarra13 Nov 21, 2018
48b612b
IlmBase had wrong version (2_2 not 2_3).
ggarra13 Nov 23, 2018
9272745
Updated to OpenEXR/IlmBase 2.4.
ggarra13 Sep 10, 2019
28cbf52
Fixed CMakeLists.txt for different openexr libraries.
ggarra13 Jun 4, 2021
b2aeb3e
Fixed FindIlmBase / OpenEXR.
ggarra13 Jun 5, 2021
a0e6d08
Fixed CMakeLists.txt to use latest openexr libs.
ggarra13 Jun 5, 2021
f3c1a06
Updated FindOpenEXR and FindIlmBase(Imath).
ggarra13 Jul 21, 2022
9b3d927
Removed set( *VERSION )
ggarra13 Jul 21, 2022
9ce8b6a
Fixed FindIlmBase.cmake.
ggarra13 Jul 21, 2022
baeea58
Fixed Imath::limits and added more fixes to FindIlmBase.
ggarra13 Jul 21, 2022
c27406c
Updated .hh files to correct some includes and errors in std::.
ggarra13 Jul 21, 2022
61c7600
Added <limits> include which was missing.
ggarra13 Jul 22, 2022
2507381
Set Imath to 3_1 library.
ggarra13 Jul 22, 2022
56255d6
Fixed Imath-3_2 lib instead of correct Imath-3_1.
ggarra13 Jul 30, 2022
b5ccc58
Updated to remove all -3_2 library references.
ggarra13 Jul 30, 2022
f55a148
Removed copying of Half library from WIN32 builds.
ggarra13 Jul 30, 2022
de0da78
Fixed compilation for win32 (still not done).
ggarra13 Aug 1, 2022
01fd8e5
Fixed win32 compilation at last.
ggarra13 Aug 2, 2022
eebed30
Added missing dpx_exports.hh file.
ggarra13 Aug 2, 2022
2db84a7
Fixed dpx_exports.hh include.
ggarra13 Aug 2, 2022
2a7692e
Fixed IMATH_DLL / OPENEXR_DLL to be set for windows only.
ggarra13 Aug 5, 2022
595283a
Made Imath-3_1 be Imath-3_2
ggarra13 Aug 20, 2022
afb4d1f
Added Imath_HINTS CMAKE_PREFIX_PATH to Windows.
ggarra13 Aug 21, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,11 @@ foreach( p LIB BIN INCLUDE CMAKE DOC)
endif()
endforeach()

if(WIN32)
option(ENABLE_SHARED "Enable Shared Libraries" ON)
else(WIN32)
option(ENABLE_SHARED "Enable Shared Libraries" ON)
endif(WIN32)

if ( ENABLE_SHARED )
set( DO_SHARED SHARED )
Expand All @@ -58,6 +62,8 @@ include( configure.cmake )
include_directories( "${PROJECT_SOURCE_DIR}" "${PROJECT_BINARY_DIR}" )
# implement find library stuff...

set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)

add_definitions( -DPACKAGE="CTL" -DVERSION="${CTL_VERSION}" )
add_subdirectory(doc)
add_subdirectory(lib)
Expand Down
4 changes: 4 additions & 0 deletions OpenEXR_CTL/exr_ctl_exr/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@

if(WIN32)
add_definitions( -DOPENEXR_DLL )
endif(WIN32)

include_directories( ${OpenEXR_INCLUDE_DIRS} )
link_directories( ${OpenEXR_LIBRARY_DIRS} )

Expand Down
4 changes: 4 additions & 0 deletions OpenEXR_CTL/exrdpx/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@

if(WIN32)
add_definitions( -DOPENEXR_DLL )
endif(WIN32)

include_directories( ${OpenEXR_INCLUDE_DIRS} )
link_directories( ${OpenEXR_LIBRARY_DIRS} )

Expand Down
50 changes: 29 additions & 21 deletions cmake/modules/FindIlmBase.cmake
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#
# A simple cmake find module for IlmBase
# A simple cmake find module for Imath
#

find_package(PkgConfig QUIET)
if(PKG_CONFIG_FOUND)
pkg_check_modules(PC_ILMBASE QUIET IlmBase)
pkg_check_modules(PC_ILMBASE QUIET Imath)
endif()

if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
Expand All @@ -23,10 +23,12 @@ if(PC_ILMBASE_FOUND)
set(IlmBase_LIBRARY_DIRS ${PC_ILMBASE_LIBRARY_DIRS})
set(IlmBase_LDFLAGS ${PC_ILMBASE_LDFLAGS_OTHER})
if("${_IlmBase_HINT_INCLUDE}" STREQUAL "")
set(_IlmBase_HINT_INCLUDE ${PC_ILMBASE_INCLUDEDIR} ${PC_ILMBASE_INCLUDE_DIRS})
set(_IlmBase_HINT_LIB ${PC_ILMBASE_LIBDIR} ${PC_ILMBASE_LIBRARY_DIRS})
set(_IlmBase_HINT_INCLUDE ${CMAKE_PREFIX_PATH}/include )
set(_IlmBase_HINT_LIB ${CMAKE_PREFIX_PATH}/lib ${CMAKE_PREFIX_PATH}/lib64 )
endif()
else()
set(_IlmBase_HINT_INCLUDE ${CMAKE_PREFIX_PATH}/include )
set(_IlmBase_HINT_LIB ${CMAKE_PREFIX_PATH}/lib ${CMAKE_PREFIX_PATH}/lib64 )
if(UNIX)
set(IlmBase_CFLAGS "-pthread")
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
Expand All @@ -36,29 +38,29 @@ else()
endif()
endif()

find_path(IlmBase_INCLUDE_DIR IlmBaseConfig.h HINTS ${_IlmBase_HINT_INCLUDE} PATH_SUFFIXES OpenEXR )
if(IlmBase_INCLUDE_DIR AND EXISTS "${IlmBase_INCLUDE_DIR}/IlmBaseConfig.h")
set(IlmBase_VERSION ${PC_ILMBASE_VERSION})
find_path(IlmBase_INCLUDE_DIR ImathConfig.h HINTS ${_IlmBase_HINT_INCLUDE} PATH_SUFFIXES Imath )
if(IlmBase_INCLUDE_DIR AND EXISTS "${IlmBase_INCLUDE_DIR}/ImathConfig.h")
#set(IlmBase_VERSION ${PC_ILMBASE_VERSION})
if("${IlmBase_VERSION}" STREQUAL "")
file(STRINGS "${IlmBase_INCLUDE_DIR}/IlmBaseConfig.h" ilmbase_version_str
REGEX "^#define[\t ]+ILMBASE_VERSION_STRING[\t ]+\".*")
file(STRINGS "${IlmBase_INCLUDE_DIR}/ImathConfig.h" ilmbase_version_str
REGEX "^#define[\t ]+IMATH_VERSION_STRING[\t ]+\".*")

string(REGEX REPLACE "^#define[\t ]+ILMBASE_VERSION_STRING[\t ]+\"([^ \\n]*)\".*"
"\\1" IlmBase_VERSION "${ilmbase_version_str}")
string(REGEX REPLACE "^#define[\t ]+IMATH_VERSION_STRING[\t ]+\"([^ \\n]*)\".*"
"\\1" IlmBase_VERSION "${ilmbase_version_str}")
unset(ilmbase_version_str)
endif()
endif()

if("${IlmBase_VERSION}" VERSION_LESS "2.0.0")
set(IlmBase_ALL_LIBRARIES Imath Half Iex IlmThread)
set(IlmBase_ALL_LIBRARIES Imath-3_2 Iex-3_1 IlmThread-3_1)
else()
set(IlmBase_ALL_LIBRARIES Imath Half Iex IexMath IlmThread)
set(IlmBase_ALL_LIBRARIES Imath-3_2 Iex-3_1 IlmThread-3_1)
endif()
foreach(ILMBASE_LIB ${IlmBase_ALL_LIBRARIES})
string(TOUPPER ${ILMBASE_LIB} _upper_ilmbase_lib)
find_library(IlmBase_${_upper_ilmbase_lib}_LIBRARY
NAMES ${ILMBASE_LIB} lib${ILMBASE_LIB}
HINTS ${_IlmBase_HINT_LIB}
NAMES ${ILMBASE_LIB} lib${ILMBASE_LIB}
HINTS ${_IlmBase_HINT_LIB}
)
if(IlmBase_${_upper_ilmbase_lib}_LIBRARY)
set(IlmBase_LIBRARY ${IlmBase_LIBRARY} ${IlmBase_${_upper_ilmbase_lib}_LIBRARY})
Expand All @@ -69,20 +71,26 @@ endforeach()
unset(_IlmBase_HINT_INCLUDE)
unset(_IlmBase_HINT_LIB)
set(IlmBase_LIBRARIES ${IlmBase_LIBRARY} )
set(IlmBase_INCLUDE_DIRS ${IlmBase_INCLUDE_DIR} )
set(IlmBase_INCLUDE_DIRS ${IlmBase_INCLUDE_DIR}
${CMAKE_PREFIX_PATH}/include/OpenEXR )

if(NOT PC_ILMBASE_FOUND)
get_filename_component(IlmBase_LDFLAGS_OTHER ${IlmBase_HALF_LIBRARY} PATH)
set(IlmBase_LDFLAGS_OTHER -L${IlmBase_LDFLAGS_OTHER})
get_filename_component(IlmBase_LDFLAGS_OTHER ${IlmBase_IMATH-3_1_LIBRARY} PATH)
if(WIN32)
set(IlmBase_LDFLAGS_OTHER -LIBPATH:${IlmBase_LDFLAGS_OTHER})
else(WIN32)
set(IlmBase_LDFLAGS_OTHER -L${IlmBase_LDFLAGS_OTHER})
endif(WIN32)
endif()

include(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set IlmBase_FOUND to TRUE
# if all listed variables are TRUE
find_package_handle_standard_args(IlmBase
REQUIRED_VARS IlmBase_LIBRARY IlmBase_INCLUDE_DIR
VERSION_VAR IlmBase_VERSION
FAIL_MESSAGE "Unable to find IlmBase libraries" )
REQUIRED_VARS IlmBase_LIBRARY IlmBase_INCLUDE_DIR
VERSION_VAR IlmBase_VERSION
FAIL_MESSAGE "Unable to find IlmBase libraries" )


# older versions of cmake don't support FOUND_VAR to find_package_handle
# so just do it the hard way...
Expand Down
31 changes: 18 additions & 13 deletions cmake/modules/FindOpenEXR.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ if(PC_OPENEXR_FOUND)
set(OpenEXR_LIBRARY_DIRS ${PC_OPENEXR_LIBRARY_DIRS})
set(OpenEXR_LDFLAGS ${PC_OPENEXR_LDFLAGS_OTHER})
if("${_OpenEXR_HINT_INCLUDE}" STREQUAL "")
set(_OpenEXR_HINT_INCLUDE ${PC_OPENEXR_INCLUDEDIR} ${PC_OPENEXR_INCLUDE_DIRS})
set(_OpenEXR_HINT_LIB ${PC_OPENEXR_LIBDIR} ${PC_OPENEXR_LIBRARY_DIRS})
set(_OpenEXR_HINT_INCLUDE ${CMAKE_PREFIX_PATH}/include )
set(_OpenEXR_HINT_LIB ${CMAKE_PREFIX_PATH}/lib ${CMAKE_PREFIX_PATH}/lib64 )
endif()
else()
if(UNIX)
Expand All @@ -37,43 +37,48 @@ else()
endif()

find_path(OpenEXR_INCLUDE_DIR OpenEXRConfig.h
HINTS ${_OpenEXR_HINT_INCLUDE}
PATH_SUFFIXES OpenEXR )
HINTS ${_OpenEXR_HINT_INCLUDE}
PATH_SUFFIXES OpenEXR )
if(OpenEXR_INCLUDE_DIR AND EXISTS "${OpenEXR_INCLUDE_DIR}/OpenEXRConfig.h")
set(OpenEXR_VERSION ${PC_OPENEXR_VERSION})
#set(OpenEXR_VERSION ${PC_OPENEXR_VERSION})

if("${OpenEXR_VERSION}" STREQUAL "")
file(STRINGS "${OpenEXR_INCLUDE_DIR}/OpenEXRConfig.h" openexr_version_str
REGEX "^#define[\t ]+OPENEXR_VERSION_STRING[\t ]+\".*")
REGEX "^#define[\t ]+OPENEXR_VERSION_STRING[\t ]+\".*")

string(REGEX REPLACE "^#define[\t ]+OPENEXR_VERSION_STRING[\t ]+\"([^ \\n]*)\".*"
"\\1" OpenEXR_VERSION "${openexr_version_str}")
"\\1" OpenEXR_VERSION "${openexr_version_str}")
unset(openexr_version_str)
endif()
endif()

find_library(OpenEXR_LIBRARY NAMES IlmImf libIlmImf HINTS ${_OpenEXR_HINT_LIB})

find_library(OpenEXR_LIBRARY NAMES OpenEXR-3_1 HINTS ${_OpenEXR_HINT_LIB})
find_library(OpenEXRCore_LIBRARY NAMES OpenEXRCore-3_1 HINTS ${_OpenEXR_HINT_LIB})
find_library(IlmImfUtil NAMES OpenEXRUtil-3_1 HINTS ${_OpenEXR_HINT_LIB})
find_package(IlmBase QUIET)

unset(_OpenEXR_HINT_INCLUDE)
unset(_OpenEXR_HINT_LIB)

set(OpenEXR_LIBRARIES ${OpenEXR_LIBRARY} ${IlmBase_LIBRARIES} )
set(OpenEXR_LIBRARIES ${OpenEXR_LIBRARY} ${IlmImfUtil} ${OpenEXRCore_LIBRARY} ${IlmBase_LIBRARIES} )
set(OpenEXR_INCLUDE_DIRS ${OpenEXR_INCLUDE_DIR} )

if(NOT PC_OPENEXR_FOUND)
get_filename_component(OpenEXR_LDFLAGS_OTHER ${OpenEXR_LIBRARY} PATH)
if(WIN32)
set(OpenEXR_LDFLAGS_OTHER -LIBPATH:${OpenEXR_LDFLAGS_OTHER})
else(WIN32)
set(OpenEXR_LDFLAGS_OTHER -L${OpenEXR_LDFLAGS_OTHER})
endif(WIN32)
endif()

include(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set OpenEXR_FOUND to TRUE
# if all listed variables are TRUE
find_package_handle_standard_args(OpenEXR
REQUIRED_VARS OpenEXR_LIBRARY OpenEXR_INCLUDE_DIR
VERSION_VAR OpenEXR_VERSION
FAIL_MESSAGE "Unable to find OpenEXR library" )
REQUIRED_VARS OpenEXR_LIBRARY OpenEXR_INCLUDE_DIR
VERSION_VAR OpenEXR_VERSION
FAIL_MESSAGE "Unable to find OpenEXR library" )

# older versions of cmake don't support FOUND_VAR to find_package_handle
# so just do it the hard way...
Expand Down
16 changes: 15 additions & 1 deletion ctlrender/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@


if (TIFF_FOUND)
add_definitions( -DHAVE_LIBTIFF=1 )
include_directories( ${TIFF_INCLUDE_DIRS} )
link_directories( ${TIFF_LIBRARY_DIRS} )
endif()

if ( OpenEXR_FOUND )
if(WIN32)
add_definitions( -DOPENEXR_DLL -DNOMINMAX )
endif(WIN32)
add_definitions( -DHAVE_OPENEXR=1 )
include_directories( ${OpenEXR_INCLUDE_DIRS} )
link_directories( ${OpenEXR_LIBRARY_DIRS} )
Expand All @@ -17,6 +21,9 @@ include_directories( ${AcesContainer_INCLUDE_DIRS} )
link_directories( ${AcesContainer_LIBRARY_DIRS} )
endif()

add_definitions( -DDPX_DLL )


include_directories( "${CMAKE_CURRENT_SOURCE_DIR}" "${PROJECT_SOURCE_DIR}/lib/IlmCtl" "${PROJECT_SOURCE_DIR}/lib/IlmCtlMath" "${PROJECT_SOURCE_DIR}/lib/IlmCtlSimd" "${PROJECT_SOURCE_DIR}/lib/dpx" )

add_executable( ctlrender
Expand All @@ -31,7 +38,14 @@ add_executable( ctlrender
compression.cc
)

target_link_libraries( ctlrender IlmCtlSimd IlmCtlMath IlmCtl ctldpx ${IlmBase_LIBRARIES} )
if(WIN32)
set( OS_LIBRARIES Winmm )
else(WIN32)
set( OS_LIBRARIES "" )
endif(WIN32)

target_link_libraries( ctlrender IlmCtlSimd IlmCtlMath IlmCtl ctldpx ${OS_LIBRARIES} )
target_link_libraries( ctlrender ${IlmBase_LIBRARIES} )
target_link_libraries( ctlrender ${IlmBase_LDFLAGS_OTHER} )
if (TIFF_FOUND)
target_link_libraries( ctlrender ${TIFF_LIBRARIES} )
Expand Down
67 changes: 34 additions & 33 deletions ctlrender/exr_file.hh
Original file line number Diff line number Diff line change
@@ -1,54 +1,54 @@
///////////////////////////////////////////////////////////////////////////
// Copyright (c) 2013 Academy of Motion Picture Arts and Sciences
// Copyright (c) 2013 Academy of Motion Picture Arts and Sciences
// ("A.M.P.A.S."). Portions contributed by others as indicated.
// All rights reserved.
//
//
// A worldwide, royalty-free, non-exclusive right to copy, modify, create
// derivatives, and use, in source and binary forms, is hereby granted,
// subject to acceptance of this license. Performance of any of the
// aforementioned acts indicates acceptance to be bound by the following
// derivatives, and use, in source and binary forms, is hereby granted,
// subject to acceptance of this license. Performance of any of the
// aforementioned acts indicates acceptance to be bound by the following
// terms and conditions:
//
// * Copies of source code, in whole or in part, must retain the
// above copyright notice, this list of conditions and the
// * Copies of source code, in whole or in part, must retain the
// above copyright notice, this list of conditions and the
// Disclaimer of Warranty.
//
// * Use in binary form must retain the above copyright notice,
// * Use in binary form must retain the above copyright notice,
// this list of conditions and the Disclaimer of Warranty in the
// documentation and/or other materials provided with the distribution.
//
// * Nothing in this license shall be deemed to grant any rights to
// trademarks, copyrights, patents, trade secrets or any other
// intellectual property of A.M.P.A.S. or any contributors, except
// * Nothing in this license shall be deemed to grant any rights to
// trademarks, copyrights, patents, trade secrets or any other
// intellectual property of A.M.P.A.S. or any contributors, except
// as expressly stated herein.
//
// * Neither the name "A.M.P.A.S." nor the name of any other
// contributors to this software may be used to endorse or promote
// products derivative of or based on this software without express
// prior written permission of A.M.P.A.S. or the contributors, as
// * Neither the name "A.M.P.A.S." nor the name of any other
// contributors to this software may be used to endorse or promote
// products derivative of or based on this software without express
// prior written permission of A.M.P.A.S. or the contributors, as
// appropriate.
//
// This license shall be construed pursuant to the laws of the State of
// California, and any disputes related thereto shall be subject to the
//
// This license shall be construed pursuant to the laws of the State of
// California, and any disputes related thereto shall be subject to the
// jurisdiction of the courts therein.
//
// Disclaimer of Warranty: THIS SOFTWARE IS PROVIDED BY A.M.P.A.S. AND
// CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
// BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
// FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT ARE DISCLAIMED. IN NO
// EVENT SHALL A.M.P.A.S., OR ANY CONTRIBUTORS OR DISTRIBUTORS, BE LIABLE
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, RESITUTIONARY,
// 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
// Disclaimer of Warranty: THIS SOFTWARE IS PROVIDED BY A.M.P.A.S. AND
// CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
// BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
// FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT ARE DISCLAIMED. IN NO
// EVENT SHALL A.M.P.A.S., OR ANY CONTRIBUTORS OR DISTRIBUTORS, BE LIABLE
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, RESITUTIONARY,
// 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.
//
// WITHOUT LIMITING THE GENERALITY OF THE FOREGOING, THE ACADEMY
// SPECIFICALLY DISCLAIMS ANY REPRESENTATIONS OR WARRANTIES WHATSOEVER
// RELATED TO PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS IN THE ACADEMY
// COLOR ENCODING SYSTEM, OR APPLICATIONS THEREOF, HELD BY PARTIES OTHER
// WITHOUT LIMITING THE GENERALITY OF THE FOREGOING, THE ACADEMY
// SPECIFICALLY DISCLAIMS ANY REPRESENTATIONS OR WARRANTIES WHATSOEVER
// RELATED TO PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS IN THE ACADEMY
// COLOR ENCODING SYSTEM, OR APPLICATIONS THEREOF, HELD BY PARTIES OTHER
// THAN A.M.P.A.S., WHETHER DISCLOSED OR UNDISCLOSED.
///////////////////////////////////////////////////////////////////////////

Expand All @@ -57,6 +57,7 @@

#include "main.hh"
#include <dpx.hh>
#include <fstream>

bool exr_read(const char *name, float scale,
ctl::dpx::fb<float> *pixels,
Expand Down
10 changes: 10 additions & 0 deletions ctlrender/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,17 @@
#include <exception>
#include <list>
#include <sys/stat.h>
#ifdef WIN32
#include <io.h>
#define MAXPATHLEN 1024
#define strtof strtod
#define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR)
#define S_ISREG(mode) (((mode) & S_IFMT) == S_IFREG)
#define F_OK 0 /* Test for existence. */
#define access _access
#else
#include <sys/param.h>
#endif
#include <errno.h>
#include "transform.hh"
#include <Iex.h>
Expand Down
5 changes: 5 additions & 0 deletions ctlrender/main.hh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

///////////////////////////////////////////////////////////////////////////
// Copyright (c) 2013 Academy of Motion Picture Arts and Sciences
// ("A.M.P.A.S."). Portions contributed by others as indicated.
Expand Down Expand Up @@ -56,7 +57,11 @@
#define CTL_UTIL_CTLRENDER_MAIN_INCLUDE

#include <stdint.h>
#ifdef WIN32
#include <windows.h>
#else
#include <unistd.h>
#endif
#include <format.hh>
#include <compression.hh>

Expand Down
5 changes: 4 additions & 1 deletion ctlrender/tiff_file.cc
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,13 @@
#if defined(HAVE_LIBTIFF)
#include <tiff.h>
#include <tiffio.h>
#ifdef WIN32
#else
#include <sys/param.h>
#include <alloca.h>
#endif
#include <math.h>
#include <Iex.h>
#include <alloca.h>

void tiff_read_multiplane(TIFF *t, float scale, ctl::dpx::fb<float> * pixels);
void tiff_read_interleaved(TIFF *t, float scale, ctl::dpx::fb<float> * pixels);
Expand Down
Loading