Skip to content

Commit b485777

Browse files
authored
build: Fix broken OIIO_SITE customization (#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 <lg@larrygritz.com>
1 parent 3b69478 commit b485777

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

CMakeLists.txt

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,11 @@ message(STATUS "Joint namespace PROJ_NAMESPACE_V: ${PROJ_NAMESPACE_V}")
170170
# defined for downstream projects using OIIO.
171171
add_compile_definitions (OIIO_INTERNAL=1)
172172

173+
# If CMake variable OIIO_SITE is set, set compile symbol OIIO_SITE_sitename
174+
if (OIIO_SITE)
175+
add_compile_definitions (OIIO_SITE_${OIIO_SITE})
176+
endif ()
177+
173178
include (GNUInstallDirs)
174179

175180
# Utilities for build instructions of the format-reading plugins
@@ -253,13 +258,6 @@ set (format_plugin_libs "")
253258
set (format_plugin_include_dirs "")
254259
set (format_plugin_definitions "")
255260
file (GLOB all_format_plugin_dirs src/*.imageio)
256-
if ("${OIIO_SITE}" STREQUAL "SPI")
257-
# SPI only -- because of a workaround for a very weird linkage issue
258-
# specific to our system, we need to be sure libtiff is referenced first.
259-
file (GLOB tiff_format_plugin_dir src/tiff.imageio)
260-
list (REMOVE_ITEM all_format_plugin_dirs ${tiff_format_plugin_dir})
261-
list (INSERT all_format_plugin_dirs 0 ${tiff_format_plugin_dir})
262-
endif ()
263261
if (EMBEDPLUGINS AND NOT BUILD_OIIOUTIL_ONLY)
264262
foreach (plugin_dir ${all_format_plugin_dirs})
265263
add_subdirectory (${plugin_dir})

0 commit comments

Comments
 (0)