File tree Expand file tree Collapse file tree 13 files changed +142
-67
lines changed Expand file tree Collapse file tree 13 files changed +142
-67
lines changed Original file line number Diff line number Diff line change 1- cmake_minimum_required (VERSION 3.5 )
1+ cmake_minimum_required (VERSION 3.10 )
22project ( RAWTOACES )
33
44set ( RAWTOACES_MAJOR_VERSION 1 )
@@ -64,6 +64,7 @@ else ()
6464 set ( DO_SHARED STATIC )
6565endif ()
6666
67+ include ( GNUInstallDirs )
6768include ( configure.cmake )
6869
6970
@@ -95,13 +96,38 @@ install( FILES
9596 "${PROJECT_BINARY_DIR} /RAWTOACESConfigVersion.cmake"
9697 DESTINATION "${INSTALL_CMAKE_DIR} " COMPONENT dev)
9798
99+
100+
101+ install (
102+ TARGETS rawtoaces_idt rawtoaces_util rawtoaces_util2 rawtoaces
103+ EXPORT RawToAcesConfig
104+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
105+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
106+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
107+ )
108+
109+ export (
110+ TARGETS rawtoaces_idt rawtoaces_util rawtoaces_util2 rawtoaces
111+ NAMESPACE RawToAces::
112+ FILE "${CMAKE_CURRENT_BINARY_DIR} /RawToAcesConfig.cmake"
113+ )
114+
115+ install (
116+ EXPORT RawToAcesConfig
117+ DESTINATION "${CMAKE_INSTALL_LIBDIR} /CMake/RawToAces"
118+ NAMESPACE RawToAces::
119+ )
120+
121+
122+
123+
98124if ( WIN32 AND NOT CYGWIN )
99125install ( FILES "${PROJECT_BINARY_DIR} /RAWTOACESLibraryDepends.cmake" DESTINATION
100126 "${INSTALL_CMAKE_DIR} " COMPONENT dev )
101127endif ( )
102128
103129if ( APPLE OR UNIX )
104- install (DIRECTORY data DESTINATION include /rawtoaces)
130+ install (DIRECTORY data DESTINATION ${CMAKE_INSTALL_DATADIR} /rawtoaces)
105131endif ()
106132
107133enable_testing ()
Original file line number Diff line number Diff line change 5656#define _ACESRENDER_h__
5757
5858#include < rawtoaces/rta.h>
59+ #include < rawtoaces/define.h>
5960#include < libraw/libraw.h>
6061#include < unordered_map>
6162
Original file line number Diff line number Diff line change @@ -460,16 +460,36 @@ inline dataPath &pathsFinder()
460460
461461 if ( firstTime )
462462 {
463- string path;
464- const char *env;
463+ #if defined( WIN32 ) || defined( WIN64 )
464+ char separator = ' ;' ;
465+ #else
466+ char separator = ' :' ;
467+ #endif
465468
469+ string path;
466470 vector<string> &PATHs = cdp.paths ;
467- env = getenv ( " AMPAS_DATA_PATH" );
468471
469- if ( env )
470- path = env;
472+ {
473+ const char *env = getenv ( " AMPAS_DATA_PATH" );
474+ if ( env != nullptr )
475+ {
476+ if ( !path.empty () )
477+ path += separator;
478+ path += env;
479+ }
480+ }
471481
472- if ( path == " " )
482+ {
483+ const char *env = getenv ( " RAWTOACES_DATA_PATH" );
484+ if ( env != nullptr )
485+ {
486+ if ( !path.empty () )
487+ path += separator;
488+ path += env;
489+ }
490+ }
491+
492+ if ( path.empty () )
473493 {
474494#if defined( WIN32 ) || defined( WIN64 )
475495 path = " ." ;
@@ -486,11 +506,7 @@ inline dataPath &pathsFinder()
486506
487507 while ( pos < path.size () )
488508 {
489- #if defined( WIN32 ) || defined( WIN64 )
490- size_t end = path.find ( ' ;' , pos );
491- #else
492- size_t end = path.find ( ' :' , pos );
493- #endif
509+ size_t end = path.find ( separator, pos );
494510
495511 if ( end == string::npos )
496512 end = path.size ();
Original file line number Diff line number Diff line change 5555#ifndef _RTA_h__
5656#define _RTA_h__
5757
58- #include " define.h "
59-
58+ #include < string >
59+ # include < vector >
6060#include < stdint.h>
6161
6262#include " metadata.h"
Original file line number Diff line number Diff line change 1- cmake_minimum_required (VERSION 3.5 )
1+ cmake_minimum_required (VERSION 3.10 )
22include_directories ( "${CMAKE_CURRENT_SOURCE_DIR} " )
33
44add_executable ( rawtoaces
Original file line number Diff line number Diff line change 1- cmake_minimum_required (VERSION 3.5 )
1+ cmake_minimum_required (VERSION 3.10 )
22include_directories ( "${CMAKE_CURRENT_SOURCE_DIR} " )
33
44add_executable ( rawtoaces2
Original file line number Diff line number Diff line change @@ -10,8 +10,8 @@ using namespace rta;
1010
1111int main ( int argc, const char *argv[] )
1212{
13-
1413 OIIO::ArgParse argParse;
14+ argParse.arg ( " filename" ).action ( OIIO::ArgParse::append () ).hidden ();
1515
1616 ImageConverter converter;
1717 converter.init_parser ( argParse );
Original file line number Diff line number Diff line change 1- cmake_minimum_required (VERSION 3.5 )
1+ cmake_minimum_required (VERSION 3.10 )
22include_directories ( "${CMAKE_CURRENT_SOURCE_DIR} " )
33
44add_library ( ${RAWTOACESIDTLIB} ${DO_SHARED}
@@ -8,13 +8,14 @@ add_library( ${RAWTOACESIDTLIB} ${DO_SHARED}
88 ../../include /rawtoaces/define.h
99 ../../include /rawtoaces/mathOps.h
1010 ../../include /rawtoaces/rta.h
11+ ../../include /rawtoaces/metadata.h
1112)
1213
1314set_property (TARGET ${RAWTOACESIDTLIB} PROPERTY CXX_STANDARD 17)
1415
1516target_link_libraries (
1617 ${RAWTOACESIDTLIB}
17- PUBLIC
18+ PRIVATE
1819 Boost::boost
1920 Boost::system
2021 Imath::Imath
Original file line number Diff line number Diff line change 1- cmake_minimum_required (VERSION 3.5 )
1+ cmake_minimum_required (VERSION 3.10 )
22include_directories ( "${CMAKE_CURRENT_SOURCE_DIR} " )
33
44add_library ( ${RAWTOACESLIB} ${DO_SHARED}
55 acesrender.cpp
6+
7+ # Make the headers visible in IDEs. This should not affect the builds.
8+ ../../include /rawtoaces/acesrender.h
69)
710
811set_property (TARGET ${RAWTOACESLIB} PROPERTY CXX_STANDARD 17)
@@ -11,7 +14,7 @@ if ( AcesContainer_FOUND )
1114 target_include_directories ( ${RAWTOACESLIB} PRIVATE ${AcesContainer_INCLUDE_DIRS} )
1215 target_link_directories ( ${RAWTOACESLIB} PUBLIC ${AcesContainer_LIBRARY_DIRS} )
1316 target_link_libraries ( ${RAWTOACESLIB}
14- PUBLIC
17+ PRIVATE
1518 ${AcesContainer_LIBRARIES}
1619 ${AcesContainer_LDFLAGS_OTHER}
1720 )
Original file line number Diff line number Diff line change 1- cmake_minimum_required (VERSION 3.5 )
1+ cmake_minimum_required (VERSION 3.10 )
22include_directories ( "${CMAKE_CURRENT_SOURCE_DIR} " )
33
44add_library ( rawtoaces_util2 ${DO_SHARED}
@@ -19,8 +19,9 @@ if ( OIIO_FOUND )
1919endif ()
2020
2121target_link_libraries ( rawtoaces_util2
22- PUBLIC
22+ PRIVATE
2323 ${RAWTOACESIDTLIB}
24+ PUBLIC
2425 OpenImageIO::OpenImageIO
2526)
2627
You can’t perform that action at this time.
0 commit comments