2017-06-30 05:56:12 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO OpenImageIO/oiio
|
2022-07-29 13:19:42 +08:00
|
|
|
REF v2.3.17.0
|
|
|
|
SHA512 25cb1a671e7cd5154e363eef178ab091fd7d55868746a4394340567a794f6c6f0295e58721a5b4ee8bf66b4cc0e6a01c3e82f9cc9de9953ae349d45738a04700
|
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
|
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"
|
|
|
|
)
|
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
|
|
|
|
pybind11 USE_PYTHON
|
|
|
|
tools OIIO_BUILD_TOOLS
|
2022-07-29 13:19:42 +08:00
|
|
|
tools USE_OPENGL
|
|
|
|
tools USE_QT
|
|
|
|
tools USE_QT5
|
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
|
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
|
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-07-29 13:19:42 +08:00
|
|
|
"-DREQUIRED_DEPS=fmt;JPEG;Libheif;Libsquish;PNG;Robinmap"
|
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()
|
|
|
|
|
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(
|
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
|
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}")
|
2021-08-14 04:40:07 +08:00
|
|
|
file(INSTALL "${SOURCE_PATH}/LICENSE.md" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
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}")
|