2021-01-17 11:39:12 +08:00
|
|
|
if("field3d" IN_LIST FEATURES)
|
|
|
|
vcpkg_fail_port_install(
|
|
|
|
ON_TARGET WINDOWS UWP
|
|
|
|
MESSAGE "The field3d feature is not supported on Windows"
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2017-06-30 05:56:12 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO OpenImageIO/oiio
|
2021-09-08 12:09:32 +08:00
|
|
|
REF 9f74cf4d9813bfdcad5bca08b4ff75a25d056cb0 # 2.3.7.2
|
|
|
|
SHA512 cebc388e842e983f010c5f3bf57bed3fe1ae9d2eac79019472f8431b194d6a8b156b27cc5688bd0998aa2d01959d47bcdc7e637417f755433ffe32c491cdc376
|
2017-06-30 05:56:12 +08:00
|
|
|
HEAD_REF master
|
2018-07-03 15:55:31 +08:00
|
|
|
PATCHES
|
2021-01-17 11:39:12 +08:00
|
|
|
fix-config-cmake.patch
|
2019-12-25 13:42:31 +08:00
|
|
|
fix_static_build.patch
|
2021-09-08 12:09:32 +08:00
|
|
|
disable-test.patch
|
2021-09-10 12:05:50 +08:00
|
|
|
fix-dependencies.patch
|
2017-06-30 05:56:12 +08:00
|
|
|
)
|
|
|
|
|
2018-05-02 06:55:59 +08:00
|
|
|
file(REMOVE_RECURSE "${SOURCE_PATH}/ext")
|
2019-09-30 04:07:50 +08:00
|
|
|
|
2019-12-26 12:06:42 +08:00
|
|
|
file(REMOVE "${SOURCE_PATH}/src/cmake/modules/FindLibRaw.cmake"
|
|
|
|
"${SOURCE_PATH}/src/cmake/modules/FindOpenCV.cmake"
|
2021-08-10 16:11:41 +08:00
|
|
|
"${SOURCE_PATH}/src/cmake/modules/FindFFmpeg.cmake")
|
2019-09-30 04:07:50 +08:00
|
|
|
|
2018-05-02 06:55:59 +08:00
|
|
|
file(MAKE_DIRECTORY "${SOURCE_PATH}/ext/robin-map/tsl")
|
|
|
|
|
2021-08-14 04:40:07 +08:00
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" LINKSTATIC)
|
2019-12-25 13:42:31 +08:00
|
|
|
|
2019-09-18 00:31:20 +08:00
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
2021-05-21 15:56:25 +08:00
|
|
|
FEATURES
|
|
|
|
libraw USE_LIBRAW
|
2021-08-10 16:11:41 +08:00
|
|
|
opencolorio USE_OPENCOLORIO
|
2021-05-21 15:56:25 +08:00
|
|
|
ffmpeg USE_FFMPEG
|
|
|
|
field3d USE_FIELD3D
|
|
|
|
freetype USE_FREETYPE
|
|
|
|
gif USE_GIF
|
|
|
|
opencv USE_OPENCV
|
|
|
|
openjpeg USE_OPENJPEG
|
|
|
|
webp USE_WEBP
|
|
|
|
pybind11 USE_PYTHON
|
|
|
|
tools OIIO_BUILD_TOOLS
|
2019-09-18 00:31:20 +08:00
|
|
|
)
|
2018-07-03 15:55:31 +08:00
|
|
|
|
2020-01-13 12:39:49 +08:00
|
|
|
vcpkg_find_acquire_program(PYTHON3)
|
|
|
|
get_filename_component(PYTHON3_DIR "${PYTHON3}" DIRECTORY)
|
|
|
|
vcpkg_add_to_path("${PYTHON3_DIR}")
|
|
|
|
|
2021-08-14 04:40:07 +08:00
|
|
|
vcpkg_cmake_configure(
|
2017-06-30 05:56:12 +08:00
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
2021-08-14 04:40:07 +08:00
|
|
|
OPTIONS
|
|
|
|
${FEATURE_OPTIONS}
|
2017-06-30 05:56:12 +08:00
|
|
|
-DOIIO_BUILD_TESTS=OFF
|
2019-10-10 17:24:02 +08:00
|
|
|
-DUSE_DCMTK=OFF
|
2017-06-30 05:56:12 +08:00
|
|
|
-DUSE_NUKE=OFF
|
|
|
|
-DUSE_QT=OFF
|
2019-12-26 12:06:42 +08:00
|
|
|
-DUSE_PTEX=OFF
|
2017-06-30 05:56:12 +08:00
|
|
|
-DLINKSTATIC=${LINKSTATIC}
|
2021-01-17 11:39:12 +08:00
|
|
|
-DBUILD_MISSING_FMT=OFF
|
|
|
|
-DBUILD_MISSING_ROBINMAP=OFF
|
2018-05-02 06:55:59 +08:00
|
|
|
-DBUILD_MISSING_DEPS=OFF
|
2021-01-17 11:39:12 +08:00
|
|
|
-DSTOP_ON_WARNING=OFF
|
2018-10-21 03:37:47 +08:00
|
|
|
-DVERBOSE=ON
|
2017-06-30 05:56:12 +08:00
|
|
|
)
|
|
|
|
|
2021-08-14 04:40:07 +08:00
|
|
|
vcpkg_cmake_install()
|
2017-06-30 05:56:12 +08:00
|
|
|
|
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
2021-08-14 04:40:07 +08:00
|
|
|
vcpkg_cmake_config_fixup(PACKAGE_NAME OpenImageIO CONFIG_PATH lib/cmake/OpenImageIO)
|
2019-12-25 13:53:30 +08:00
|
|
|
|
2021-01-17 11:39:12 +08:00
|
|
|
if("tools" IN_LIST FEATURES)
|
|
|
|
vcpkg_copy_tools(
|
2021-05-21 15:56:25 +08:00
|
|
|
TOOL_NAMES iconvert idiff igrep iinfo maketx oiiotool iv
|
2021-01-17 11:39:12 +08:00
|
|
|
AUTO_CLEAN
|
|
|
|
)
|
2020-01-20 13:40:24 +08:00
|
|
|
endif()
|
|
|
|
|
2017-06-30 05:56:12 +08:00
|
|
|
# Clean
|
2021-08-14 04:40:07 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/doc"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/doc"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/include"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/share")
|
2017-06-30 05:56:12 +08:00
|
|
|
|
2021-08-14 04:40:07 +08:00
|
|
|
file(COPY "${SOURCE_PATH}/src/cmake/modules/FindOpenImageIO.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/OpenImageIO")
|
2021-09-17 08:25:52 +08:00
|
|
|
file(COPY "${SOURCE_PATH}/src/cmake/modules/FindLibsquish.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/OpenImageIO")
|
|
|
|
file(COPY "${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
2019-08-09 08:46:04 +08:00
|
|
|
|
2017-06-30 05:56:12 +08:00
|
|
|
# Handle copyright
|
2021-08-14 04:40:07 +08:00
|
|
|
file(INSTALL "${SOURCE_PATH}/LICENSE.md" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|