2017-06-30 05:56:12 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
2023-10-05 05:40:35 +08:00
|
|
|
REPO AcademySoftwareFoundation/OpenImageIO
|
2023-02-22 01:02:09 +08:00
|
|
|
REF "v${VERSION}"
|
2024-02-09 14:58:53 +08:00
|
|
|
SHA512 8399d66a757297d646e0d9ce363cfc88a8f7b06d69582857093f13a0a398fc027ea68bf1a97f039320f3fe512c96b4e3ed084295da12359e7574ba460336ce10
|
2017-06-30 05:56:12 +08:00
|
|
|
HEAD_REF master
|
2018-07-03 15:55:31 +08:00
|
|
|
PATCHES
|
2021-09-10 12:05:50 +08:00
|
|
|
fix-dependencies.patch
|
2022-07-29 13:19:42 +08:00
|
|
|
fix-static-ffmpeg.patch
|
|
|
|
fix-openexr-dll.patch
|
|
|
|
imath-version-guard.patch
|
2022-12-14 11:15:34 +08:00
|
|
|
fix-openimageio_include_dir.patch
|
2023-02-22 01:02:09 +08:00
|
|
|
fix-openexr-target-missing.patch
|
2024-04-11 22:03:03 +08:00
|
|
|
fix-dependency-libraw.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
|
|
|
|
2022-07-29 13:19:42 +08:00
|
|
|
file(REMOVE
|
|
|
|
"${SOURCE_PATH}/src/cmake/modules/FindFFmpeg.cmake"
|
|
|
|
"${SOURCE_PATH}/src/cmake/modules/FindLibheif.cmake"
|
|
|
|
"${SOURCE_PATH}/src/cmake/modules/FindLibRaw.cmake"
|
|
|
|
"${SOURCE_PATH}/src/cmake/modules/FindLibsquish.cmake"
|
|
|
|
"${SOURCE_PATH}/src/cmake/modules/FindOpenCV.cmake"
|
|
|
|
"${SOURCE_PATH}/src/cmake/modules/FindOpenJPEG.cmake"
|
|
|
|
"${SOURCE_PATH}/src/cmake/modules/FindWebP.cmake"
|
2023-01-20 09:55:56 +08:00
|
|
|
"${SOURCE_PATH}/src/cmake/modules/Findfmt.cmake"
|
|
|
|
"${SOURCE_PATH}/src/cmake/modules/FindTBB.cmake"
|
2022-07-29 13:19:42 +08:00
|
|
|
)
|
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
|
|
|
|
freetype USE_FREETYPE
|
|
|
|
gif USE_GIF
|
|
|
|
opencv USE_OPENCV
|
|
|
|
openjpeg USE_OPENJPEG
|
|
|
|
webp USE_WEBP
|
2023-02-01 10:11:48 +08:00
|
|
|
libheif USE_LIBHEIF
|
2021-05-21 15:56:25 +08:00
|
|
|
pybind11 USE_PYTHON
|
|
|
|
tools OIIO_BUILD_TOOLS
|
2023-10-28 09:54:58 +08:00
|
|
|
viewer ENABLE_IV
|
2019-09-18 00:31:20 +08:00
|
|
|
)
|
2018-07-03 15:55:31 +08:00
|
|
|
|
2021-08-14 04:40:07 +08:00
|
|
|
vcpkg_cmake_configure(
|
2021-12-30 03:22:28 +08:00
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2021-08-14 04:40:07 +08:00
|
|
|
OPTIONS
|
|
|
|
${FEATURE_OPTIONS}
|
2022-07-29 13:19:42 +08:00
|
|
|
-DBUILD_TESTING=OFF
|
2023-04-15 14:35:03 +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
|
2022-07-29 13:19:42 +08:00
|
|
|
-DUSE_OpenVDB=OFF
|
2019-12-26 12:06:42 +08:00
|
|
|
-DUSE_PTEX=OFF
|
2022-07-29 13:19:42 +08:00
|
|
|
-DUSE_TBB=OFF
|
|
|
|
-DLINKSTATIC=OFF # LINKSTATIC breaks library lookup
|
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
|
2022-05-13 08:06:27 +08:00
|
|
|
-DBUILD_DOCS=OFF
|
|
|
|
-DINSTALL_DOCS=OFF
|
2022-12-14 11:15:34 +08:00
|
|
|
-DENABLE_INSTALL_testtex=OFF
|
2023-01-20 09:55:56 +08:00
|
|
|
"-DFMT_INCLUDES=${CURRENT_INSTALLED_DIR}/include"
|
2023-02-01 10:11:48 +08:00
|
|
|
"-DREQUIRED_DEPS=fmt;JPEG;PNG;Robinmap"
|
2022-12-14 11:15:34 +08:00
|
|
|
MAYBE_UNUSED_VARIABLES
|
|
|
|
ENABLE_INSTALL_testtex
|
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
|
|
|
|
2022-07-29 13:19:42 +08:00
|
|
|
vcpkg_cmake_config_fixup(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(
|
2023-10-28 09:54:58 +08:00
|
|
|
TOOL_NAMES iconvert idiff igrep iinfo maketx oiiotool
|
|
|
|
AUTO_CLEAN
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if("viewer" IN_LIST FEATURES)
|
|
|
|
vcpkg_copy_tools(
|
|
|
|
TOOL_NAMES 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
|
2022-07-29 13:19:42 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/doc"
|
2021-08-14 04:40:07 +08:00
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/include"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/share")
|
2017-06-30 05:56:12 +08:00
|
|
|
|
2021-12-30 03:22:28 +08:00
|
|
|
vcpkg_fixup_pkgconfig()
|
2019-08-09 08:46:04 +08:00
|
|
|
|
2022-07-29 13:19:42 +08:00
|
|
|
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
2023-02-22 01:02:09 +08:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.md")
|
2022-07-29 13:19:42 +08:00
|
|
|
file(READ "${SOURCE_PATH}/THIRD-PARTY.md" third_party)
|
|
|
|
string(REGEX REPLACE
|
|
|
|
"^.*The remainder of this file"
|
|
|
|
"\n-------------------------------------------------------------------------\n\nThe remainder of this file"
|
|
|
|
third_party
|
|
|
|
"${third_party}"
|
|
|
|
)
|
|
|
|
file(APPEND "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright" "${third_party}")
|