@@ -5,6 +5,7 @@ include(CheckCXXCompilerFlag)
5
5
include (CheckCSourceCompiles)
6
6
include (CheckCXXSymbolExists)
7
7
8
+
8
9
#
9
10
# Add files for libdarktable
10
11
#
@@ -382,14 +383,17 @@ if(USE_HEIF)
382
383
endif ()
383
384
endif ()
384
385
386
+ # For now we use the LibRaw submodule
385
387
if (USE_LIBRAW)
386
- find_package (libraw 0.20.2)
387
- if (libraw_FOUND)
388
- list (APPEND LIBS ${libraw_LIBRARY} )
389
- add_definitions (-DHAVE_LIBRAW=1)
390
- list (APPEND SOURCES "common/imageio_libraw.c" )
391
- set (DT_SUPPORTED_EXTENSIONS ${DT_SUPPORTED_EXTENSIONS} libraw CACHE INTERNAL "" )
392
- endif ()
388
+ # find_package(libraw 0.20.2)
389
+ # if (libraw_FOUND)
390
+ # list(APPEND LIBS ${libraw_LIBRARY})
391
+ # add_definitions(-DHAVE_LIBRAW=1)
392
+ # list(APPEND SOURCES "common/imageio_libraw.c")
393
+ # set(DT_SUPPORTED_EXTENSIONS ${DT_SUPPORTED_EXTENSIONS} libraw CACHE INTERNAL "")
394
+ # endif()
395
+ add_definitions (-DHAVE_LIBRAW=1)
396
+ list (APPEND SOURCES "common/imageio_libraw.c" )
393
397
endif ()
394
398
395
399
if (USE_LENSFUN)
@@ -432,6 +436,10 @@ if (USE_ISOBMFF)
432
436
# This must be manually enabled during exiv2 build and can be checked with
433
437
# the EXV_ENABLE_BMFF symbol.
434
438
check_cxx_symbol_exists(EXV_ENABLE_BMFF "exiv2/exiv2.hpp" HAVE_EXV_ENABLE_BMFF)
439
+ # ??? This needs fix as we bypass the check for actual exiv2 version
440
+ if (APPLE )
441
+ set (HAVE_EXV_ENABLE_BMFF 1)
442
+ endif ()
435
443
if (HAVE_EXV_ENABLE_BMFF)
436
444
add_definitions (-DHAVE_LIBEXIV2_WITH_ISOBMFF=1)
437
445
set (DT_SUPPORTED_EXTENSIONS ${DT_SUPPORTED_EXTENSIONS} cr3 CACHE INTERNAL "" )
@@ -1033,3 +1041,13 @@ InstallDependencyFiles()
1033
1041
1034
1042
# Tell CPack about the components and group the data components together (CPACK_COMPONENT_${COMPONENT_NAME_ALL_CAPS}_GROUP).
1035
1043
set (CPACK_COMPONENTS_ALL DTApplication DTDebugSymbols DTDocuments)
1044
+
1045
+ if (USE_LIBRAW)
1046
+ set (LIBRAW_PATH "${CMAKE_CURRENT_SOURCE_DIR} /external/LibRaw" CACHE STRING "Relative path to libraw directory (default=CMAKE_CURRENT_SOURCE_DIR)" )
1047
+ set (ENABLE_EXAMPLES OFF CACHE BOOLEAN "" )
1048
+ set (DT_SUPPORTED_EXTENSIONS ${DT_SUPPORTED_EXTENSIONS} libraw CACHE INTERNAL "" )
1049
+
1050
+ # LibRaw sub-module
1051
+ add_subdirectory (external/LibRaw-cmake)
1052
+ target_link_libraries (lib_darktable PRIVATE libraw::libraw)
1053
+ endif ()
0 commit comments