Add new comment

It works!

I managed to build gpr and libraw against Adobe's stock dng sdk v1.5. It seems to work. In case someone else needs this:

I: Build gopro/gpr:

1. replace gopro's toplevel CMakeLists.txt with this one (this builds only a subset of the libraries):
------------------------------------
# minimum required cmake version
cmake_minimum_required( VERSION 3.5 FATAL_ERROR )

set(CMAKE_SUPPRESS_REGENERATION true)
set(CMAKE_C_FLAGS "-std=c99")

# project name
project( gpr )

option(DNGINCLUDEDIR "Adobe DNG toolkit include directory")
INCLUDE_DIRECTORIES( ${DNGINCLUDEDIR} )

# DNG toolkit requires C++11 minimum:
set_property(GLOBAL PROPERTY CXX_STANDARD 17)

# add needed subdirectories
add_subdirectory( "source/lib/common" )
add_subdirectory( "source/lib/vc5_common" )
add_subdirectory( "source/lib/vc5_decoder" )
add_subdirectory( "source/lib/gpr_sdk" )

set_property(TARGET gpr_sdk PROPERTY CXX_STANDARD 17)

IF (WIN32)
TARGET_COMPILE_DEFINITIONS( gpr_sdk PUBLIC -DqWinOS=1 -DqMacOS=0 -DqLinux=0)
ELSEIF (APPLE)
TARGET_COMPILE_DEFINITIONS( gpr_sdk PUBLIC -DqWinOS=0 -DqMacOS=1 -DqLinux=0)
ELSE()
TARGET_COMPILE_DEFINITIONS( gpr_sdk PUBLIC -DqWinOS=0 -DqMacOS=0 -DqLinux=1)
ENDIF()
----------------------------------------

2. apply the two patches of README.GoPro.txt section II b.
the patch of section IIa is not needed with libdng1.5.

3. delete these two files:
/source/lib/gpr_sdk/private/gpr.cpp
/source/lib/gpr_sdk/private/gpr_image_writer.cpp

4. run CMAKE with -DDNGINCLUDEDIR, pointing to the headers from Adobe dng 1.5.

5. build. You get 4 libraries "gpr_sdk", "vc5_common", "vc5_decoder", "common", the rest is ignored.

II build libraw:
1. pass the following to ./configure:
CXXFLAGS="-stdlib=libc++ -std=c++17" CPPFLAGS="-DUSE_DNGSDK -DUSE_GPRSDK"
(and also add -I... for the header paths of the dng library and gopro's headers)

2. remove the 'register' keyword from these files:
src/utils/phaseone_processing.cpp
src/x3f/x3f_parse_process.cpp

Or probably -std=c++11 should work as well. dng1.5 seems to require c++11 at least.