-
Notifications
You must be signed in to change notification settings - Fork 203
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #49 from brotherofken/44-save-merged-dng
#44 save merged buffer as dng
- Loading branch information
Showing
10 changed files
with
324 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,40 @@ | ||
cmake_minimum_required(VERSION 3.10) | ||
project(HDR_PLUS) | ||
|
||
set(CMAKE_CXX_STANDARD 11) | ||
#set(CMAKE_CXX_FLAGS "-O3 -v -g -Wall") # Use -DCMAKE_BUILD_TYPE=Release/Debug instead | ||
find_package(PNG REQUIRED) | ||
set_property(GLOBAL PROPERTY USE_FOLDERS ON) | ||
|
||
set(HALIDE_ROOT_DIR "") | ||
SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}) | ||
include("macro.cmake") | ||
set(CMAKE_CXX_STANDARD 11) | ||
|
||
if(" ${HALIDE_ROOT_DIR}" STREQUAL " ") | ||
message( FATAL_ERROR "Specify HALIDE_ROOT_DIR variable in the cmake file." ) | ||
endif() | ||
# Define dependencies | ||
link_halide() | ||
link_libtiff() | ||
|
||
find_library(LIBRAW_LIBRARY | ||
NAMES raw raw_r | ||
) | ||
find_package(ZLIB REQUIRED) | ||
find_package(PNG REQUIRED) | ||
find_package(JPEG REQUIRED) | ||
find_library(LIBRAW_LIBRARY NAMES raw raw_r) | ||
|
||
set(src_files | ||
src/HDRPlus.cpp | ||
src/align.cpp | ||
src/finish.cpp | ||
src/merge.cpp | ||
src/util.cpp | ||
src/InputSource.cpp | ||
src/InputSource.h | ||
src/Burst.cpp | ||
src/Burst.h) | ||
|
||
include_directories(/usr/local/lib /usr/local/include ${HALIDE_ROOT_DIR}/bin ${HALIDE_ROOT_DIR}/lib ${HALIDE_ROOT_DIR}/include ${HALIDE_ROOT_DIR}/tools) | ||
src/LibRaw2DngConverter.cpp) | ||
|
||
link_directories(/usr/local/lib /usr/local/include ${HALIDE_ROOT_DIR}/bin ${HALIDE_ROOT_DIR}/lib ${HALIDE_ROOT_DIR}/include ${HALIDE_ROOT_DIR}/tools) | ||
set(header_files | ||
src/InputSource.h | ||
src/Burst.h | ||
src/dngwriter.h | ||
src/LibRaw2DngConverter.h) | ||
|
||
include_directories(${HALIDE_DISTRIB_DIR}/include ${HALIDE_DISTRIB_DIR}/tools ${RAW2DNG_INCLUDE_DIRS}) | ||
|
||
add_executable(hdrplus ${src_files}) | ||
add_executable(hdrplus src/HDRPlus.cpp ${src_files}) | ||
target_link_libraries(hdrplus Halide png ${LIBRAW_LIBRARY} ${TIFF_LIBRARIES} ${TIFFXX_LIBRARY}) | ||
|
||
target_link_libraries(hdrplus Halide png ${LIBRAW_LIBRARY}) | ||
add_executable(stack_frames src/stack_frames.cpp ${src_files}) | ||
target_link_libraries(stack_frames Halide ${LIBRAW_LIBRARY} ${PNG_LIBRARIES} ${JPEG_LIBRARIES} ${TIFF_LIBRARIES} ${TIFFXX_LIBRARY}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
cmake_minimum_required(VERSION 3.10) | ||
|
||
macro(link_halide) | ||
if("${HALIDE_DISTRIB_DIR}" STREQUAL " ") | ||
message(FATAL_ERROR "Specify HALIDE_DISTRIB_DIR variable in the cmake options.") | ||
endif() | ||
find_package(Threads) # fix dynamic linking for halide | ||
set(HALIDE_DISTRIB_USE_STATIC_LIBRARY OFF) | ||
include(${HALIDE_DISTRIB_DIR}/halide.cmake) | ||
include_directories(${HALIDE_DISTRIB_DIR}/include ${HALIDE_DISTRIB_DIR}/tools) | ||
link_directories(${HALIDE_DISTRIB_DIR}/lib ${HALIDE_DISTRIB_DIR}/bin) | ||
endmacro() | ||
|
||
macro(link_libtiff) | ||
# Link as follows: | ||
# target_link_libraries(TARGET ${TIFF_LIBRARIES}) | ||
find_package(TIFF REQUIRED) | ||
if (TIFF_FOUND) | ||
include_directories(${TIFF_INCLUDE_DIRS}) | ||
endif() | ||
|
||
find_library(TIFFXX_LIBRARY NAMES tiffxx) | ||
message(STATUS "Found tiffxx: ${TIFFXX_LIBRARY}") | ||
endmacro() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.