2022-12-14 11:15:34 +08:00
|
|
|
vcpkg_minimum_required(VERSION 2022-10-12)
|
|
|
|
|
2017-06-30 05:56:12 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO OpenImageIO/oiio
|
2022-12-14 11:15:34 +08:00
|
|
|
REF v${VERSION}
|
|
|
|
SHA512 c7a4283b78197c262d8da31460ce8b07b44546f822142e32e6c1ea22376e1c4b9cfe9c39cc0994987c6c4f653c1f2764057944da97a3a090bf1bcb74a2a0b2c2
|
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-01-13 14:47:18 +08:00
|
|
|
fix-vs2019-encoding-conversion.patch
|
2023-01-27 11:19:30 +08:00
|
|
|
qt6.patch
|
|
|
|
more_qt6.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
|
2022-07-29 13:19:42 +08:00
|
|
|
tools USE_OPENGL
|
|
|
|
tools USE_QT
|
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-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(
|
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}")
|