2017-06-30 05:56:12 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO OpenImageIO/oiio
|
2020-07-08 04:48:51 +08:00
|
|
|
REF e028a5264bd229e128b37a4362f7eb9c73ea82cc #2.1.16.0
|
|
|
|
SHA512 be5741e139c3c1d2fe62d6706833e9b158b6b00e1a57d141626f28cd3653f63e587b76de676b6b45d1a2330a0e71ebb2f1d00c108b68509cc418b6026424cfda
|
2017-06-30 05:56:12 +08:00
|
|
|
HEAD_REF master
|
2018-07-03 15:55:31 +08:00
|
|
|
PATCHES
|
2019-12-26 12:06:42 +08:00
|
|
|
fix-dependency.patch
|
2019-12-25 13:42:31 +08:00
|
|
|
fix_static_build.patch
|
2019-12-27 14:28:50 +08:00
|
|
|
fix-tools-path.patch
|
2019-12-30 11:17:08 +08:00
|
|
|
fix-config-cmake.patch
|
2020-07-08 04:48:51 +08:00
|
|
|
fix-dependfmt.patch
|
2020-10-13 03:16:20 +08:00
|
|
|
fix-libheif.patch # Remove this patch on the next update
|
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/FindOpenEXR.cmake"
|
|
|
|
"${SOURCE_PATH}/src/cmake/modules/FindOpenCV.cmake"
|
2020-01-07 17:01:45 +08:00
|
|
|
"${SOURCE_PATH}/src/cmake/modules/FindFFmpeg.cmake"
|
2019-12-26 12:06:42 +08:00
|
|
|
"${SOURCE_PATH}/src/cmake/modules/FindWebp.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")
|
|
|
|
|
2019-12-25 13:42:31 +08:00
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
|
|
|
set(LINKSTATIC ON)
|
|
|
|
else()
|
|
|
|
set(LINKSTATIC OFF)
|
|
|
|
endif()
|
|
|
|
|
2019-09-18 00:31:20 +08:00
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
2020-01-20 13:40:24 +08:00
|
|
|
libraw USE_LIBRAW
|
2019-10-10 17:24:02 +08:00
|
|
|
opencolorio USE_OCIO
|
2020-01-20 13:40:24 +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}")
|
|
|
|
|
2017-06-30 05:56:12 +08:00
|
|
|
vcpkg_configure_cmake(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
|
|
PREFER_NINJA
|
2019-09-18 00:31:20 +08:00
|
|
|
OPTIONS ${FEATURE_OPTIONS}
|
2017-06-30 05:56:12 +08:00
|
|
|
-DOIIO_BUILD_TESTS=OFF
|
|
|
|
-DHIDE_SYMBOLS=ON
|
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}
|
2018-05-02 06:55:59 +08:00
|
|
|
-DBUILD_MISSING_PYBIND11=OFF
|
|
|
|
-DBUILD_MISSING_DEPS=OFF
|
2018-10-21 03:37:47 +08:00
|
|
|
-DVERBOSE=ON
|
2017-06-30 05:56:12 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
|
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
2020-08-08 02:48:19 +08:00
|
|
|
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/OpenImageIO TARGET_PATH share/OpenImageIO)
|
2019-12-25 13:53:30 +08:00
|
|
|
|
2020-01-20 13:40:24 +08:00
|
|
|
if ("tools" IN_LIST FEATURES)
|
|
|
|
vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/openimageio)
|
|
|
|
endif()
|
|
|
|
|
2017-06-30 05:56:12 +08:00
|
|
|
# Clean
|
2019-12-25 13:53:30 +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
|
|
|
|
2020-08-08 02:48:19 +08:00
|
|
|
file(COPY ${SOURCE_PATH}/src/cmake/modules/FindOpenImageIO.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/OpenImageIO)
|
|
|
|
file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/OpenImageIO)
|
2019-08-09 08:46:04 +08:00
|
|
|
|
2017-06-30 05:56:12 +08:00
|
|
|
# Handle copyright
|
2019-12-25 13:42:31 +08:00
|
|
|
file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|