Skip to content

Commit 0702922

Browse files
committed
v2 - rename rawtoaces_idt to rawtoaces_core
Signed-off-by: Anton Dukhovnikov <[email protected]>
1 parent 3896445 commit 0702922

File tree

16 files changed

+87
-87
lines changed

16 files changed

+87
-87
lines changed

CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
cmake_minimum_required(VERSION 3.11)
1+
cmake_minimum_required(VERSION 3.12)
22
project( RAWTOACES )
33

44
set( RAWTOACES_MAJOR_VERSION 1 )
55
set( RAWTOACES_MINOR_VERSION 1 )
66
set( RAWTOACES_PATCH_VERSION 0 )
77
set( RAWTOACES_VERSION ${RAWTOACES_MAJOR_VERSION}.${RAWTOACES_MINOR_VERSION}.${RAWTOACES_PATCH_VERSION} )
88

9-
set(RAWTOACESIDTLIB "rawtoaces_idt")
9+
set(RAWTOACES_CORE_LIB "rawtoaces_core")
1010
set(RAWTOACESLIB "rawtoaces_util")
1111

1212
set( CMAKE_MACOSX_RPATH 1 )
@@ -72,7 +72,7 @@ include ( configure.cmake )
7272
## Build
7373

7474
add_definitions( -DPACKAGE="RAWTOACES" -DVERSION="${RAWTOACES_VERSION}" )
75-
add_subdirectory("src/${RAWTOACESIDTLIB}")
75+
add_subdirectory("src/${RAWTOACES_CORE_LIB}")
7676
add_subdirectory("src/${RAWTOACESLIB}")
7777
add_subdirectory("src/rawtoaces")
7878

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ To build `rawtoaces` you would need to sutisfy these dependencies:
3737

3838
| Library | Min Version| Purpose | Link to installation instruction |
3939
| ------- | -----------| -------- | -------------------------------- |
40-
| `cmake` | `3.11` | | [CMake download](https://cmake.org/download/)|
40+
| `cmake` | `3.12` | | [CMake download](https://cmake.org/download/)|
4141
| `ceres` | `1.12.0` | Ceres Solver is an open source library for solving Non-linear Least Squares problems with bounds constraints and unconstrained optimization problems. It processes non-linear regression for rawtoaces. | [Ceres Solver installation](http://ceres-solver.org/installation.html)|
4242
| `imath` | `3.1.8` | Provides the half data type used for representing 16-bit floating-point values. It's used by rawtoaces for storing high dynamic range (HDR) data in a compact format. | [Imath installation](https://imath.readthedocs.io/en/latest/install.html#install)|
4343
| `libraw` | `0.19.4` | LibRaw is a library that processes RAW files from digital cameras. It handles image pre-processing for rawtoaces. | [LibRaw download](http://www.libraw.org/download) |
@@ -112,7 +112,7 @@ $ cmake --build build
112112
$ sudo cmake --install build # Optional if you want it to be accessible system wide
113113
```
114114

115-
The default process will install `librawtoaces_idt_${rawtoaces_version}.dylib` and `librawtoaces_util_${rawtoaces_version}.dylib` to `/usr/local/lib`, a few header files to `/usr/local/include/rawtoaces/include` and a number of data files into `/usr/local/include/rawtoaces/data`.
115+
The default process will install `librawtoaces_core_${rawtoaces_version}.dylib` and `librawtoaces_util_${rawtoaces_version}.dylib` to `/usr/local/lib`, a few header files to `/usr/local/include/rawtoaces/include` and a number of data files into `/usr/local/include/rawtoaces/data`.
116116

117117
#### Docker
118118

include/rawtoaces/acesrender.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#ifndef _ACESRENDER_h__
55
#define _ACESRENDER_h__
66

7-
#include <rawtoaces/rta.h>
7+
#include <rawtoaces/rawtoaces_core.h>
88

99
#include <unordered_map>
1010

include/rawtoaces/rta.h renamed to include/rawtoaces/rawtoaces_core.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#include "define.h"
88

99
#include <stdint.h>
10-
#include <libraw/libraw.h>
10+
#include <libraw.h>
1111

1212
using namespace std;
1313

src/rawtoaces/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.5)
1+
cmake_minimum_required(VERSION 3.12)
22

33
add_executable( rawtoaces
44
main.cpp
@@ -19,4 +19,4 @@ else ()
1919
endif ()
2020

2121

22-
install( TARGETS rawtoaces DESTINATION ${INSTALL_BIN_DIR} )
22+
install( TARGETS rawtoaces DESTINATION ${INSTALL_BIN_DIR} )

src/rawtoaces_core/CMakeLists.txt

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
cmake_minimum_required(VERSION 3.12)
2+
include_directories( "${CMAKE_CURRENT_SOURCE_DIR}" )
3+
4+
set( CORE_PUBLIC_HEADER
5+
../../include/rawtoaces/define.h
6+
../../include/rawtoaces/mathOps.h
7+
../../include/rawtoaces/rawtoaces_core.h
8+
)
9+
10+
add_library( ${RAWTOACES_CORE_LIB} ${DO_SHARED}
11+
rawtoaces_core.cpp
12+
13+
# Make the headers visible in IDEs. This should not affect the builds.
14+
${CORE_PUBLIC_HEADER}
15+
)
16+
17+
target_link_libraries(
18+
${RAWTOACES_CORE_LIB}
19+
PUBLIC
20+
Boost::boost
21+
Boost::system
22+
Boost::filesystem
23+
Imath::Imath
24+
Imath::ImathConfig
25+
Eigen3::Eigen
26+
)
27+
28+
if ( ${Ceres_VERSION_MAJOR} GREATER 1 )
29+
target_link_libraries( ${RAWTOACES_CORE_LIB} PUBLIC Ceres::ceres )
30+
else ()
31+
target_include_directories(${RAWTOACES_CORE_LIB} PUBLIC ${CERES_INCLUDE_DIRS})
32+
target_link_libraries(${RAWTOACES_CORE_LIB} PUBLIC ${CERES_LIBRARIES})
33+
endif ()
34+
35+
if ( LIBRAW_CONFIG_FOUND )
36+
target_link_libraries ( ${RAWTOACES_CORE_LIB} PUBLIC libraw::raw )
37+
else ()
38+
target_include_directories(${RAWTOACES_CORE_LIB} PUBLIC ${libraw_INCLUDE_DIR} )
39+
target_link_directories(${RAWTOACES_CORE_LIB} PUBLIC ${libraw_LIBRARY_DIRS} )
40+
target_link_libraries(${RAWTOACES_CORE_LIB} PUBLIC ${libraw_LIBRARIES} ${libraw_LDFLAGS_OTHER} )
41+
endif ()
42+
43+
target_include_directories( ${RAWTOACES_CORE_LIB} PUBLIC
44+
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../../include>
45+
$<INSTALL_INTERFACE:./include>
46+
)
47+
48+
set_target_properties( ${RAWTOACES_CORE_LIB} PROPERTIES
49+
OUTPUT_NAME "rawtoaces_core"
50+
EXPORT_NAME "rawtoaces_core"
51+
PUBLIC_HEADER "${CORE_PUBLIC_HEADER}"
52+
SOVERSION ${RAWTOACES_MAJOR_VERSION}.${RAWTOACES_MINOR_VERSION}.${RAWTOACES_PATCH_VERSION}
53+
VERSION ${RAWTOACES_VERSION}
54+
)
55+
56+
install( TARGETS ${RAWTOACES_CORE_LIB}
57+
EXPORT RAWTOACESTargets
58+
LIBRARY DESTINATION ${INSTALL_LIB_DIR}
59+
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
60+
PUBLIC_HEADER DESTINATION include/rawtoaces
61+
)

src/rawtoaces_idt/rta.cpp renamed to src/rawtoaces_core/rawtoaces_core.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// SPDX-License-Identifier: Apache-2.0
22
// Copyright Contributors to the rawtoaces Project.
33

4-
#include <rawtoaces/rta.h>
4+
#include <rawtoaces/rawtoaces_core.h>
55
#include <rawtoaces/mathOps.h>
66

77
#include <boost/property_tree/ptree.hpp>

src/rawtoaces_idt/CMakeLists.txt

Lines changed: 0 additions & 61 deletions
This file was deleted.

src/rawtoaces_util/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.5)
1+
cmake_minimum_required(VERSION 3.12)
22
include_directories( "${CMAKE_CURRENT_SOURCE_DIR}" )
33

44
set( UTIL_PUBLIC_HEADER
@@ -24,7 +24,7 @@ endif()
2424

2525
target_link_libraries ( ${RAWTOACESLIB}
2626
PUBLIC
27-
${RAWTOACESIDTLIB}
27+
${RAWTOACES_CORE_LIB}
2828
INTERFACE
2929
Eigen3::Eigen
3030
Imath::Imath

unittest/CMakeLists.txt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.10)
1+
cmake_minimum_required(VERSION 3.12)
22

33
add_definitions (-DBOOST_TEST_DYN_LINK)
44

@@ -12,7 +12,7 @@ add_executable (
1212
target_link_libraries(
1313
Test_Spst
1414
PUBLIC
15-
${RAWTOACESIDTLIB}
15+
${RAWTOACES_CORE_LIB}
1616
Boost::unit_test_framework
1717
)
1818

@@ -28,7 +28,7 @@ add_executable (
2828
target_link_libraries(
2929
Test_IDT
3030
PUBLIC
31-
${RAWTOACESIDTLIB}
31+
${RAWTOACES_CORE_LIB}
3232
Boost::unit_test_framework
3333
)
3434

@@ -44,7 +44,7 @@ add_executable (
4444
target_link_libraries(
4545
Test_Illum
4646
PUBLIC
47-
${RAWTOACESIDTLIB}
47+
${RAWTOACES_CORE_LIB}
4848
Boost::unit_test_framework
4949
)
5050

@@ -60,7 +60,7 @@ add_executable (
6060
target_link_libraries(
6161
Test_DNGIdt
6262
PUBLIC
63-
${RAWTOACESIDTLIB}
63+
${RAWTOACES_CORE_LIB}
6464
Boost::unit_test_framework
6565
)
6666

@@ -76,7 +76,7 @@ add_executable (
7676
target_link_libraries(
7777
Test_Math
7878
PUBLIC
79-
${RAWTOACESIDTLIB}
79+
${RAWTOACES_CORE_LIB}
8080
Boost::unit_test_framework
8181
)
8282

@@ -92,7 +92,7 @@ add_executable (
9292
target_link_libraries(
9393
Test_Logic
9494
PUBLIC
95-
${RAWTOACESIDTLIB}
95+
${RAWTOACES_CORE_LIB}
9696
Boost::unit_test_framework
9797
)
9898

@@ -108,7 +108,7 @@ add_executable (
108108
target_link_libraries(
109109
Test_Misc
110110
PUBLIC
111-
${RAWTOACESIDTLIB}
111+
${RAWTOACES_CORE_LIB}
112112
Boost::unit_test_framework
113113
)
114114

0 commit comments

Comments
 (0)