Skip to content

Commit e239dfd

Browse files
committed
build: ensure libuhdr build recipe points to correct JPEG package
Signed-off-by: loicvital <[email protected]>
1 parent 2a5fc74 commit e239dfd

File tree

3 files changed

+19
-5
lines changed

3 files changed

+19
-5
lines changed

src/cmake/build_libuhdr.cmake

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,14 @@ set (libuhdr_GIT_TAG "v${libuhdr_BUILD_VERSION}")
1313
set_cache (libuhdr_BUILD_SHARED_LIBS OFF
1414
DOC "Should execute a local libuhdr build, if necessary, build shared libraries" ADVANCED)
1515

16+
# CI debugging
17+
if (TARGET libjpeg-turbo::jpeg)
18+
get_target_property(JPEG_INCLUDE_DIR JPEG::JPEG INTERFACE_INCLUDE_DIRECTORIES)
19+
get_target_property(JPEG_LIBRARY JPEG::JPEG INTERFACE_LINK_LIBRARIES)
20+
endif ()
21+
message("[libuhdr] JPEG_INCLUDE_DIR=${JPEG_INCLUDE_DIR}")
22+
message("[libuhdr] JPEG_LIBRARY=${JPEG_LIBRARY}")
23+
1624
build_dependency_with_cmake(libuhdr
1725
VERSION ${libuhdr_BUILD_VERSION}
1826
GIT_REPOSITORY ${libuhdr_GIT_REPOSITORY}
@@ -22,7 +30,9 @@ build_dependency_with_cmake(libuhdr
2230
-D CMAKE_INSTALL_LIBDIR=lib
2331
-D CMAKE_POSITION_INDEPENDENT_CODE=ON
2432
-D UHDR_BUILD_EXAMPLES=FALSE
33+
-D UHDR_BUILD_DEPS=FALSE
2534
-D UHDR_ENABLE_LOGS=TRUE
35+
${MORE_UHDR_CMAKE_ARGS}
2636
)
2737

2838
if (WIN32)

src/cmake/externalpackages.cmake

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,10 @@ else ()
8686
endif ()
8787

8888

89+
# Ultra HDR
90+
checked_find_package (libuhdr)
91+
92+
8993
checked_find_package (TIFF REQUIRED
9094
VERSION_MIN 4.0)
9195
alias_library_if_not_exists (TIFF::TIFF TIFF::tiff)
@@ -226,10 +230,6 @@ checked_find_package (fmt REQUIRED
226230
get_target_property(FMT_INCLUDE_DIR fmt::fmt-header-only INTERFACE_INCLUDE_DIRECTORIES)
227231

228232

229-
# Ultra HDR
230-
checked_find_package (libuhdr)
231-
232-
233233
###########################################################################
234234

235235
list (SORT CFP_ALL_BUILD_DEPS_FOUND COMPARE STRING CASE INSENSITIVE)

src/jpeg.imageio/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44

55
if (libuhdr_FOUND)
66
set (UHDR_DEFS USE_UHDR)
7+
else ()
8+
set (LIBUHDR_INCLUDE_DIR "")
9+
set (LIBUHDR_LIBRARY "")
10+
set (UHDR_DEFS "")
711
endif ()
812

913
add_oiio_plugin (jpeginput.cpp jpegoutput.cpp
@@ -12,5 +16,5 @@ add_oiio_plugin (jpeginput.cpp jpegoutput.cpp
1216
$<TARGET_NAME_IF_EXISTS:libjpeg-turbo::jpeg>
1317
$<TARGET_NAME_IF_EXISTS:JPEG::JPEG>
1418
${LIBUHDR_LIBRARY}
15-
DEFINITIONS ${UHDR_DEFS}
19+
DEFINITIONS "${UHDR_DEFS}"
1620
)

0 commit comments

Comments
 (0)