File tree Expand file tree Collapse file tree 4 files changed +508
-489
lines changed
Expand file tree Collapse file tree 4 files changed +508
-489
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,16 @@ function(OPENEXR_DEFINE_LIBRARY libname)
1717 ${OPENEXR_CURLIB_HEADERS}
1818 ${OPENEXR_CURLIB_SOURCES} )
1919
20+ # KDU
21+ if (KDU_LIBRARY)
22+ message ("Using Kakadu SDK instead of OpenJPH" )
23+ target_include_directories (${objlib} PRIVATE ${KDU_INCLUDE_DIR} )
24+ target_compile_definitions (${objlib} PRIVATE KDU_AVAILABLE)
25+ target_link_libraries (${objlib} PUBLIC ${PROJECT_NAME} ::Config ${OPENEXR_CURLIB_DEPENDENCIES} ${KDU_LIBRARY} ${CMAKE_DL_LIBS} )
26+ else ()
27+ target_link_libraries (${objlib} PUBLIC ${PROJECT_NAME} ::Config ${OPENEXR_CURLIB_DEPENDENCIES} ${CMAKE_DL_LIBS} openjph)
28+ endif ()
29+
2030 # Use ${OPENEXR_CXX_STANDARD} to determine the standard we use to compile
2131 # OpenEXR itself. The headers will use string_view and such, so ensure
2232 # the user is at least 17, but could be higher
Original file line number Diff line number Diff line change @@ -252,6 +252,22 @@ else()
252252endif ()
253253
254254
255+ #######################################
256+ # Get KDU
257+ #######################################
258+
259+ message (STATUS "Fetching KDU" )
260+ find_path (KDU_INCLUDE_DIR kdu_args.h PATH_SUFFIXES kakadu kdu)
261+ find_library (KDU_LIBRARY NAMES kdu_a84R PATH_SUFFIXES kakadu kdu)
262+
263+ if (NOT (KDU_INCLUDE_DIR) OR NOT (KDU_LIBRARY))
264+ message ("Kakadu SDK not found: ${KDU_LIBRARY} and ${KDU_INCLUDE_DIR} ." )
265+ set (KDU_INCLUDE_DIR CACHE PATH "" FORCE)
266+ set (KDU_LIBRARY CACHE PATH "" FORCE)
267+ else ()
268+ message ("Kakadu SDK found: ${KDU_LIBRARY} and ${KDU_INCLUDE_DIR} ." )
269+ endif ()
270+
255271#######################################
256272# Find or download OpenJPH
257273#######################################
You can’t perform that action at this time.
0 commit comments