Skip to content

Commit c335520

Browse files
committed
build: fix openjph target use
PR 4875, switched to using openjph's exported cmake config instead of our own FindOpenJPH.cmake, and in the process also renamed OpenJPH -> openjph to follow their convention. But I botched it, still using the old OPENJPH_LIBRARIES (etc.) veriables instead of fully switching to the correct targets exported from their config. This PR minimally fixes that error, re-enabling use of openjph. Signed-off-by: Larry Gritz <[email protected]>
1 parent 333b63b commit c335520

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

src/cmake/testing.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ macro (oiio_add_all_tests)
278278
FOUNDVAR OPENJPEG_FOUND
279279
IMAGEDIR oiio-images URL "Recent checkout of OpenImageIO-images")
280280
oiio_add_tests (htj2k
281-
FOUNDVAR OPENJPH_FOUND
281+
FOUNDVAR openjph_FOUND
282282
IMAGEDIR oiio-images URL "Recent checkout of OpenImageIO-images")
283283
oiio_add_tests (jpeg2000-j2kp4files
284284
FOUNDVAR OPENJPEG_FOUND

src/jpeg2000.imageio/CMakeLists.txt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,15 @@ if (OPENJPEG_FOUND)
88
set(_jpeg2000_libs ${OPENJPEG_LIBRARIES})
99
set(_jpeg2000_defs "USE_OPENJPEG")
1010

11-
if (OPENJPH_FOUND)
12-
list(APPEND _jpeg2000_includes ${OPENJPH_INCLUDES})
13-
list(APPEND _jpeg2000_lib_dirs ${OPENJPH_LIBRARY_DIRS})
14-
list(APPEND _jpeg2000_libs ${OPENJPH_LIBRARIES})
11+
if (openjph_FOUND)
1512
list(APPEND _jpeg2000_defs "USE_OPENJPH")
1613
endif()
1714

1815
add_oiio_plugin(jpeg2000input.cpp jpeg2000output.cpp
1916
INCLUDE_DIRS ${_jpeg2000_includes}
2017
LINK_DIRECTORIES ${_jpeg2000_lib_dirs}
2118
LINK_LIBRARIES ${_jpeg2000_libs}
19+
$<TARGET_NAME_IF_EXISTS:openjph>
2220
DEFINITIONS ${_jpeg2000_defs}
2321
)
2422
else()

0 commit comments

Comments
 (0)