@@ -21,19 +21,22 @@ set(OPENEXR_CXX_STANDARD "${tmp}" CACHE STRING "C++ standard to compile against"
2121set (tmp)
2222message (STATUS  "Building against C++ Standard: ${OPENEXR_CXX_STANDARD} " )
2323
24+ # Sanitize version string for namespace definitions 
25+ string (REPLACE "."  "_"  VERSION_SANITIZED "${OPENEXR_VERSION_API} " )
26+ 
2427set (OPENEXR_NAMESPACE_CUSTOM "0"  CACHE  STRING  "Whether the namespace has been customized (so external users know)" )
25- set (OPENEXR_INTERNAL_IMF_NAMESPACE "Imf_${OPENEXR_VERSION_API } "  CACHE  STRING  "Real namespace for OpenEXR that will end up in compiled symbols" )
28+ set (OPENEXR_INTERNAL_IMF_NAMESPACE "Imf_${VERSION_SANITIZED } "  CACHE  STRING  "Real namespace for OpenEXR that will end up in compiled symbols" )
2629set (OPENEXR_IMF_NAMESPACE "Imf"  CACHE  STRING  "Public namespace alias for OpenEXR" )
2730set (OPENEXR_PACKAGE_NAME "OpenEXR ${OPENEXR_VERSION}${OPENEXR_VERSION_RELEASE_TYPE} "  CACHE  STRING  "Public string / label for displaying package" )
2831
2932# Namespace-related settings, allows one to customize the 
3033# namespace generated, and to version the namespaces 
3134set (ILMTHREAD_NAMESPACE_CUSTOM "0"  CACHE  STRING  "Whether the namespace has been customized (so external users know)" )
32- set (ILMTHREAD_INTERNAL_NAMESPACE "IlmThread_${OPENEXR_VERSION_API } "  CACHE  STRING  "Real namespace for IlmThread that will end up in compiled symbols" )
35+ set (ILMTHREAD_INTERNAL_NAMESPACE "IlmThread_${VERSION_SANITIZED } "  CACHE  STRING  "Real namespace for IlmThread that will end up in compiled symbols" )
3336set (ILMTHREAD_NAMESPACE "IlmThread"  CACHE  STRING  "Public namespace alias for IlmThread" )
3437
3538set (IEX_NAMESPACE_CUSTOM "0"  CACHE  STRING  "Whether the namespace has been customized (so external users know)" )
36- set (IEX_INTERNAL_NAMESPACE "Iex_${OPENEXR_VERSION_API } "  CACHE  STRING  "Real namespace for Iex that will end up in compiled symbols" )
39+ set (IEX_INTERNAL_NAMESPACE "Iex_${VERSION_SANITIZED } "  CACHE  STRING  "Real namespace for Iex that will end up in compiled symbols" )
3740set (IEX_NAMESPACE "Iex"  CACHE  STRING  "Public namespace alias for Iex" )
3841
3942# Whether to generate and install a pkg-config file OpenEXR.pc 
@@ -131,7 +134,7 @@ if(NOT CMAKE_INSTALL_RPATH)
131134      endif ()
132135      set (CMAKE_INSTALL_RPATH  "\\\$ ORIGIN/../${tmpSysPath} ;${CMAKE_INSTALL_FULL_LIBDIR} " )
133136      set (tmpSysPath)
134- 	 elseifAPPLE )
137+      elseifAPPLE )
135138      set (CMAKE_INSTALL_RPATH  "@loader_path/../lib;@executable_path/../lib;${CMAKE_INSTALL_FULL_LIBDIR} " )
136139    else ()
137140      set (CMAKE_INSTALL_RPATH  "${CMAKE_INSTALL_FULL_LIBDIR} " )
@@ -384,4 +387,4 @@ int main() {
384387  if (NOT  HAS_VLD1)
385388    set (OPENEXR_MISSING_ARM_VLD1 TRUE )
386389  endif ()
387- endif ()
390+ endif ()
0 commit comments