Skip to content

Commit 91a52db

Browse files
committed
build: Fix broken OIIO_SITE customization (AcademySoftwareFoundation#4709)
Somewhere along the road to 3.0, the build files changed in such a way that OIIO_SITE was not correctly passed down to C++ symbols, and some SPI-specific (sorry) color space handling was inadvertently disabled as a result. This restores things to the way it was in 2.5, and should not affect anybody else. Also eliminate some old SPI-specific code that's no longer needed (and clearly hasn't been needed for a long time, because we had been naming the site "spi" but testing "SPI", and no problems were evident with skipping that ancient code). Signed-off-by: Larry Gritz <[email protected]>
1 parent b0581ec commit 91a52db

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

CMakeLists.txt

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,11 @@ message(STATUS "Setting Namespace to: ${PROJ_NAMESPACE_V}")
158158
# defined for downstream projects using OIIO.
159159
add_compile_definitions (OIIO_INTERNAL=1)
160160

161+
# If CMake variable OIIO_SITE is set, set compile symbol OIIO_SITE_sitename
162+
if (OIIO_SITE)
163+
add_compile_definitions (OIIO_SITE_${OIIO_SITE})
164+
endif ()
165+
161166
include (GNUInstallDirs)
162167

163168
# Utilities for build instructions of the format-reading plugins
@@ -241,13 +246,6 @@ set (format_plugin_libs "")
241246
set (format_plugin_include_dirs "")
242247
set (format_plugin_definitions "")
243248
file (GLOB all_format_plugin_dirs src/*.imageio)
244-
if ("${OIIO_SITE}" STREQUAL "SPI")
245-
# SPI only -- because of a workaround for a very weird linkage issue
246-
# specific to our system, we need to be sure libtiff is referenced first.
247-
file (GLOB tiff_format_plugin_dir src/tiff.imageio)
248-
list (REMOVE_ITEM all_format_plugin_dirs ${tiff_format_plugin_dir})
249-
list (INSERT all_format_plugin_dirs 0 ${tiff_format_plugin_dir})
250-
endif ()
251249
if (EMBEDPLUGINS AND NOT BUILD_OIIOUTIL_ONLY)
252250
foreach (plugin_dir ${all_format_plugin_dirs})
253251
add_subdirectory (${plugin_dir})

0 commit comments

Comments
 (0)