vcpkg/ports/openimageio/portfile.cmake
Alexander Neumann 9e36a44338
[seacas/vtkm/vtk/paraview] Add/update ports. (#27928)
* [cgns] update to 4.2.0

* [vtk-m] update to 1.6.0

* [vtk] Update to 9.0.1-pv5.9.1
- VTK update to match release version of ParaView

* [ParaView] Update to 5.9.1

* version stuff

* fix automatic svg linkage in static builds

* update qt5-svg

* revisit vtk
- fix build with vtk-m 1.6
- remove unused patches
- remove comments

* bump version

* remove two commented lines

* version stuff

* remove old PR version

* commit stuff

* commit stuff

* update notes

* wip commit

* update paraview

* fix hdf5 patch

* fix patch

* fix patch

* fix portfile

* add mpi feature

* format manifest

* use relativ path

* trace

* retry

* move qml files again

* try with host triplet

* - use VCPKG_CRT_LINKAGE
- use METIS not metis

* fix casing Zlib

* hopefully more fixes on other platforms.

* fix patch

* fix missing ws

* fix typos

* scale down to warning

* revert jsoncpp change
fix zoltan on osx?

* move trace option to failing port

* move trace option to failing port

* Revert "trilinos vcpkg.json changes"

* verdict fix osx build ?

* fix patch

* fix internal find_package call

* also apply correct case for metis

* disable METIS on osx

* vtk-m don't support arm.

* force more features in Ci

* fix missing ,

* more fixes

* more vtk python try and error.

* - paraview python setup same as vtk
- remove openvr from platforms not supporting it
- trace openimageio

* fix case and remove fmt for openimageio.

* trying to fix stuff

* set hash to 0

* [skip actions] add missing module

* WebCore module moved to paraview&python

* fixes

* remove patch in vtk-dicom

* add var to maybe unused

* use correct 5.11 ref instead of the one in release

* Patch cleanup round 1

* remove empty patch parts

* fix vtkm configs

* reintegrate jsoncpp.patch

* fix patch

* add single seacas/kokkos/zoltan ports

* throw out trilinos, zoltan, kokkos
replace trilinos with seacas
make seacas work for dynamic windows

* fix mpi feature

* fix dependency

* retry dep fix

* rename target

* remove double line

* fix target

* fix patch

* retry

* remove cgns config

* fix cgns

* no seacas trace

* lowercase hdf5 target

* fix case of metis

* disable Fortran

* add iotr patch

* add additional config folder

* handel case sensitive Seacas again

* get trace again and force jsoncpp

* update cmake to 3.25.0

* bump port-version

* add patch from vtk upstream

* cleanup, format-manifest

* fix port version

* v db

* opencv4 always inject deps.

* fix test port to not require stuff which is not supported on x86

* Fix HDF5 lookup in opencv4

* only delete bin folder in static builds

* add license field

* v db

* add missing "

* v db

* trace again

* fix rtabmap python dep

* fix openimageio by deleting the find module

* v db

* cr cleanup

* v db

* opencv4 v db due to merge with master. Had to bump port version

* v db

* v db

* v db

* CR comments

* v db for cr comments

* trace theia output

* revert theia trace

* v db

* try without patch

* revert rtabmap changes

* v db after merge

* v db for all
2023-01-19 17:55:56 -08:00

103 lines
3.2 KiB
CMake

vcpkg_minimum_required(VERSION 2022-10-12)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO OpenImageIO/oiio
REF v${VERSION}
SHA512 c7a4283b78197c262d8da31460ce8b07b44546f822142e32e6c1ea22376e1c4b9cfe9c39cc0994987c6c4f653c1f2764057944da97a3a090bf1bcb74a2a0b2c2
HEAD_REF master
PATCHES
fix-dependencies.patch
fix-static-ffmpeg.patch
fix-openexr-dll.patch
imath-version-guard.patch
fix-openimageio_include_dir.patch
fix-vs2019-encoding-conversion.patch
)
file(REMOVE_RECURSE "${SOURCE_PATH}/ext")
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"
"${SOURCE_PATH}/src/cmake/modules/Findfmt.cmake"
"${SOURCE_PATH}/src/cmake/modules/FindTBB.cmake"
)
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
libraw USE_LIBRAW
opencolorio USE_OPENCOLORIO
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
tools USE_OPENGL
tools USE_QT
tools USE_QT5
)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
${FEATURE_OPTIONS}
-DBUILD_TESTING=OFF
-DUSE_DCMTK=OFF
-DUSE_NUKE=OFF
-DUSE_QT=OFF
-DUSE_OpenVDB=OFF
-DUSE_PTEX=OFF
-DUSE_TBB=OFF
-DLINKSTATIC=OFF # LINKSTATIC breaks library lookup
-DBUILD_MISSING_FMT=OFF
-DBUILD_MISSING_ROBINMAP=OFF
-DBUILD_MISSING_DEPS=OFF
-DSTOP_ON_WARNING=OFF
-DVERBOSE=ON
-DBUILD_DOCS=OFF
-DINSTALL_DOCS=OFF
-DENABLE_INSTALL_testtex=OFF
"-DFMT_INCLUDES=${CURRENT_INSTALLED_DIR}/include"
"-DREQUIRED_DEPS=fmt;JPEG;Libheif;Libsquish;PNG;Robinmap"
MAYBE_UNUSED_VARIABLES
ENABLE_INSTALL_testtex
)
vcpkg_cmake_install()
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/OpenImageIO)
if("tools" IN_LIST FEATURES)
vcpkg_copy_tools(
TOOL_NAMES iconvert idiff igrep iinfo maketx oiiotool iv
AUTO_CLEAN
)
endif()
# Clean
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/doc"
"${CURRENT_PACKAGES_DIR}/debug/include"
"${CURRENT_PACKAGES_DIR}/debug/share")
vcpkg_fixup_pkgconfig()
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
file(INSTALL "${SOURCE_PATH}/LICENSE.md" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
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}")