Skip to content
Permalink
Browse files
Fix IlmBase 2.1 build breakages
(other minor changes are due to syncing with the analogous file in OIIO)
  • Loading branch information
lgritz committed Apr 23, 2014
1 parent 7b296f6 commit 17ce277
Showing 1 changed file with 8 additions and 6 deletions.
@@ -104,16 +104,19 @@ if (ILMBASE_CACHED_STATE AND
endforeach ()
endif ()


# Generic search paths
set (IlmBase_generic_include_paths
${ILMBASE_CUSTOM_INCLUDE_DIR}
/usr/include
/usr/include/${CMAKE_LIBRARY_ARCHITECTURE}
/usr/local/include
/sw/include
/opt/local/include)
set (IlmBase_generic_library_paths
${ILMBASE_CUSTOM_LIB_DIR}
/usr/lib
/usr/lib/${CMAKE_LIBRARY_ARCHITECTURE}
/usr/local/lib
/sw/lib
/opt/local/lib)
@@ -143,7 +146,6 @@ PREFIX_FIND_INCLUDE_DIR (IlmBase
OpenEXR/IlmBaseConfig.h IlmBase_include_paths)

if (ILMBASE_INCLUDE_DIR)

# Get the version from config file, if not already set.
if (NOT ILMBASE_VERSION)
FILE(STRINGS "${ILMBASE_INCLUDE_DIR}/OpenEXR/IlmBaseConfig.h" ILMBASE_BUILD_SPECIFICATION
@@ -169,11 +171,12 @@ if (ILMBASE_CUSTOM)
endif()
set (IlmBase_Libraries ${ILMBASE_CUSTOM_LIBRARIES})
separate_arguments(IlmBase_Libraries)
elseif (${ILMBASE_VERSION} VERSION_LESS "2.1")
set (IlmBase_Libraries Half Iex Imath IlmThread)
else ()
string(REGEX REPLACE "([0-9]+)[.]([0-9]+).*" "\\1_\\2" _ilmbase_libs_ver ${ILMBASE_VERSION})
set (IlmBase_Libraries Half Iex-${_ilmbase_libs_ver} Imath-${_ilmbase_libs_ver} IlmThread-${_ilmbase_libs_ver})
#elseif (${ILMBASE_VERSION} VERSION_LESS "2.1")
set (IlmBase_Libraries Half Iex Imath IlmThread)
#else ()
# string(REGEX REPLACE "([0-9]+)[.]([0-9]+).*" "\\1_\\2" _ilmbase_libs_ver ${ILMBASE_VERSION})
# set (IlmBase_Libraries Half Iex-${_ilmbase_libs_ver} Imath-${_ilmbase_libs_ver} IlmThread-${_ilmbase_libs_ver})
endif ()


@@ -184,7 +187,6 @@ foreach (ilmbase_lib ${IlmBase_Libraries})
PREFIX_FIND_LIB (IlmBase ${ilmbase_lib}
IlmBase_library_paths IlmBase_libvars IlmBase_cachevars)
endforeach ()

# Create the list of variables that might need to be cleared
set (ILMBASE_CACHED_VARS
ILMBASE_INCLUDE_DIR ${IlmBase_cachevars}

3 comments on commit 17ce277

@mont29
Copy link
Contributor

@mont29 mont29 commented on 17ce277 Jul 25, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don’t know what it fixes, but I can assure you this commit breaks again linux builds with latest ilmbase (2.1). I don’t know why ilmbase 2.1 libs are suffixed with '2_1', this does not makes any sense to me, but they do.

I have to say I’m really tired to have to hack around ilm libs each and every time we update our dependancies (I maintain the install_deps script for Blender)…

@lgritz
Copy link
Collaborator Author

@lgritz lgritz commented on 17ce277 Jul 25, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So what this patch does is to look simply for libHalf.so, libIex.so, libImath.so, and libIlmThread.so, with no versions at all.

On most systems, the installation provides (as an example) libIex-2_1.so as well as libIex.so linking to it.

On your system, then, are you saying that you lack the libIex.so link, so you MUST have the one with the embedded version?

@mont29
Copy link
Contributor

@mont29 mont29 commented on 17ce277 Jul 25, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, because our script also builds ilmbase/openexr (many distro are still stuck to old openEXR 1.6/ ilmbase 2.0.1 eg. for debian testing packages). And when we build those libs from 2.1 release code with CMake, it only generates those tagged '-2_1' names for ilmbase libs, no 'nice named' shortcuts…

Please sign in to comment.