Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -110,16 +110,16 @@ if (VERBOSE)
else ()
set (CMAKE_MESSAGE_LOG_LEVEL "STATUS" CACHE STRING "CMake log level to display")
endif ()
option (${PROJ_NAME}_BUILD_TOOLS "Build the command-line tools" ON)
option (${PROJ_NAME}_BUILD_TESTS "Build the unit tests" ON)
set_option (${PROJ_NAME}_BUILD_TOOLS "Build the command-line tools" ON)
set_option (${PROJ_NAME}_BUILD_TESTS "Build the unit tests" ON)
set_option (OIIO_USE_HWY "Enable experimental Google Highway SIMD optimizations (if Highway is available)" OFF VERBOSE)
set (OIIO_LIBNAME_SUFFIX "" CACHE STRING
"Optional name appended to ${PROJECT_NAME} libraries that are built")
option (BUILD_OIIOUTIL_ONLY "If ON, will build *only* libOpenImageIO_Util" OFF)
option (BUILD_DOCS "If ON, build documentation and man pages." ON)
option (INSTALL_DOCS "If ON, install documentation and man pages." ON)
option (INSTALL_FONTS "If ON, install default fonts" ON)
option (EMBEDPLUGINS "Embed format plugins in libOpenImageIO" ON)
set_option (BUILD_OIIOUTIL_ONLY "If ON, will build *only* libOpenImageIO_Util" OFF)
set_option (BUILD_DOCS "If ON, build documentation and man pages." ON)
set_option (INSTALL_DOCS "If ON, install documentation and man pages." ON)
set_option (INSTALL_FONTS "If ON, install default fonts" ON)
set_option (EMBEDPLUGINS "Embed format plugins in libOpenImageIO" ON)
set (PLUGIN_SEARCH_PATH "" CACHE STRING "Default plugin search path")
file (TO_NATIVE_PATH "${PLUGIN_SEARCH_PATH}" PLUGIN_SEARCH_PATH_NATIVE)
set (CMAKE_DEBUG_POSTFIX "_d" CACHE STRING "Library naming postfix for Debug builds")
Expand Down
5 changes: 3 additions & 2 deletions src/cmake/add_oiio_plugin.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,9 @@ macro (add_oiio_plugin)
OpenImageIO_EXPORTS)
target_compile_options (${_plugin_NAME} PRIVATE ${_plugin_COMPILE_OPTIONS})
target_include_directories (${_plugin_NAME} BEFORE PRIVATE ${_plugin_INCLUDE_DIRS})
target_link_directories (${_plugin_NAME} PUBLIC OpenImageIO
PRIVATE ${_plugin_LINK_DIRECTORIES})
if (_plugin_LINK_DIRECTORIES)
target_link_directories (${_plugin_NAME} PRIVATE ${_plugin_LINK_DIRECTORIES})
endif ()
target_link_libraries (${_plugin_NAME} PUBLIC OpenImageIO
PRIVATE ${_plugin_LINK_LIBRARIES})
set_target_properties (${_plugin_NAME} PROPERTIES PREFIX "" FOLDER "Plugins")
Expand Down
5 changes: 5 additions & 0 deletions src/dpx.imageio/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,9 @@ add_oiio_plugin (dpxinput.cpp dpxoutput.cpp
libdpx/DPX.cpp libdpx/OutStream.cpp libdpx/RunLengthEncoding.cpp
libdpx/Codec.cpp libdpx/Reader.cpp libdpx/Writer.cpp libdpx/DPXHeader.cpp
libdpx/ElementReadStream.cpp libdpx/InStream.cpp libdpx/DPXColorConverter.cpp
LINK_LIBRARIES
# dpxinput.cpp uses Imf::TimeCode from OpenEXR. In the embedded build this
# comes in transitively via libOpenImageIO; a standalone plugin must link
# it explicitly.
$<TARGET_NAME_IF_EXISTS:OpenEXR::OpenEXR>
)
7 changes: 7 additions & 0 deletions src/ffmpeg.imageio/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,17 @@ if (FFmpeg_FOUND)
endif()
endif()

# Newer ffmpeg versions (3.1.1+) marked some fields and functions (e.g.
# av_init_packet, m_format_context->streams[i]->codec) as deprecated.
# Suppress those warnings here so they apply in both the embedded and
# standalone (EMBEDPLUGINS=0) build paths.
# FIXME -- at some point, come back and figure out how to fix for real
# before the fields disappear entirely.
add_oiio_plugin (ffmpeginput.cpp
INCLUDE_DIRS ${FFMPEG_INCLUDES}
LINK_LIBRARIES ${FFMPEG_LIBRARIES}
$<TARGET_NAME_IF_EXISTS:BZip2::BZip2>
COMPILE_OPTIONS $<$<NOT:$<CXX_COMPILER_ID:MSVC>>:-Wno-deprecated-declarations>
DEFINITIONS "USE_FFMPEG"
"-DOIIO_FFMPEG_VERSION=\"${FFMPEG_VERSION}\"")
else()
Expand Down
9 changes: 8 additions & 1 deletion src/heif.imageio/heifoutput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,19 @@ class HeifWriter final : public heif::Context::Writer {
};


// Defined in heifinput.cpp. Declare here at C++ namespace scope (not inside
// the extern "C" block below) so the linkage matches the definition in the
// non-embedded (dynamic plugin) build where OIIO_PLUGIN_EXPORTS_BEGIN is
// `extern "C"`.
extern void
oiio_heif_init();


OIIO_PLUGIN_EXPORTS_BEGIN

OIIO_EXPORT ImageOutput*
heif_output_imageio_create()
{
extern void oiio_heif_init();
oiio_heif_init();
return new HeifOutput;
}
Expand Down
4 changes: 2 additions & 2 deletions src/include/imageio_pvt.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ extern std::string extension_list;
extern std::string library_list;
extern OIIO_UTIL_API int oiio_print_debug;
extern OIIO_UTIL_API int oiio_print_uncaught_errors;
extern int oiio_log_times;
extern int openexr_core;
extern OIIO_API int oiio_log_times;
extern OIIO_API int openexr_core;
extern int jpeg_com_attributes;
extern int png_linear_premult;
extern int enable_hwy;
Expand Down
9 changes: 0 additions & 9 deletions src/libOpenImageIO/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,6 @@ if (NOT USE_EXTERNAL_PUGIXML)
endif ()
endif()

# Make the build complete for newer ffmpeg versions (3.1.1+) that have
# marked m_format_context->streams[i]->codec as deprecated.
# FIXME -- at some point, come back and figure out how to fix for real
# before the field disappears entirely.
if (NOT MSVC)
set_source_files_properties (../ffmpeg.imageio/ffmpeginput.cpp
PROPERTIES COMPILE_FLAGS "-Wno-deprecated-declarations")
endif()

if (CMAKE_COMPILER_IS_GNUCC)
set_source_files_properties (../libutil/SHA1.cpp
PROPERTIES COMPILE_FLAGS -Wno-stringop-truncation)
Expand Down
11 changes: 10 additions & 1 deletion src/openexr.imageio/exrinput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,16 @@ OIIO_PLUGIN_NAMESPACE_BEGIN



#ifdef USE_OPENEXR_CORE
// Defined in exrinput_c.cpp. Declare here at C++ namespace scope (not inside
// the extern "C" block below) so the linkage matches the definition in the
// non-embedded (dynamic plugin) build where OIIO_PLUGIN_EXPORTS_BEGIN is
// `extern "C"`.
extern ImageInput*
openexrcore_input_imageio_create();
#endif


// Obligatory material to make this a recognizable imageio plugin:
OIIO_PLUGIN_EXPORTS_BEGIN

Expand All @@ -91,7 +101,6 @@ openexr_input_imageio_create()
#ifdef USE_OPENEXR_CORE
if (pvt::openexr_core) {
// Strutil::print("selecting core\n");
extern ImageInput* openexrcore_input_imageio_create();
return openexrcore_input_imageio_create();
}
#endif
Expand Down
3 changes: 2 additions & 1 deletion src/psd.imageio/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
# SPDX-License-Identifier: Apache-2.0
# https://github.com/AcademySoftwareFoundation/OpenImageIO

add_oiio_plugin (psdinput.cpp)
add_oiio_plugin (psdinput.cpp
LINK_LIBRARIES ZLIB::ZLIB)

Loading