Skip to content

Commit e138b9a

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

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

src/cmake/build_libuhdr.cmake

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ 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+
find_package(JPEG REQUIRED)
17+
message("[libuhdr] JPEG_FOUND=${JPEG_FOUND}")
18+
message("[libuhdr] JPEG_INCLUDE_DIRS=${JPEG_INCLUDE_DIRS}")
19+
message("[libuhdr] JPEG_LIBRARIES=${JPEG_LIBRARIES}")
20+
message("[libuhdr] JPEG_VERSION=${JPEG_VERSION}")
21+
1622
build_dependency_with_cmake(libuhdr
1723
VERSION ${libuhdr_BUILD_VERSION}
1824
GIT_REPOSITORY ${libuhdr_GIT_REPOSITORY}
@@ -22,7 +28,9 @@ build_dependency_with_cmake(libuhdr
2228
-D CMAKE_INSTALL_LIBDIR=lib
2329
-D CMAKE_POSITION_INDEPENDENT_CODE=ON
2430
-D UHDR_BUILD_EXAMPLES=FALSE
31+
-D UHDR_BUILD_DEPS=FALSE
2532
-D UHDR_ENABLE_LOGS=TRUE
33+
#-D JPEG_ROOT=${libjpeg-turbo_ROOT}
2634
)
2735

2836
if (WIN32)

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)